obsidian-mcp
Allows AI agents to read, search, edit, and reorganize an Obsidian vault, including tools for managing notes, frontmatter, backlinks, and link-safe moves.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@obsidian-mcp How many notes are in my vault, and where are the newest ones?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
obsidian-mcp
Let Claude (or any MCP client) read, search, edit, and reorganize your Obsidian vault — safely.
A Model Context Protocol server that treats your vault as what it really is: a folder of markdown files. No plugins, no cloud, no database. Obsidian can be closed while Claude works on your notes.
The implementation follows the SDK's current recommended API (McpServer + zod-validated tool contracts) — and pins its protocol behavior with integration tests that speak raw JSON-RPC to the real process, so SDK upgrades can't silently change the wire. If you want to understand what an MCP server actually does beyond npx some-server, start with test/server.test.ts next to the specification.
What you can ask Claude
"How many notes are in my vault, and where are the newest ones?" "Find every note that mentions 'spaced repetition' and summarize the key ideas." "Create
research/glossary.mdwith these ten terms and tag it#glossary." "Renamedaily/2026-09-06.mdtojournal/2026-09-06.md— don't break any links." "Which notes link to my reading list? Show the exact lines." "Research solid-state batteries on the web, then createresearch/solid-state-batteries.md— summary, key players, open questions, and frontmatter with the sources."
Related MCP server: obsidian-vault-mcp
The 11 tools
Tool | What it does |
| Vault path + note count — the "is it alive?" call |
| Browse folders, with sizes and modification dates |
| Full markdown content of one note |
| Full-text search (case-insensitive substring or regex), with |
| A note's YAML properties as JSON — cheaper than reading the whole note |
| New note, parent folders auto-created, optional YAML frontmatter generated |
| Append, prepend (after frontmatter), find & replace, or replace a heading section |
| To |
| Rename/move and repair every link across the vault |
| What references this note? (wikilinks, embeds, relative markdown links) |
All read-only tools are annotated readOnlyHint: true, so MCP clients can skip approval prompts for them and only ask about writes.
Safety model
Your vault is irreplaceable; the design starts there.
No path escapes. Every user-supplied path goes through one guard (
safeResolve);../../../etc/passwdcomes back as a contained error, never a readDeletes are reversible. Notes move to the vault's
.trash/(Obsidian's own convention) — neverrmNo silent clobbers.
create_notefails if the note exists, unless you explicitly sayoverwriteKernel-atomic where possible. Creates use the
wxflag (no check-then-write race); deletes and moves arerename()callsLink-safe moves. Moving a note rewrites inbound links in other notes and rebases the moved note's own relative links — aliases and
#anchorspreservedEmpty-folder cleanup after deletes/moves uses non-recursive
rmdirup the tree: the kernel refuses anything non-empty, so cleanup is data-loss-proof by construction
The one rule that makes this work: the vault folder is the only thing this server can touch.
Quick start
Requires Node 20+.
git clone https://github.com/laurentiudanielgi-coder/obsidian-mcp.git
cd obsidian-mcp
npm install && npm run buildClaude Desktop
Edit claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS):
{
"mcpServers": {
"obsidian": {
"command": "/absolute/path/to/node",
"args": ["/absolute/path/to/obsidian-mcp/dist/index.js"],
"env": { "OBSIDIAN_VAULT_PATH": "/absolute/path/to/your/vault" }
}
}
}Notes: use which node for the absolute path — GUI apps don't inherit your shell's PATH. Fully quit and reopen Claude Desktop. In Obsidian, set Files & Links → Deleted files → .trash folder so trash semantics match. And back your vault up (git works beautifully) — safety features are seatbelts, not brakes.
Any other MCP client
The server is configured with one environment variable: OBSIDIAN_VAULT_PATH, pointing at the vault root. It speaks JSON-RPC over stdio — the default transport for locally-spawned MCP servers.
How it's built
src/
├── index.ts — entrypoint: transport wiring; why stdout is the protocol channel
├── server.ts — protocol layer: handshake, capabilities, tools/list, tools/call
├── config.ts — env-var config; why clients spawn servers and pass settings via env
└── vault.ts — the only code that touches files: path guard, trash, links, editsArchitecture in one sentence: JSON-RPC messages arrive over a transport (stdio), get dispatched by the protocol layer to tool handlers, which delegate every filesystem operation to the vault layer — the single choke point where safety lives.
Code tour
The codebase doubles as a guided tour:
Concept | Where to look |
The |
|
Tool contracts: descriptions are written for the model; zod schemas |
|
Tool errors vs protocol errors (two failure channels) |
|
Server config via env vars (clients spawn servers) |
|
Stdio framing and the stdout-is-protocol rule |
|
The traversal guard when an LLM builds the paths |
|
Obsidian link resolution & unique-basename rule |
|
Raw wire format |
|
Development
npm test # unit tests against real temp filesystems + wire-level tests speaking raw JSON-RPC
npm run dev # tsc --watchTwo probe scripts exist for debugging clients against the server:
node scripts/big-create-test.mjs 9000 # create a 9,000-char note, time it
node scripts/create-from-json.mjs note.json # replay an exact client payloadRoadmap
CRUD, search, frontmatter, backlinks, link-repairing moves
RAG: heading-aware chunking → local embeddings → sqlite-vec →
semantic_searchStreamable HTTP transport (same server, new transport — proving the decoupling)
Full decision log and reasoning in PLAN.md.
License
Available Tools
10 toolscreate_noteCreate noteA
Create a new note. Fails if it already exists unless overwrite=true. Parent folders are created automatically. Pass frontmatter to have YAML properties generated; content is the markdown body.
Inputs: path (required), content (required), overwrite, frontmatter.
delete_noteDelete noteA
Move a note to the vault's .trash folder. NEVER a permanent delete — the note can be restored from .trash. Folders are refused, but folders left empty by the delete are removed automatically.
Inputs: path (required).
edit_noteEdit noteA
Edit an existing note in place. Modes: 'append'/'prepend' content (prepend lands after frontmatter); 'find_replace' all occurrences of find→replace (fails if find is absent); 'replace_section' swaps everything under heading (subsections included) for content.
Inputs: mode (required), path (required), find, content, +2 more.
get_backlinksGet backlinksARead-only
List notes that link TO a given note (wikilinks, embeds and relative markdown links). Use before editing or deleting to understand what references it, or to follow the knowledge graph backwards.
Inputs: path (required).
get_frontmatterGet frontmatterARead-only
Read a note's YAML frontmatter (its properties: tags, dates, custom fields) as JSON. Cheaper than read_note when you only need metadata.
Inputs: path (required).
list_notesList notesARead-only
List markdown notes in the vault (or a subfolder), newest info included. Returns vault-relative paths — use those in read_note.
Inputs: folder.
move_noteMove noteA
Move or rename a note (folders created automatically) and automatically update all links across the vault that pointed at its old location: wikilinks, embeds and relative markdown links. Emptied source folders are pruned. Prefer this over create+delete for renaming.
Inputs: to_path (required), from_path (required).
read_noteRead noteARead-only
Read the full markdown content of one note. path is vault-relative (from list_notes), e.g. 'projects/alpha.md'. The .md suffix is optional.
Inputs: path (required).
search_notesSearch notesARead-only
Full-text search across all notes. Default is case-insensitive substring matching; set regex=true to treat query as a regular expression. Returns path, line number and the matching line, capped at 50 hits.
Inputs: query (required), regex, folder.
vault_infoVault infoARead-only
Report the vault root path and how many markdown notes it contains. Use this first to confirm the vault is mounted and readable.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool maps cleanly to a distinct resource/action: note content, frontmatter, backlinks, vault info, and file operations. Even close pairs like get_frontmatter vs read_note are explicitly differentiated by cost and scope.
Most tools follow a consistent verb_noun snake_case pattern (read_note, create_note, delete_note, move_note). vault_info is a minor outlier since it lacks a get_ or other verb prefix, but the overall pattern remains predictable and readable.
Ten tools is well-scoped for an Obsidian vault server. Each tool covers a distinct core operation with no redundancy or unnecessary bloat.
The toolset provides complete note lifecycle coverage: create, read, update, delete, move, search, plus Obsidian-specific needs like frontmatter and backlinks. Folder handling is implicit in move/create, so there are no obvious dead ends for the implied domain.
Maintenance
Related MCP Connectors
Hosted MCP server for Obsidian Sync vaults: read, search, edit notes. Not affiliated with Obsidian.
1Search, read, and safely update Markdown notes in your connected Phasoric knowledge vaults.
Notes and memory assistant: one Markdown vault that Claude, ChatGPT and any MCP client can share.
Notes, files, GitHub, and Drive through one MCP connection.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes an Obsidian notes vault as MCP services, enabling AI assistants to search, read, create, update, and delete notes and folders.17 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to list, read, search, create, update, rename, and delete markdown notes in a local Obsidian vault via an HTTP MCP endpoint.18 npm1MIT
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to search, read, list, and append to markdown notes in a local Obsidian vault or folder of .md files.-
- AlicenseAqualityBmaintenanceEnables MCP clients to read, write, search, and manage notes, canvases, kanban boards, and other Obsidian vault content over a network, without requiring the Obsidian desktop app.33MIT