coddingtonbear/obsidian-local-rest-api

A secure REST API and Model Context Protocol (MCP) server for your vault.

What it solves

This project provides a secure, authenticated REST API and an MCP (Model Context Protocol) server for Obsidian, allowing external scripts, browser extensions, and AI agents to programmatically interact with an Obsidian vault.

How it works

It operates as an Obsidian plugin that hosts a local server. It exposes a REST API for standard HTTP requests and a built-in MCP server for AI agents. Both interfaces provide the same core capabilities, including full CRUD operations on vault files, surgical patching of specific note sections (headings, blocks, or frontmatter), and the ability to trigger Obsidian commands and search the vault using full-text or structured JsonLogic queries.

Who it’s for

  • Developers creating scripts or browser extensions to automate Obsidian vault management.
  • AI Agent users who want to connect LLM-based tools (like Claude Code, Claude Desktop, or Cursor) directly to their personal knowledge base.

Highlights

  • Surgical Patching: Edit specific sections of a note (append, prepend, replace, or delete) without rewriting the entire file.
  • MCP Integration: Native support for the Model Context Protocol, enabling AI agents to read and write to the vault.
  • Vault Events: Subscribe to vault changes (e.g., note creation, frontmatter changes) via a Server-Sent Events stream.
  • Secure Access: All requests are served over HTTPS with locally generated certificates and API key authentication.
  • Extensible API: Other plugins can register their own custom routes via an extension interface.

Related

  • Project
  • Project
  • Project
  • Project
  • Project