
obsidian-brain
io.github.sweir1/obsidian-brain
Obsidian MCP server: semantic search, knowledge graph, and vault editing. No plugin required.
Documentation
obsidian-brain
A standalone Node MCP server that gives Claude (and any other MCP client) semantic search + knowledge graph + vault editing over an Obsidian vault. Runs as one local stdio process โ no plugin, no HTTP bridge, no API key, nothing hosted. Your vault content never leaves your machine.
๐ Full docs โ obsidianbrain.dev Companion plugin โ
sweir1/obsidian-brain-plugin(optional โ unlocksactive_note,dataview_query,base_query)
Contents โ Why ยท Quick start ยท What you get ยท How it works ยท Companion plugin ยท Troubleshooting ยท Recent releases
Why obsidian-brain?
- Works without Obsidian running โ unlike Local REST API-based servers, obsidian-brain reads
.mdfiles directly from disk. Obsidian can be closed; your vault is just a folder. - No Local REST API plugin required โ nothing to install inside Obsidian for the core experience.
- Chunk-level semantic search with RRF hybrid retrieval โ embeddings at markdown-heading granularity, fused with FTS5 BM25 via Reciprocal Rank Fusion. Finds the exact chunk, ranks on meaning.
- Graph analytics built in โ PageRank, Louvain communities and shortest paths over your links: ask for your vault's most influential notes, the notes that bridge topics, or its theme clusters.
- Ollama provider for high-quality local embeddings โ switch to
qwen3-embedding:0.6b,nomic-embed-text,bge-m3, etc. with one env var. - llama.cpp / LM Studio / vLLM / TEI support โ point
EMBEDDING_PROVIDER=llamacppat any OpenAI-compatible/v1/embeddingsserver and use the GGUF weights you already have. - All in one
npxinstall โ no clone, no build, no API key, no hosted endpoint. Vault content never leaves your machine.
Quick start
One-line install (macOS + Claude Desktop)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/sweir1/obsidian-brain/main/scripts/install.sh)"
Installs Homebrew + Node 22.12+ if you don't already have them, adds the /usr/local/bin symlinks that Claude Desktop needs, merges obsidian-brain into your claude_desktop_config.json, opens the Full Disk Access pane for you to toggle Claude on, and relaunches Claude. You'll be asked for your macOS password once (for Homebrew + the symlinks) and your vault path once. Everything else is automatic. Audit what it does: scripts/install.sh.
Manual install
Requires Node 22.12+ and an Obsidian vault (or any folder of .md files โ Obsidian itself is optional).
Wire obsidian-brain into your MCP client. Example for Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"obsidian-brain": {
"command": "npx",
"args": ["-y", "obsidian-brain@latest", "server"],
"env": { "VAULT_PATH": "/absolute/path/to/your/vault" }
}
}
}
Quit Claude Desktop (โQ on macOS) and relaunch. That's it.
[!NOTE] On first boot the server downloads a ~34 MB embedding model and indexes your vault in the background. The tools appear in the client straight away; until the model is ready, semantic search answers with a "preparing" status, and full-text search finds notes once they're indexed. Indexing takes under a minute for a small vault and a few minutes for thousands of notes. Subsequent boots are instant.
[!TIP] Not a developer? The macOS walkthrough covers Homebrew, Node, the GUI-app PATH fix, and Full Disk Access step-by-step.
For every other MCP client (Claude Code, Cursor, VS Code, Jan, Windsurf, Cline, Zed, LM Studio, JetBrains AI, Opencode, Codex CLI, Gemini CLI, Warp): see Install in your MCP client.
โ Full env-var reference: Configuration โ Model / preset / Ollama details: Embedding model
What you get
obsidian-brain has 19 MCP tools, grouped by intent:
- Find & read โ
search,list_notes,read_note - Understand the graph โ
find_connections,find_path_between,detect_themes,rank_notes - Write โ
create_note,edit_note,apply_edit_preview,link_notes,move_note,delete_note - Live editor (requires companion plugin) โ
active_note,dataview_query,base_query - Maintenance โ
reindex,index_status,vault_health
โ Arguments, examples, and response shapes: Tool reference
How it works
flowchart LR
Client["<b>MCP Client</b><br/>Claude Desktop ยท Claude Code<br/>Cursor ยท Jan ยท Windsurf ยท ..."]
subgraph OB ["obsidian-brain (Node process)"]
direction TB
SQL["<b>SQLite index</b><br/>nodes ยท edges<br/>FTS5 ยท vec0 embeddings"]
Vault["<b>Vault on disk</b><br/>your .md files"]
Vault -->|"parse + embed"| SQL
SQL -.->|"writes"| Vault
end
Client <-->|"stdio JSON-RPC"| OB
Retrieval and writes both go through a SQLite index: reads are microsecond-cheap, writes land on disk immediately and incrementally re-index the affected file. Embeddings are chunk-level (heading-aware recursive chunker preserving code + LaTeX blocks), and search's default hybrid mode fuses chunk-level semantic rank with FTS5 BM25 via Reciprocal Rank Fusion.
โ Deeper write-up โ why stdio, why SQLite, why local embeddings: Architecture โ Live watcher behaviour + debounces: Live updates โ Scheduled reindex (macOS launchd / Linux systemd): Scheduled indexing (macOS) ยท (Linux)
Companion plugin (optional)
An optional Obsidian plugin at sweir1/obsidian-brain-plugin exposes live Obsidian runtime state โ active editor, Dataview results, Bases rows โ over a localhost HTTP endpoint. When installed and Obsidian is running, active_note, dataview_query, and base_query light up. Install via BRAT with repo ID sweir1/obsidian-brain-plugin.
Keep the plugin's major.minor version the same as the server's. Patch versions can differ.
โ Security model, capability handshake, Dataview / Bases feature coverage: Companion plugin
Troubleshooting
Four most common:
- "Connector has no tools available" in Claude Desktop โ usually the server crashed at startup. Check
~/Library/Logs/Claude/mcp-server-obsidian-brain.log. Fix:rm -rf ~/.npm/_npxto clear a half-updated npx cache, quit Claude (โQ), relaunch. ERR_DLOPEN_FAILED/NODE_MODULE_VERSIONmismatch โbetter-sqlite3built against a different Node ABI. Fix:PATH=/opt/homebrew/bin:$PATH npm rebuild -g better-sqlite3.VAULT_PATH is not setโ the server doesn't know where your vault is. Set it in theenvblock of your client config or shell.- Old version loading via
npx(your client still shows the previous release after a publish) โ stale npx cache. Fix:rm -rf ~/.npm/_npx, then restart your client. Keeping@latestin your config prevents this.
โ Full troubleshooting guide (watcher not firing, stale index, running multiple clients, timeouts, embedding-dim mismatch, log locations): docs/troubleshooting.md
Recent releases
- v1.8.5 (2026-11-30) โ no more cut-off chunks, better whole-note vectors,
read_notereturns whole notes, and safer write tools - v1.8.4 (2026-11-30) โ moved notes never drop out of the index, the model list can't be rolled back, and the seed build handles every Hugging Face failure
- v1.8.3 (2026-11-29) โ write tools stay inside the vault, notes keep their formatting, faster indexing
- v1.8.2 (2026-11-27) โ exclude folders from the index, and
base_querythat works on current Obsidian - v1.8.1 (2026-11-26) โ test suite can no longer touch your real index
โ Full changelog: docs/CHANGELOG.md ยท Forward plan: docs/roadmap.md ยท Build from source: docs/development.md
Related projects
apple-notes-brainโ sibling MCP server for Apple Notes on macOS: read, write, and search with full Markdown round-trip in both directions.
License
Apache License 2.0 โ Copyright 2026 sweir1.
obsidian-brainnpm install obsidian-brain