obsidian-mcp
obsidian-mcp is a Model Context Protocol server that gives AI agents graph-aware access to an Obsidian vault through 25 typed tools across five capability areas.
Discovery — Find what's in the vault:
list_vault— List all files or scope to a foldersearch_vault— Full-text or tag-based search with context snippetsquery_dataview— Run structured Dataview DQL queries (e.g. "all notes tagged#projectwhere status != done")list_tags— Vault-wide tag inventory with usage countsget_vault_stats— High-level stats: total notes, word count, top folders
Reading — Get content out:
get_note— Fetch content plus graph context (backlinks, forward links, tags, frontmatter) in one callget_outline— Heading structure only (token-efficient navigation)get_active_note— Return whichever note is currently focusedget_daily_note— Fetch the current daily/weekly/monthly/quarterly/yearly periodic note
Graph — Walk and analyze link structure:
get_backlinks— All notes linking to a given note, with snippetstraverse_graph— Walk N hops from a starting note (forward, backward, or both), returning nodes and edgesfind_orphans— Notes with no incoming linksfind_broken_links— Wiki-links and markdown links that don't resolve
Writing — Create and modify notes:
create_note/create_notes— Create one or many notes with optional frontmatter (great for scaffolding)upsert_note— Idempotent create-or-update with optional frontmatter mergingupdate_note/append_to_note/append_to_daily_note— Replace or append contentpatch_note— Insert content at a specific heading, block reference, or frontmatter field without rewriting the whole notemove_note— Move/rename a note and automatically rewrite all incoming wiki-links to preserve graph integritydelete_note— Permanently delete a note
UI / Commands — Drive Obsidian itself:
open_note— Surface a note in Obsidian's workspacelist_commands— List every registered Obsidian command (built-in + plugin)run_command— Execute any Obsidian command by ID, enabling agents to trigger any plugin action
Provides graph-aware tools for reading, searching, and writing to an Obsidian vault, including backlinks, dataview queries, daily notes, graph traversal, orphan detection, and more.
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 Get today's daily note and check for unfinished tasks"
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
Treat your Obsidian vault as a knowledge graph that AI agents can actually use.
A Model Context Protocol server that gives Claude — and any other MCP-compatible AI — graph-aware access to your notes. Backlinks, multi-hop traversal, Dataview queries, daily-note awareness, batch note creation, and safe rename-with-backlink-rewrite, exposed as 25 typed tools.
Setup · What you can do · Tools · Configuration · FAQ
Why this exists
Most "Obsidian + AI" integrations expose read_file and write_file, then ask the model to figure out the rest. That works for a five-note vault. It collapses on a 5,000-note vault the moment you ask anything graph-shaped — "what connects these two ideas?", "what have I forgotten to follow up on?", "reorganize this folder." Each question becomes a chain of dozens of read_file calls, blowing through your context window before the model has even started thinking.
obsidian-mcp exposes the graph itself as tools:
get_notereturns content + backlinks + forward links + tags + frontmatter in one call.traverse_graphwalks N hops out from any starting note in one call — forward, backward, or both — returning nodes and edges as a subgraph.query_dataviewpasses Dataview DQL straight through, so the model can ask "all notes tagged #project where status != done sorted by due date" as a single typed query.move_noterenames a note and rewrites every incoming wiki-link so the graph survives the rename. This unblocks the entire "reorganize my vault" class of prompts that other servers can't safely do.create_notescreates many notes in a single tool call — useful for bootstrapping an MOC plus its topical notes without paying N round-trips.
It's a small server (TypeScript, ~2,000 LOC, three runtime deps), runs locally over stdio, and works with Claude Desktop, Claude Code, Cursor, Cline, Continue, and Zed.
Related MCP server: obsidian-mcp-server
What you can do with it
Real prompts you can drop into Claude Desktop after installing:
Build an index note (Map of Content). Build me an index note for everything I've written about distributed systems. Use
traverse_graphfrom "Distributed systems.md" with depth 2, cluster the neighbors thematically, and write the result toMOCs/Distributed Systems MOC.md. (MOC = Map of Content, a curated index note — Obsidian convention.)
Surface forgotten work. Find every note tagged
#projectwherestatus != "done"and the due date is this week. (Singlequery_dataviewcall.)
Daily review. What's in my daily note today? Anything I forgot to follow up on from yesterday's note? Append my action items to today.
Inbox triage. Find all my orphan notes in
Inbox/. For each one, read it, suggest where it belongs, and ask me before moving anything.
Bootstrap a topic. I just started studying transformer architectures. Use
create_notesto scaffold aMOCs/Transformers MOC.mdplus stub notes for "Self-attention", "Multi-head attention", "Positional encoding", and "Layer normalization", each linking back to the MOC.
Safe refactor. Rename "Atomic notes.md" to "Evergreen notes.md" using
move_note. Update every backlink so nothing breaks.
Vault analytics. Run
get_vault_statsandlist_tags. Tell me my top 5 topics by note count, where I write most, and how my vault has grown.
Cross-domain synthesis. Walk 2 hops from "Working memory.md" and 2 hops from "Attention.md". Tell me which notes appear in both neighborhoods — those are my cross-cutting ideas.
If a workflow doesn't fit one of the existing tools, open an issue — the tool catalog below covers what's there today.
Setup
You need three things wired up: Obsidian running, the Local REST API plugin enabled, and your MCP client pointed at obsidian-mcp. The whole flow takes about a minute.
Step 1 — Install the Local REST API plugin in Obsidian
obsidian-mcp reaches your vault through the Local REST API community plugin. You only do this once per vault.
In Obsidian, open Settings → Community plugins → Browse.
Search for Local REST API, then Install and Enable it.
Open the plugin's settings tab. Copy the API key shown at the top — you'll paste it into your MCP client config in Step 2.
Obsidian must be running forobsidian-mcp to work. The plugin lives inside Obsidian; close the app and the server can't reach your vault.
Step 2 — Add obsidian-mcp to your MCP client
Pick your client below.
Open the config file (create it if it doesn't exist):
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add the obsidian entry under mcpServers:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["-y", "@yanxue06/obsidian-mcp"],
"env": {
"OBSIDIAN_API_KEY": "paste-your-key-here"
}
}
}
}Quit and reopen Claude Desktop. You should see a tool icon in the input area — click it to confirm the obsidian tools are listed.
Run once, from any directory:
claude mcp add obsidian -e OBSIDIAN_API_KEY=paste-your-key-here -- npx -y @yanxue06/obsidian-mcpThen fully quit and reopen Claude Code (/mcp reconnect doesn't always re-spawn the child process). Verify with /mcp — obsidian should report ✓ Connected.
Add a new stdio MCP server with:
Command:
npxArgs:
-y @yanxue06/obsidian-mcpEnv:
OBSIDIAN_API_KEY=paste-your-key-here
Refer to your client's MCP config docs for the exact field names. Any MCP-compatible client works.
Step 3 — Verify it's wired up
In your MCP client, ask:
"Run
get_vault_statsand tell me how many notes I have."
If you get a number back, you're done. If you hit a connection error, check troubleshooting below.
Troubleshooting
Symptom | Likely cause / fix |
| Obsidian isn't running, or the Local REST API plugin isn't enabled. |
| Wrong API key. Re-copy it from the plugin's settings tab. |
| Expected — the plugin uses a self-signed cert and |
| Fully quit and reopen the MCP client; in-place reconnect doesn't always re-spawn the child process. |
Wrong vault is showing up | One server instance points at one running Obsidian instance. Switch vaults inside Obsidian, or register multiple MCP entries with different names. |
Tool catalog
25 tools, organized by category. Bold rows are the differentiators that other Obsidian MCP servers don't expose.
Discovery — find what's in the vault
Tool | What it does |
| All files (or one folder), markdown-only by default. |
| Full-text or |
| Run a Dataview DQL query. Requires the Dataview plugin in the vault. |
| Vault-wide tag inventory with usage counts and sample notes per tag. |
| Totals (files, notes), sampled word count, top folders, file extensions. |
Reading — get content out
Tool | What it does |
| Content plus graph context — backlinks, forward links, tags, frontmatter — in one call. The flagship tool. |
| Heading tree of a note. Use this instead of |
| The note currently focused in Obsidian. |
| Today's daily / weekly / monthly / quarterly / yearly note. |
Graph — walk and analyze the link structure
Tool | What it does |
| Notes that link to a given note, with snippets. |
| Walk N hops from a note (forward, backward, or both). Returns nodes + edges. |
| Notes with no incoming links — forgotten ideas, candidates for cleanup. |
| Wiki-links that don't resolve. Run this before bulk renames. |
Writing — create and modify notes
Tool | What it does |
| New note with optional frontmatter and an auto-generated |
| Create many notes in a single call. Per-note errors are reported individually; pass |
| Idempotent create-or-update. Replaces body, with optional |
| Replace a note's full content. |
| Append markdown to the end of a note. |
| Common pattern: agent logs what it did to today's daily. |
| Insert content under a specific heading, block, or frontmatter field — without rewriting the rest. |
| Move/rename a note and update incoming wiki-links so the graph stays intact. |
| Destructive — only used when explicitly asked. |
UI / commands — drive Obsidian itself
Tool | What it does |
| Surface a note in Obsidian's workspace. Great closing move for an agent task. |
| List every registered Obsidian command (built-in + plugin). |
| Execute any Obsidian command by id. Lets agents trigger any plugin action. |
How it works
┌──────────────────┐ stdio (MCP) ┌──────────────┐ HTTPS ┌──────────────────┐
│ Claude / Cursor │ ─────────────────► obsidian-mcp ────────────────► Local REST API │ ──► Vault
│ Cline / Zed / … │ │ (this repo) │ │ (Obsidian plugin)│
└──────────────────┘ └──────────────┘ └──────────────────┘obsidian-mcp is a thin layer over the Local REST API plugin. The plugin runs an HTTPS server inside Obsidian with full vault access; this server adapts that surface into the MCP protocol and adds graph-aware tools that Obsidian's REST API doesn't expose directly (backlinks, multi-hop traversal, orphan detection, safe rename, batch creation).
Everything is local. No data leaves your machine except the requests your MCP client makes to its model provider — and you control that.
Configuration
All config is via environment variables — set them in your MCP client config.
Variable | Required | Default | Notes |
| yes | — | From Local REST API plugin settings. |
| no |
| |
| no |
| |
| no |
| The plugin defaults to HTTPS with a self-signed cert. |
| no |
| Set to |
| no |
| Per-request timeout. |
Performance & scale
Vault size |
|
|
|
100 notes | ~50ms | ~150ms | ~1s |
1,000 notes | ~150ms | ~600ms | ~6s |
5,000 notes | ~400ms | ~2s | ~25s* |
*find_orphans and find_broken_links accept a sample_size parameter — bound them on large vaults to keep tool calls under the model's per-call timeout.
FAQ
Do I need to install an Obsidian plugin? Yes — the Local REST API plugin. It's the only sane way to talk to a running vault from outside. obsidian-mcp itself runs as a separate Node process started by your MCP client; you don't install another plugin in Obsidian for this.
Does it work if Obsidian is closed? No. The Local REST API runs inside Obsidian, so the app needs to be open.
Does it support multiple vaults? One server instance points at one running Obsidian instance. Run multiple MCP server entries (different names) if you switch vaults frequently. Multi-vault routing may come later.
Why HTTPS by default with OBSIDIAN_VERIFY_TLS=false? The plugin ships a self-signed cert. The traffic is loopback-only (127.0.0.1), so verification adds friction without a real security gain. If you've replaced the cert, set the flag.
Is this safe? The MCP server gives the model whatever access the API key grants — including delete and overwrite. Treat it like any agent with file write access: review what it's about to do, especially before bulk operations. move_note is designed for exactly this — making the safe path the default.
What about concurrency and crashes? No write-locking and no transaction semantics. If two agents touch the same file simultaneously, the loser's change is lost. move_note deletes the source after rewriting backlinks, and create_notes is best-effort per entry, so a crash mid-operation can leave partial state. Fine for interactive agent use; not appropriate for unattended batch jobs.
How do I debug? Run node dist/index.js directly with your env vars and the server prints connection status to stderr. Send JSON-RPC messages on stdin to test. The MCP Inspector (npm) is the easiest way to poke at tools manually.
Contributing
PRs welcome. See CONTRIBUTING.md for the dev loop, tool-authoring conventions, and code-style expectations.
Acknowledgements
Local REST API by @coddingtonbear — this entire project is downstream of it.
The Model Context Protocol team at Anthropic.
The Obsidian plugin community, who built the ecosystem this depends on.
License
MIT — see LICENSE.
Available Tools
25 toolsappend_to_daily_noteAppend to daily noteB
Append markdown to the current daily (or weekly/etc.) note. Common pattern: agent logs what it just did at the end of the day.
Inputs: content (required), period.
append_to_noteAppend to a noteA
Append markdown to the end of an existing note. Creates the note if it doesn't exist.
Inputs: path (required), content (required).
create_noteCreate a noteA
Create a new note (fails if it already exists unless overwrite is true). Frontmatter is rendered as YAML. Use links to append a wiki-link section at the end. For creating many notes in one call, use create_notes. For idempotent create-or-update writes, use upsert_note.
Inputs: path (required), content, frontmatter, links, +1 more.
create_notesCreate multiple notes in one callA
Create many notes in a single tool call. Designed for bootstrapping a knowledge graph (MOC + topical notes) without paying N round-trips. Each entry follows the same schema as create_note. Per-note errors are reported individually; pass stop_on_error: true to abort on the first failure. Within a batch, later entries also fail if they target a path already created earlier in the same call.
Inputs: notes (required), stop_on_error.
delete_noteDelete a noteA
Delete a note from the vault. Destructive — only call when the user has explicitly asked to remove a file.
Inputs: path (required).
find_broken_linksFind broken linksB
Find wiki-links and markdown links that don't resolve to any note in the vault. Use for vault hygiene or before refactoring note titles.
Inputs: folder, limit, sample_size.
find_orphansFind orphan notesB
Find notes with no incoming links anywhere in the vault. Use to surface forgotten ideas or candidates for cleanup.
Inputs: folder, limit, sample_size.
get_active_noteGet currently open noteA
Return the note the user currently has focused in Obsidian. Useful for 'what am I looking at' style prompts.
Inputs: no named parameters.
get_backlinksGet notes that link to a noteA
Return notes that link to the given path, with snippets. Same data as the backlinks field of get_note — use this when that's all you need.
Inputs: path (required), limit.
get_daily_noteGet daily / periodic noteA
Fetch the user's current daily (or weekly/monthly/etc.) note. Returns content + frontmatter + tags. Requires the Periodic Notes or Daily Notes plugin in the vault.
Inputs: period.
get_noteGet note with graph contextA
Get a note's content plus its graph context: backlinks (who links to it), forward links (who it links to), tags, and frontmatter. Use the include array to control which context is fetched — backlinks are O(vault size) so omit them when unneeded.
Inputs: path (required), include, backlinks_limit.
get_outlineGet a note's heading outlineA
Return the heading structure of a note (level + text + line number). Use this instead of get_note when you only need to navigate to a section of a long note — it's much smaller in tokens.
Inputs: path (required).
get_vault_statsGet vault statisticsA
Get high-level stats about the vault: total notes, total words (sampled), top folders, file extensions. Useful for 'how big is my vault?' / 'where do I write the most?' prompts.
Inputs: sample_size, top_folders.
list_commandsList Obsidian commandsA
List every registered Obsidian command (built-in + plugin) with its id and human name. Use this before run_command to discover what's available — vaults differ based on installed plugins.
Inputs: filter, limit.
list_tagsList all tags in the vaultA
Return every tag used in the vault, with usage counts and a sample of notes per tag. Useful for 'what topics do I write about most?' or as a starting point for organizing.
Inputs: sample_size, min_count, sample_notes_per_tag.
list_vaultList vault filesB
List all files in the Obsidian vault. Use folder to scope to a subdirectory and markdown_only to filter to notes. Prefer this over guessing paths.
Inputs: folder, markdown_only, limit.
move_noteMove or rename a note (with backlink updates)A
Move a note from one path to another, optionally rewriting wiki-links so backlinks keep working. This is the safe way to rename notes — agents should not naively delete + create because that breaks the graph.
Inputs: from (required), to (required), update_backlinks, overwrite.
open_noteOpen a note in Obsidian's UIA
Surface a note in Obsidian's workspace (focuses an existing tab or opens a new one). Great for ending an agent task with 'and here's the result for you to review'.
Inputs: path (required), new_leaf.
patch_noteInsert content at a heading or blockA
Insert content relative to a heading, block reference, or frontmatter field — without rewriting the whole note. Example: append a bullet under '## Tasks' without touching the rest of the page.
Inputs: path (required), content (required), operation (required), target_type (required), +1 more.
query_dataviewRun a Dataview DQL queryA
Run a Dataview DQL query (LIST / TABLE / TASK) against the vault. Requires the Dataview plugin installed in the vault. Powerful for structured questions like 'all notes tagged #project where status != done sorted by due date'.
Inputs: dql (required).
run_commandRun an Obsidian commandA
Execute an Obsidian command by id (e.g. 'editor:toggle-bold', 'app:reload', 'graph:open'). Discover ids with list_commands. This is powerful — it lets the agent trigger any plugin action — so use only commands the user has approved.
Inputs: id (required).
search_vaultSearch the vaultA
Full-text search across all notes. Supports two modes: keyword (fast plain-text) and tag (find notes tagged with #X). For structured queries, use query_dataview.
Inputs: query (required), mode, context_length, limit.
traverse_graphTraverse the vault graphA
Walk the link graph starting from a note. Returns nodes (notes) and edges (links) up to depth hops away. Use direction=both for a neighborhood, forward for what a note depends on, backward for what depends on it. Cap with max_nodes on large vaults.
Inputs: start (required), depth, direction, max_nodes, +1 more.
update_noteReplace a note's contentA
Overwrite a note's full content. Prefer append_to_note or patch_note when only adding to a note — replacing wholesale is destructive.
Inputs: path (required), content (required).
upsert_noteCreate or update a noteA
Create a note if missing, replace it if it exists. Body is always fully replaced. Frontmatter is replaced by default; pass merge_frontmatter: true to keep existing frontmatter keys not specified in this call. Use this when you want an idempotent write — neither create_note (errors on existence) nor update_note (errors when missing) handle that on their own.
Inputs: path (required), content, frontmatter, links, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 25 tools
Most tools target distinct actions, but there is slight overlap between get_note and get_backlinks (backlinks are also in get_note context) and between create_note, update_note, and upsert_note. However, clear descriptions mitigate confusion.
All tool names follow a consistent snake_case pattern with verb_noun structure (e.g., append_to_note, find_broken_links, list_tags). No mixed conventions or vague verbs.
25 tools is at the upper bound but justified for a comprehensive Obsidian MCP server covering notes, vault management, graph navigation, and plugin integration. Each tool earns its place.
Covers CRUD for notes, batch operations, vault statistics, search, graph analysis, and plugin commands. Minor gap: no dedicated tool to create a daily note (append assumes existing) or manage folders.
Maintenance
Related MCP Connectors
Notes and memory assistant: one Markdown vault that Claude, ChatGPT and any MCP client can share.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Related MCP Servers
- AlicenseAqualityAmaintenanceStandalone MCP server for Obsidian vaults - hybrid search (FTS5 + vector + reranking), files in agent-readable form (images, PDFs, canvases, HTML, scripts, data files), Kanban-aware tasks (Tasks-plugin + Dataview formats), structured memory with topic recall, fine-grained read/write tools, and link graph support. Run locally, self-host, or one-click deploy for remote access. OAuth 2.1.163439MIT
- AlicenseNot gradedqualityDmaintenanceConnects Claude.ai to your local Obsidian vault for full CRUD access, search, and daily note creation via the Model Context Protocol.14MIT
- AlicenseAqualityCmaintenanceA local MCP connector that lets Claude read, write and search any Obsidian vault directly from disk.20MIT
- FlicenseDqualityDmaintenanceEnables Claude Desktop to securely search and retrieve knowledge from an Obsidian vault through a stateless MCP interface, with progressive disclosure and gated write capabilities.13-