Obsidian MCP Server
@cyanheads
Read, write, search, and surgically edit Obsidian vault notes, tags, and frontmatter via MCP. STDIO or Streamable HTTP.
Overview
What is Obsidian MCP Server?
Obsidian MCP Server lets AI agents read, write, search, and surgically edit Obsidian vault notes, tags, and frontmatter via the Model Context Protocol. It offers 14 tools and 3 resources, and supports STDIO or Streamable HTTP transport. It is built for developers and power users who want to automate or integrate with their Obsidian notes.
How to use Obsidian MCP Server?
Install via npm (npx -y obsidian-mcp-server) or Docker (ghcr.io/cyanheads/obsidian-mcp-server). Set the OBSIDIAN_API_KEY environment variable to your Obsidian Local REST API key. Configure the server in your MCP client (e.g., Claude Desktop, Cursor, VS Code) with the appropriate command and environment variable. The server can also be installed via a dedicated MCP bundle.
Key features of Obsidian MCP Server
- Read notes as raw content, full structure, document map, or section.
- Write, append, patch, and search‑replace notes with surgical precision.
- Manage frontmatter and tags (frontmatter, inline, or both).
- Search by text, JSONLogic, or Omnisearch BM25 ranking.
- List notes, tags, and Obsidian commands.
- Create notes safely with overwrite protection.
- Execute Obsidian command‑palette commands (opt‑in).
- Paginate search results via opaque cursors.
- Supports optional Omnisearch plugin integration.
Use cases of Obsidian MCP Server
- Automate note creation, updates, and tag management in a vault.
- Search and retrieve notes programmatically for AI‑powered knowledge bases.
- Perform bulk or targeted edits on frontmatter, headings, or inline tags.
- Integrate Obsidian with MCP‑compatible agents for note‑taking workflows.
FAQ from Obsidian MCP Server
What transports does the server support?
STDIO and Streamable HTTP are both supported.
Does it require an API key?
Yes, you must set the OBSIDIAN_API_KEY environment variable with your Obsidian Local REST API key.
How can I avoid accidentally overwriting a note?
The obsidian_write_note tool refuses to clobber an existing file unless overwrite: true is explicitly set. Use obsidian_patch_note or obsidian_append_to_note for in‑place edits.
Does the server support Omnisearch?
Yes, if the Omnisearch plugin’s HTTP server is reachable at startup, the obsidian_search_notes tool offers an Omnisearch mode with BM25 ranking, quoted phrases, exclusions, and path/ext filters.
How do I paginate search results?
Pass the nextCursor value from the previous response as the cursor parameter for subsequent pages. Omit cursor for the first page.