obsidian-mcp
Provides tools for interacting with Obsidian vaults, including searching, reading, writing, and managing notes, tags, backlinks, daily notes, and vault settings, with support for multiple vaults and fallback to filesystem access when Obsidian is closed.
Click on "Install 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-mcpFind notes with tag 'meeting' across my vaults"
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
A FastMCP server for multiple Obsidian vaults. It talks to the Obsidian Local REST API plugin when Obsidian is running, and falls back to direct filesystem access when it isn't — so your notes stay reachable whether or not the app is open.
Every tool takes an optional vault argument, and obsidian_switch_vault sets the default for unqualified calls.
Why both backends
REST (Obsidian running) | Filesystem (always) | |
Search | Obsidian's own index and ranking | substring scan, all terms must match |
Tags | resolved by Obsidian, with counts | parsed from frontmatter + inline |
Backlinks | ✅ from the link graph | ❌ not available |
Active note / open in UI / commands | ✅ | ❌ |
Works with Obsidian closed | ❌ | ✅ |
Works on a headless box or over SSH | ❌ | ✅ |
The router probes REST health once and caches the result for OBSIDIAN_HEALTH_TTL seconds, so a closed Obsidian doesn't cost a failed connection on every call. If REST drops mid-call it retries on the filesystem automatically. Errors that mean "what you asked for doesn't exist" (missing note, bad path) are not retried — falling back would just fail again, slower.
Every response reports which backend served it, so a caller can tell whether it's seeing Obsidian's view or the raw files.
Related MCP server: Obsidian MCP Server
Setup
git clone <your-repo> obsidian-mcp && cd obsidian-mcp
uv venv && uv pip install -e ".[dev]" # or: pip install -e ".[dev]"
pytestRequires Python 3.11+. Works with MCP Python SDK 1.x (FastMCP) and 2.x (MCPServer) — _sdk.py papers over the rename.
Configuring vaults
Define vaults using whichever of these fits; the first one present wins.
A TOML file (best for 3+ vaults) — OBSIDIAN_VAULTS_FILE=~/.config/obsidian-mcp/vaults.toml:
default = "personal"
[vaults.personal]
path = "/Users/you/Vaults/Personal"
description = "Homelab, hobbies"
daily_folder = "Journal"
[vaults.work]
path = "/Users/you/Vaults/Work"
description = "Employer notes"
rest_base_url = "https://127.0.0.1:27125" # note: NOT the default port
api_key = "this-vault's-own-key"Inline JSON — OBSIDIAN_VAULTS='{"default":"work","vaults":{...}}'. Accepts port/protocol/host shorthand instead of rest_base_url, and camelCase keys, so configs from other Obsidian MCP servers mostly paste straight in.
Per-vault env vars — OBSIDIAN_VAULT_WORK_PATH, OBSIDIAN_VAULT_WORK_API_KEY, OBSIDIAN_VAULT_WORK_REST_BASE_URL, etc. The segment between OBSIDIAN_VAULT_ and the field name is the vault name.
Legacy single-vault vars — OBSIDIAN_VAULT_PATH / OBSIDIAN_REST_BASE_URL / OBSIDIAN_API_KEY still work and define one vault named default.
⚠️ One port per vault
Every vault's Local REST API plugin defaults to port 27124, and only one process can bind a port. If you run two vaults at once, open each vault's Settings → Local REST API → Advanced and give it a unique port (27124, 27125, 27126…), then toggle the plugin off and on.
Each vault also generates its own API key, so a mismatched port usually shows up as a 401 rather than silently reading the wrong vault. To check positively:
obsidian_backend_status(verify=true)That cross-checks each vault's REST root listing against its configured path and warns if they disagree.
Per-vault settings
path, rest_base_url, api_key, verify_ssl, ca_cert, daily_folder, daily_format, description
Global settings
Variable | Default | Notes |
| first defined | Overrides |
|
| Set |
|
| Disables every mutating tool, across all vaults. |
|
| Refuse to read anything larger. |
|
| Seconds to cache each vault's REST health probe. |
|
| Per-request timeout in seconds. |
To trust the plugin's cert rather than disabling verification, per vault:
curl -k https://127.0.0.1:27125/obsidian-local-rest-api.crt -o ~/.config/obsidian-mcp/work.crt
# then in vaults.toml: ca_cert = "~/.config/obsidian-mcp/work.crt" and verify_ssl = trueRegister it
Claude Code:
claude mcp add obsidian -- \
uv --directory /path/to/obsidian-mcp run obsidian-mcpThen set the env vars in .mcp.json or your shell profile.
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"obsidian": {
"command": "uv",
"args": ["--directory", "/path/to/obsidian-mcp", "run", "obsidian-mcp"],
"env": {
"OBSIDIAN_VAULTS_FILE": "/Users/you/.config/obsidian-mcp/vaults.toml"
}
}
}
}Tools
Vaults — obsidian_list_vaults, obsidian_switch_vault
Reads — obsidian_list_notes, obsidian_read_note, obsidian_search_notes, obsidian_list_tags, obsidian_get_active_note*, obsidian_backend_status
Writes — obsidian_write_note, obsidian_append_to_note, obsidian_patch_note, obsidian_append_to_daily_note, obsidian_move_note, obsidian_delete_note
App control — obsidian_open_note, obsidian_list_commands, obsidian_run_command*
* requires Obsidian to be running. These deliberately do not fall back — they return a message telling you to start Obsidian, rather than silently doing something different from what you asked.
All 17 tools accept an optional vault. Targeting works two ways, on purpose:
Per-call —
obsidian_search_notes(vault="work", query="..."). Explicit and stateless; the right choice when a task spans vaults.Session default —
obsidian_switch_vault(vault="work")changes where unqualified calls go, so a long stretch of work in one vault doesn't repeat the argument.
A per-call vault always overrides the session default. Switching affects this server session only — it doesn't touch any vault's contents or change which vault Obsidian has open.
obsidian_backend_status is the one to call first when something fails with a connectivity error; with no vault named it probes all of them and reports which backends are live.
Safety choices
Deletes are recoverable by default.
obsidian_delete_notemoves the note to the vault's.trash, restorable from inside Obsidian.permanent=trueis opt-in. Because the plugin'sDELETEis unconditional, trashing is routed through the filesystem backend even when REST is live.Absolute paths and
..traversal are rejected, not silently rewritten. Resolved paths are checked against the vault root.obsidian_write_notewon't clobber an existing note withoutoverwrite=true.OBSIDIAN_READ_ONLY=truedisables every mutating tool in one switch — useful for a research-only session.
Known limitations
Moving a note does not rewrite wikilinks. Only Obsidian does that, and only for moves made inside the app. Search for the old name afterwards if it matters.
Frontmatter patches reformat the YAML block. Values round-trip through PyYAML, so
tags: [a, b]comes back as a block list. Content is preserved; formatting isn't.Filesystem search has no fuzzy matching or ranking beyond a title-match boost. When Obsidian is running you get its real index instead.
The filesystem backend doesn't see unsaved editor buffers. A note being actively edited may be stale on disk by a few seconds.
Cross-vault operations aren't atomic.
obsidian_move_noteworks within one vault only; moving between vaults means read, write, delete as separate calls.obsidian_get_active_noteis per-vault, and only answers for a vault whose Obsidian window is open with the plugin bound to that vault's configured port.
Worth knowing before you build on this
As of v3+, the Local REST API plugin ships its own built-in MCP server at https://127.0.0.1:27124/mcp/ (streamable HTTP, bearer auth). If all you want is Obsidian access while Obsidian is running, point your client at that and skip this project entirely.
This server earns its place when you want the things that one can't do: working with the vault while Obsidian is closed, running on a headless machine, read-only enforcement, trash-by-default deletes, or custom workflow tools shaped around your own vault conventions.
Development
pytest # 40 tests, no Obsidian required
ruff check obsidian_mcp tests
npx @modelcontextprotocol/inspector uv --directory . run obsidian-mcpThe test suite fakes the REST backend, so fallback and multi-vault routing are covered without a running Obsidian.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceEnables AI assistants to interact with Obsidian vaults, providing tools for reading, creating, editing and managing notes and tags.3,860720MIT
- AlicenseAqualityDmaintenanceConnects to Obsidian vaults via the Local REST API plugin, enabling AI-assisted Zettelkasten workflows including creating atomic notes, searching content, managing links and tags, and performing precise content editing operations.13MIT
- FlicenseAqualityDmaintenanceEnables comprehensive management of Obsidian vaults with full CRUD operations, advanced search, link/tag extraction, backlinks discovery, frontmatter editing, and template-based note creation through natural language.16
- Flicense-quality-maintenanceEnables AI assistants to read, write, search, and navigate Obsidian vault notes with support for CRUD operations, full-text search, graph navigation, daily notes, and frontmatter management.3,860
Related MCP Connectors
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Search your Obsidian vault to quickly find notes by title or keyword, summarize related content, a…
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shaynemeyer/obsidian-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server