obsidian-mcp-server
Provides read/write access to an Obsidian vault, including note CRUD, append/delete/move with link rewriting, full-text and semantic search, recent notes, frontmatter read/update, and vault info/listing.
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-server search my vault for notes about the Q3 roadmap"
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-server
MCP server providing read/write access to an Obsidian vault. Supports both local (stdio) and remote (HTTP) transports with OAuth 2.1 and bearer token authentication.
Tools
CRUD Operations
Tool | Description |
| Read a note's content + parsed YAML frontmatter |
| Create or overwrite a note (auto-manages timestamps and attribution in frontmatter; keeps an existing note's frontmatter if you pass none) |
| Append content to a note with separator (ideal for log entries) |
| Soft-delete to |
| Move or rename a note, rewriting links to it in other notes (details) |
Search & Discovery
Tool | Description |
| Full-text search (ripgrep with Node.js fallback) |
| List files/folders in a directory |
| Recently modified notes |
| Read or atomically update frontmatter fields |
| Vault stats and folder structure |
Semantic Search (QMD)
Tool | Description |
| BM25 keyword search — fast, local, always available |
| Embedding-based similarity search (requires |
| BM25 + query expansion + LLM reranking |
| Check QMD index status and embedding availability |
| Update the QMD index after vault changes |
Note: Semantic search tools require QMD to be installed (
npm i -g @tobilu/qmd) and the vault indexed (qmd collection add /path/to/vault --name exobrain). See docs/deployment.md for setup.
Moving notes and links
vault_move keeps the vault's links valid. Unless you pass update_links: false, it rewrites links in
other notes that point at the moved note:
wikilinks and embeds:
[[note]],[[folder/note]],[[../note]],![[note]], with#heading,#^block,|aliasand the escaped pipe used in tables (\|) preservedmarkdown links to notes:
[text](folder/note.md#heading)links inside code blocks and inline code are left alone
A bare [[name]] keeps working after a folder-only move and is renamed when the file name changes. Where a bare
name would become ambiguous it is rewritten as a vault-root path.
Edits are made on the raw text, so the frontmatter of rewritten notes is not re-serialized (bare dates stay bare)
and their modified / last_modified_by are not touched.
Not rewritten, but reported in the result:
notes matching
LINK_REWRITE_SKIP(default:10-identity/**,60-daily/**,**/decisions.md,00-meta/agent-comms/**) are listed underprotected_skippedlinks whose bare name is shared by several notes are listed under
ambiguous
vault_move never overwrites an existing note (ALREADY_EXISTS), and dry_run: true returns the plan without
changing anything. Resolution is case-insensitive, like Obsidian's. Not handled: links to headings that were
renamed, markdown links whose path contains spaces or <>, and links written in HTML.
Related MCP server: Nix
Quick Start
npm install
npm run buildClaude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"obsidian-vault": {
"command": "node",
"args": ["/path/to/obsidian-mcp-server/dist/index.js"],
"env": {
"VAULT_PATH": "/path/to/your/vault"
}
}
}
}Claude Code
claude mcp add obsidian-vault \
-e VAULT_PATH=/path/to/your/vault \
-- node /path/to/obsidian-mcp-server/dist/index.jsRemote (HTTP mode)
# Create .env from template
cp .env.example .env
# Edit .env: set VAULT_PATH, AUTH_TOKEN, SERVER_URL
# Start in HTTP mode
node dist/index.js --transport httpConnect Claude Code remotely:
claude mcp add obsidian-vault \
--transport http \
https://your-server-url/ \
--header "Authorization: Bearer YOUR_TOKEN"Configuration
Variable | Required | Default | Description |
| Yes | — | Absolute path to Obsidian vault root |
| No | — | Static bearer token for Claude Code remote access |
| No |
| HTTP server port |
| No |
| Default agent name for frontmatter attribution |
| No |
| Public URL (for OAuth metadata endpoints) |
| No |
| Comma-separated globs ( |
Deployment
See docs/deployment.md for detailed instructions on:
Raspberry Pi + Tailscale Funnel
Google Cloud Run
Security considerations
Development
npm run dev # Watch mode (recompile on changes)
npm test # Run tests
npm run lint # Type-check without emittingArchitecture
src/
├── index.ts # Entry point (--transport stdio|http)
├── server.ts # McpServer factory + tool registration
├── config.ts # Environment config with Zod validation
├── vault.ts # Filesystem ops, path validation, atomic writes, frontmatter
├── links.ts # Link parsing, resolution and rewriting for vault_move (pure functions)
├── auth/
│ ├── provider.ts # OAuth 2.1 server (TOTP consent gate, redirect allowlist)
│ └── bearer.ts # Dual token verifier (OAuth + static bearer)
├── transport/
│ ├── stdio.ts # Stdio transport (Claude Desktop / Code local)
│ └── http.ts # Express + Streamable HTTP + OAuth routes
├── search/
│ ├── ripgrep.ts # rg subprocess search
│ └── native.ts # Node.js fallback (glob + regex)
└── tools/
├── crud.ts # vault_read/write/append/delete/move
├── search.ts # vault_search/list/recent
└── metadata.ts # vault_frontmatter/infoSecurity
The HTTP transport is meant to be reachable from the public internet, and it requires a TOTP consent gate to start. See SECURITY.md for the threat model, controls and rotation procedure.
License
MIT. See LICENSE.
Available Tools
14 toolsvault_appendAppend to NoteA
Append content to an existing note with a separator. Updates modified timestamp and last_modified_by in frontmatter. Ideal for log entries and incremental additions.
Inputs: path (required), content (required), separator, agent_name.
vault_deleteDelete NoteB
Soft-delete a note by moving it to .trash/. The file can be recovered from .trash/ if needed.
Inputs: path (required).
vault_frontmatterRead/Update FrontmatterA
Read or atomically update specific YAML frontmatter fields on a note without touching the body content. If 'updates' is omitted, returns the current frontmatter. If provided, merges the updates into existing frontmatter.
Inputs: path (required), updates.
vault_grepGrep VaultA
Full-text grep search across vault notes. Uses ripgrep if available, falls back to pure Node.js search. Case-insensitive. Use vault_search for semantic/keyword search instead.
Inputs: query (required), max_results, path_filter.
vault_infoVault InfoA
Get vault statistics: total file count, total size, and top-level directory structure.
Inputs: no named parameters.
vault_listList Vault ContentsB
List files and folders in a vault directory. Excludes .obsidian, .trash, and .git directories.
Inputs: path, depth, pattern, recursive.
vault_moveMove NoteA
Move or rename a note within the vault. Creates destination directories if needed and refuses to overwrite an existing note. By default, links to the note in other notes (wikilinks, embeds, markdown links; alias/#heading/^block kept) are rewritten, so nothing dangles. Notes in protected zones (LINK_REWRITE_SKIP, default: identity, daily notes, decisions.md, agent-comms) are never edited; they are listed in protected_skipped. Ambiguous links (several notes share the name) are listed, not guessed. Use dry_run to preview.
Inputs: to_path (required), from_path (required), dry_run, update_links.
vault_patchPatch NoteA
Replace a unique string in a note with another string. The old_str must appear exactly once in the file content (not frontmatter). Use for surgical edits: updating links, fixing sections, replacing status fields. Updates modified timestamp.
Inputs: path (required), new_str (required), old_str (required), agent_name.
vault_readRead NoteA
Read a note from the vault. Returns parsed YAML frontmatter and body content separately.
Inputs: path (required).
vault_recentRecent NotesA
Get the most recently modified notes in the vault, sorted by modification time (newest first).
Inputs: n, path_filter.
vault_searchSearch Vault (Unified)A
Search vault with multiple modes. 'vector' (default) = semantic similarity via embeddings, best for conceptual queries. 'keyword' = BM25 text matching, best for exact terms/names. Zones filter results to specific vault areas:
meta: 00-meta/ (agent protocols, conventions)
identity: 10-identity/ (Mike's identity, values)
people: 15-people/ (entity files for people)
context: 20-context/ (projects, platforms)
knowledge: 30-knowledge/ (reusable knowledge artifacts)
playbooks: 35-playbooks/ (operational runbooks, how-to guides)
queues: 50-queues/ (task queues)
daily: 60-daily/ (daily notes)
introspection: 70-introspection/ (insights, patterns)
archive: 90-archive/ (completed/inactive items)
Inputs: query (required), mode, zone, max_results, +1 more.
vault_search_statusSearch Index StatusA
Check the status of the vault search index (QMD). Shows whether the index exists, when it was last updated, and if embeddings are available for vector search.
Inputs: no named parameters.
vault_search_updateUpdate Search IndexA
Update the vault search index to reflect recent file changes. Run this after adding or modifying many files to ensure search results are current.
Inputs: no named parameters.
vault_writeWrite NoteA
Create or overwrite a note. Auto-manages created/modified timestamps and created_by/last_modified_by in frontmatter. If the file exists, preserves original created/created_by values, and keeps its existing frontmatter when you pass none. A non-empty frontmatter object REPLACES the existing fields (use vault_frontmatter to change individual fields).
Inputs: path (required), content (required), agent_name, create_dirs, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool targets a distinct operation (read, write, patch, append, delete, move, frontmatter, search, list, info). The one real overlap is vault_grep vs vault_search, but the descriptions explicitly differentiate them (grep = exact full-text, search = vector/BM25), and vault_read vs vault_frontmatter differ by scope. Minor residual ambiguity but well handled.
Every tool follows the vault_<noun/verb> snake_case pattern consistently (vault_read, vault_write, vault_search_status, vault_frontmatter). No mixed conventions or inconsistent casing.
14 tools sits comfortably within a well-scoped range. Each tool earns its place—core CRUD, navigation, and search/indexing are all represented without redundancy.
Full note lifecycle is covered: create/overwrite, surgical edits, append, soft-delete, move/rename with link rewriting, and frontmatter management, plus multiple search modes and index maintenance. Minor gaps remain (no directory-level create/rename/delete, no tag or backlink-graph query), but agents can work around these.
Maintenance
Related MCP Connectors
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
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…
Search, read, and safely update Markdown notes in your connected Phasoric knowledge vaults.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI coding agents to read, write, search, and organize notes in an Obsidian vault directly via the filesystem.13MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to search, read, create, update, and delete notes in a local Obsidian vault through hybrid semantic and lexical retrieval, with all embedding and vector storage running locally.1MIT
- AlicenseAqualityDmaintenanceEnables AI agents to use Obsidian vaults as persistent, bidirectional knowledge workspaces with wikilink/backlink resolution, structured frontmatter/tag indexing, task aggregation, and Obsidian Headless Sync.11MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to store and retrieve durable memory as markdown notes in an Obsidian vault, with full-text and semantic search, wikilink graph operations, and human-auditable, editable storage.MIT