istefox15k downloadsConnect MCP-compatible clients (Claude Desktop, Claude Code, Cline) to your vault with semantic search, templates, file management and gated command execution.
Features | Adaptive tool loading | Installation | Quick setup for clients | Prompts | Command execution | Troubleshooting | Security | Development | Support
MCP Connector lets AI applications like Claude Desktop, Claude Code, Cursor, Cline, Continue, Windsurf, and VS Code securely access and work with your Obsidian vault through the Model Context Protocol. [^2]
The plugin hosts the MCP server in-process inside Obsidian and exposes Streamable HTTP on 127.0.0.1:27200. No native binary ships from this repository, so there is no platform-specific executable to download and run from GitHub Releases.
npx mcp-remote bridge, a two-line config the plugin generates for you. On Windows, where mcp-remote currently hangs on connect, a bundled POST-only Python bridge replaces it (see Troubleshooting).app.vault, app.metadataCache, and the Dataview plugin API in-process. No external HTTP service is required.Tip: all 51 tools are active by default. You can cut the per-session token cost with adaptive tool loading, which keeps a small core active and promotes the rest on demand.
When connected to an MCP-compatible client, this plugin enables:
get_vault_file, create_vault_file, patch_vault_file, rename_vault_file, rename_heading, list_vault_files, create_vault_directory, delete_vault_directory, and more) with native binary content for images and audio. Missing parent directories on a create or append path are auto-created. rename_vault_file preserves link integrity across the vault via app.fileManager.renameFile; rename_heading renames a heading in place and rewrites every wikilink, markdown link, and subheading-path reference pointing at it across the vault. get_vault_files reads up to 20 text/markdown files in a single call, one result per path, so a multi-note task no longer costs one round-trip per file. get_vault_file text output is capped at a configurable ceiling (Settings → MCP Connector, default 100 KB) — an oversized note comes back truncated with a hint to use get_vault_file_partial for a specific range instead of blowing the client's context window.get_note_property, set_note_property, delete_note_property, and list_property_values read and edit frontmatter fields directly, including listing every value a property takes across the whole vault.search_vault_smart over an on-device embedding index, each result anchored to a 0-indexed line (null under Smart Connections, which doesn't expose one). While the index is still building (first use, or right after a provider switch), the tool returns a structured error with filesIndexed/filesTotal/percent and, once a build rate is known, an estimated retryAfterSeconds — a client that sends _meta.progressToken also gets a notifications/progress push on the same call. Four providers are available on demand: native MiniLM-L6-v2 (~25 MB, default), Gemma 300M (768d, recommended for non-Latin vaults), Multilingual-E5-Base (768d), and Smart Connections (if installed). Providers download once and swap live without a restart; the vault is re-indexed in the background while the previous provider keeps serving. A startup banner suggests the best provider based on your vault's character distribution. The index persists as 16 segments sharded by file path, so editing one note only rewrites that note's segment, not the whole index, keeping saves fast in large vaults.search_vault_simple (text plus context windows, each hit anchored to a 0-indexed line) and search_vault (Dataview DQL or JsonLogic). execute_dataview_query runs Dataview DQL in-process via the plugin API and returns typed results (table, list, task, calendar). DQL needs the Dataview community plugin; the JsonLogic path needs nothing.get_or_create_daily_note, get_or_create_periodic_note (daily, weekly, monthly, quarterly, yearly), and append_to_periodic_note. Each call auto-creates the note with your configured template if it does not exist yet. Works with both the native Daily Notes plugin and the Periodic Notes community plugin.get_vault_file_partial (frontmatter field, heading section, block range, raw line range, or document outline, a context-efficient partial read), list_tags (all vault tags with usage counts), get_files_by_tag (hierarchical matching), get_recent_files (ordered by mtime), get_outgoing_links, get_backlinks, and show_file_in_obsidian (reveal a note in the Obsidian UI). get_vault_overview returns a one-call snapshot (active file, note count, top-level folder distribution, top tags, recent files), replacing the 3-5 separate calls a session otherwise needs just to get oriented.find_broken_links (link targets that do not resolve, with source file and line number), find_orphaned_notes (notes with zero incoming resolved links), search_and_replace (regex find-and-replace across the vault or scoped paths, dry_run:"true" by default for a safe preview), get_note_outline (heading TOC with level, text, line number, and anchor slug), and list_bookmarks (the full native Obsidian bookmark hierarchy: files, folders, searches, headings, blocks, groups).get_canvas reads a .canvas file as structured nodes and edges, capping long text-node content with a textTruncated flag to bound token cost. add_canvas_node appends a text, file, or link node with automatic placement to the right of the existing layout, creating the canvas and parent folders if the path does not exist. connect_canvas_nodes draws an edge between two nodes by id. Writes preserve every existing field, including styling, so a canvas edited in Obsidian round-trips through a tool write with clean diffs.Prompts/ folder. No plugins required, the in-process renderer handles everything. See Using prompts below.editor:toggle-bold, graph:open) from a per-vault allowlist. Disabled by default; every invocation is audited. See Command execution below.fetch tool retrieves arbitrary URLs and returns Markdown via Turndown, with pagination for long pages.Typed output on every tool. Each tool result carries a structuredContent object next to the text payload, so clients that support it (Claude Desktop, Claude Code) get a typed object without parsing a JSON string. The text stays byte-identical, so clients that read only text keep working unchanged. Every tool also declares MCP annotations (readOnlyHint, destructiveHint, idempotentHint, openWorldHint), so a client can skip the confirmation prompt on read-only calls and gate it on destructive ones. List and scan tools take a limit (default 200, clamped to 1000) and flag truncated: true with a full total when a large vault would otherwise return an unbounded array.
48 vault tools in total, plus three always-on meta-tools (tool_catalog, activate_tool, activate_tools) that power adaptive tool loading, for 51 tools in all. Full list in the plugin's settings, Tools available section.
Every tool a server advertises costs context-window tokens on each session: the client downloads the full JSON schema of every active tool before the model says a word. With all 51 tools active that is roughly 10K tokens per session. Adaptive tool loading lets you cut that cost without losing access to any tool.
Pick a profile in Settings, MCP Connector, Tool Loading:
| Profile | Active tools | Best for |
|---|---|---|
| All (default) | All 48 tools + all three meta-tools | Maximum capability, no behavior change from earlier versions |
| Core | 13 essential tools + tool_catalog |
Minimum token cost, static surface that never changes mid-session |
| Adaptive | Core + frequency-promoted tools + all three meta-tools | Token savings that converge on your actual usage |
The Core set covers the everyday operations: server info, active-file read/write/append, vault file read/create/list, both search tools, tags, note properties, and the daily note.
tool_catalog (always active, read-only): returns the full inventory of all tools with their status (active, inactive, promoted), call counts, and descriptions for inactive ones. The model always knows what exists and what is switched off, regardless of profile.activate_tool (Adaptive and All profiles only): promotes an inactive tool by name. The tool becomes available immediately, no reconnect needed. By default the promotion lasts until the plugin reloads; pass persist: true to write it to the plugin data so it survives reloads. Every promotion shows an Obsidian notice (MCP Connector: "<tool>" promoted to active) so you always see when the model expands its own tool surface. In the Core profile this meta-tool is not exposed: Core means a fixed surface, and the model cannot grow it.activate_tools (Adaptive and All profiles only): promotes several inactive tools in one call instead of one activate_tool call per tool, refreshing the client's tool list only once. Use it whenever a task needs more than one inactive tool at a time.In Adaptive mode the plugin counts tool calls. When a non-core tool reaches 3 calls, it is promoted automatically and stays active on subsequent connects. The Tool Loading settings section lists the currently promoted tools, lets you remove any of them, and has a Reset button that clears counters and promotions while keeping your profile choice.
find_broken_links).tool_catalog, sees the tool exists but is inactive.activate_tool with {"name": "find_broken_links"}, the tool is usable immediately and you see a notice in Obsidian.npx mcp-remote bridge. The plugin auto-detects your Node install (including Homebrew on macOS) and offers a one-click install if it is missing.execute_template tool. The prompt library works without it.search_vault and execute_dataview_query. The JsonLogic path in search_vault works without it.MCP Connector is available in the Obsidian community plugin store and via BRAT. Use either.
Prefer the latest build, or the store entry has not propagated to your client yet? Install via BRAT:
istefox/obsidian-mcp-connector.That's it. No binary to install, no separate download. The MCP server starts as soon as you enable the plugin.
The plugin settings expose three Copy config buttons, one per supported client family. Each button copies a ready-to-paste JSON snippet to the clipboard.
Claude Desktop only speaks stdio MCP. The recommended .mcpb extension bridges to the in-process server directly, with no external runtime dependency. The alternative manual JSON config instead reaches it through the official mcp-remote bridge (Anthropic-maintained, no third-party code in the auth path), which needs Node.js on your PATH.
Recommended: download the .mcpb extension
The bundle embeds your current bearer token and port directly, so no copy-paste step is required. Do not share the file. The extension runs entirely on Claude Desktop's own bundled Node.js runtime, so no separate Node install or PATH configuration is needed for this flow.
If you rotate your token or change the server port, download a fresh .mcpb and drag it onto Claude Desktop to replace the existing extension.
Alternative: manual JSON config
For advanced users or when the .mcpb flow is not available. This path runs npx mcp-remote via your own Node install, so Node.js must be on your PATH; the plugin auto-detects it and offers a one-click Homebrew install if it is missing.
{
"mcpServers": {
"obsidian-mcp-connector": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://127.0.0.1:27200/mcp",
"--header",
"Authorization: Bearer YOUR_TOKEN"
]
}
}
}
claude_desktop_config.json (Claude Desktop, Settings, Developer, Edit Config).Or tick Auto-write Claude Desktop config in the plugin settings. The plugin keeps the file in sync on token rotation, with a .backup written before each rewrite.
Windows note: use the POST-only bridge
On Windows, mcp-remote has a bug that makes Claude Desktop hang for 60 seconds on connect, then fail with "Could not attach to MCP server". This is not a plugin bug: the same hang shows up against unrelated MCP servers, and Claude Code over direct HTTP is fine. Until mcp-remote ships a fix (geelen/mcp-remote#296), Windows users should skip mcp-remote and run the bundled bridge instead.
scripts/obsidian_mcp_bridge.py is a small Python script, standard library only with nothing to install, that talks to the plugin over POST requests, so it never opens the stream that triggers the hang. Point claude_desktop_config.json at it:
{
"mcpServers": {
"obsidian": {
"command": "python",
"args": ["C:\\Users\\you\\obsidian_mcp_bridge.py", "http://127.0.0.1:27200/mcp"],
"env": { "OBSIDIAN_BEARER_TOKEN": "paste-your-token-here" }
}
}
}
Full setup, including how to grab the script and verify it works, is in docs/windows-post-only-bridge.md. macOS and Linux are not affected; use the standard mcp-remote config above.
Claude Code speaks HTTP transport natively. Click Copy config for Claude Code and paste into ~/.claude.json (project scope) or ~/.claude/settings.json (global scope):
{
"mcpServers": {
"obsidian-mcp-connector": {
"type": "http",
"url": "http://127.0.0.1:27200/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}
Or use claude mcp add from the CLI with the same fields.
Click Copy config for streamable-http clients. The snippet uses the generic streamable-http payload shape these clients accept; consult each client's own docs for the exact config-file location and any wrapping keys.
Once configured, your client should expose 51 MCP tools from this server (48 vault tools + 3 meta-tools, with the default All profile, fewer if you selected the Core or Adaptive tool loading profile), plus any prompts you have tagged with #mcp-tools-prompt in a Prompts/ folder at your vault root.
To verify the connection works end-to-end, ask the agent to call get_server_info. A successful response confirms the client can reach the in-process server and the bearer token is correct. For deeper inspection (request/response logs, tool schema inspection without an LLM in the loop), use @modelcontextprotocol/inspector:
npx -y @modelcontextprotocol/inspector
# point it at http://127.0.0.1:27200/mcp with your bearer token
The plugin lets you author MCP prompts as plain markdown files in your vault. Your prompt library lives alongside your notes, in a folder called Prompts/ at the root of the vault. Every MCP-compatible client (Claude Desktop, Claude Code, Cursor, Cline, Continue) will surface these prompts in its own UI, typically as slash commands or attachments.
Prompts (capital P) at the root of your vault. That is it, no additional plugins required. The prompt renderer runs in-process inside the plugin.If you use other Templater expressions in the prompt body (e.g. <% tp.date.now() %>), they are passed through verbatim; the MCP server does not evaluate them. Only <% tp.mcpTools.prompt(...) %> declarations and {{arg}} placeholders are processed.
Create a new folder called Prompts at the root of your vault (if it does not exist already).
Create a new markdown note inside it, e.g. Prompts/weekly-review.md.
Add frontmatter with the mcp-tools-prompt tag and a short description:
---
tags:
- mcp-tools-prompt
description: Summarize my recent daily notes on a given topic
---
Summarize my notes from the past **<% tp.mcpTools.prompt("days", "How many days back to look, e.g. 7") %>** days
about **<% tp.mcpTools.prompt("topic", "The subject, e.g. 'writing habits'") %>**.
Give me the three most recurring themes and one action item I should act on this week.
Save the file.
In your MCP client, refresh or reconnect to the server. The new prompt will appear, named after the filename (weekly-review.md), with two parameters: days and topic.
Invoke it from your client's UI (e.g. the attachment or slash-command menu in Claude Desktop), fill in the parameters, and the rendered text becomes the first message of a new conversation.
Parameters are declared anywhere in the prompt body using this syntax:
<% tp.mcpTools.prompt("parameter_name", "Description shown to the user") %>
This line is stripped from the rendered output, it is a declaration only. The actual value is injected wherever you write {{parameter_name}} in the body. You can use the same name multiple times; the client asks for it once and injects the value everywhere.
Summarize my notes about **{{topic}}** from the past {{days}} days.
Focus on how {{topic}} relates to my long-term goals.
Instead of frontmatter, you can drop an inline #mcp-tools-prompt hashtag anywhere in the body. Both forms are accepted by the server. Use whichever fits your note-taking style.
This section covers the 90% case. For the complete contract (folder naming, frontmatter schema, parameter parsing rules, execution flow, known limitations), see docs/features/prompt-system.md.
The agent can run Obsidian commands on your behalf, the same entries you see in the command palette, but only if you explicitly authorize them. This feature is disabled by default and has no effect until you turn it on.
Two MCP tools are always advertised to the client:
list_obsidian_commands: read-only discovery, always safe. Returns every command registered in the vault (core plus plugins), optionally filtered by a substring. Use this first to find the id of a command you want to allow.execute_obsidian_command: gated. Every call is checked against your allowlist.On top of the allowlist and confirmation flow, execute_obsidian_command is rate-limited to 100 calls per minute (hard limit, server-side tumbling window) to protect the vault from runaway loops. The confirmation modal also surfaces a secondary soft warning at 30 calls/minute, visible to you as a red-bordered notice so you can abort a suspicious burst manually.
If the command id or its human name contains a word commonly associated with data loss (delete, remove, uninstall, trash, clean/cleanup, purge, drop, reset, clear, wipe), the confirmation modal shows a red warning and disables the "Allow always" button. You can still run the command via "Allow once", but the heuristic nudges you to think twice before adding it to your persistent allowlist. This is intentionally a nudge, not a gate: plugin authors use words creatively, so the filter catches the obvious cases and lets everything else through.
Under the Advanced disclosure you can override the soft rate-limit warning threshold (default: 30 calls/minute). When the agent exceeds this rate, the confirmation modal surfaces a red banner so you can spot a runaway loop. The threshold is informational only; the in-process MCP server's hard limit of 100/minute is enforced server-side and is not configurable from the UI.
Every allow/deny decision is appended to a ring buffer of the last 50 invocations, visible under Recent invocations in the same settings section. The audit log includes the command id, the decision, the timestamp, and (for denied calls) the reason. The buffer is pruned automatically so data.json stays bounded.
You can export the current buffer as CSV via the Export CSV button at the top of the Recent invocations list. The download uses the fixed schema timestamp,commandId,decision,reason and is RFC 4180 quoted, so it opens cleanly in Excel, Numbers, LibreOffice, or any standard CSV reader.
editor:* pattern.list_obsidian_commands or the user must paste ids; the allowlist is never populated automatically.data.json. A different vault starts from zero.Failed to connect, ENOENT, or command not found.node and npx are reachable on the path Obsidian inherits when launched from Finder or Spotlight (a common gap on macOS for users who installed Node via Homebrew).Server disconnected; its logs show ECONNREFUSED 127.0.0.1:<port>.claude_desktop_config.json at launch, so closing the window or an in-app restart is not enough. With auto-write on (the default) the plugin keeps the config in sync afterward.claude_desktop_config.json (http://127.0.0.1:<port>/mcp) matches the port the plugin logs on start (Settings, Open Logs), and make sure only one Obsidian vault has the plugin enabled (two instances contend for the port). Then fully restart Claude Desktop again..mcpb baked the HTTP port and bearer token into manifest.json as a literal command, captured once at export. If the plugin later bound to a different port (no Fixed Port set, multiple vaults open) or the token changed, the installed extension kept using the stale values indefinitely..mcpb from Settings, Quick setup for clients, Download .mcpb, and reinstall it in Claude Desktop once. From that version on, the bundle reads the live port and token from the vault at connect time, so it keeps working across a token rotation or a port change with no further re-export.initialize request sent, then 60 seconds of silence and a timeout. Reproducible across restarts and across different MCP servers on the same machine.mcp-remote bridge on Windows, not in the plugin. The plugin answers an identical request in milliseconds over direct HTTP, and Claude Code is unaffected. Tracked upstream at geelen/mcp-remote#296.mcp-remote with the POST-only bridge in scripts/obsidian_mcp_bridge.py, confirmed working on Windows. See docs/windows-post-only-bridge.md for setup, and the Windows note in Quick setup for clients.MCP error -32001: Request timed out. No response, not even the connector's own internal timeout error, ever reaches Claude Desktop first.UtilityProcess sandbox, used when "Use Built-in Node.js for MCP" is on (Settings, Extensions). Not specific to this connector: korotovsky/slack-mcp-server#152 documents an identical failure signature for a different .mcpb extension under the same setting.npx or shell PATH resolution (fixed in v0.27.0), so any system Node.js install works.tool/call returns HTTP 401search_vault_smart call (when provider="native", or "auto" without Smart Connections) downloads ~25 MB from HuggingFace. The model is cached in the browser Cache API; subsequent reloads are instant.Unable to determine content-length from response headers may appear in DevTools console during the first download; onnxruntime-web recovers via an expandable buffer and search results are unaffected.Open the plugin settings, Open Logs under Resources, or look at Obsidian's developer console (Cmd+Opt+I / Ctrl+Shift+I).
This plugin does not ship a platform-specific binary. The MCP server runs in-process inside Obsidian's Electron renderer. Removing the binary closes the supply-chain attack surface that comes with auto-downloading and executing a signed-but-pre-built executable from GitHub Releases.
The MCP server listens on 127.0.0.1:27200. The bind address is hardcoded to loopback; no external network exposure. Bearer-token authentication is required on every request; the token is generated per install and can be rotated from the plugin settings.
data.json (per-vault).app.vault and app.workspace APIs, so Obsidian's permission model applies.Please report security vulnerabilities via our security policy. Do not report security vulnerabilities in public issues.
This project uses a Bun monorepo with a feature-based architecture. For the full architecture contract see docs/project-architecture.md.
packages/
├── obsidian-plugin/ # The plugin: in-process MCP server, registered tools, settings UI, transport
├── shared/ # Shared ArkType schemas and types
└── test-site/ # SvelteKit harness (dev-only, not shipped)
bun install # Install workspace dependencies
bun run check # Type-check every package
bun run dev # Watch all packages
bun run build # Production build
The plugin's main.js is written at the package root (packages/obsidian-plugin/main.js); Obsidian expects that path. Do not move it.
mise.toml)Before contributing, please read our Contributing Guidelines including our community standards and behavioral expectations.
main.bun test
We welcome genuine contributions but maintain strict community standards. Be respectful and constructive in all interactions.
Please read our Contributing Guidelines before posting. We maintain high community standards and have zero tolerance for toxic behavior.
See GitHub Releases and CHANGELOG.md for the detailed changelog.
.mcpb bundle for Claude Desktop. Privacy-first, local-only. Listed on Glama. MIT.[^2]: For more information about the Model Context Protocol, see MCP Introduction.