Obsidian Brain
MCP server by sweir1 Community
Obsidian Brain is a local MCP server that gives AI assistants semantic search, a knowledge graph, and vault editing for an Obsidian vault. It runs as one local process and is for people who want their assistant to work with their notes.
Install Obsidian Brain
Built from the published package, never by AI.
claude mcp add obsidian-brain -e VAULT_PATH=YOUR_VAULT_PATH -- npx -y obsidian-brainRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"obsidian-brain": {
"env": {
"VAULT_PATH": "YOUR_VAULT_PATH"
},
"args": [
"-y",
"obsidian-brain"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"obsidian-brain": {
"env": {
"VAULT_PATH": "YOUR_VAULT_PATH"
},
"args": [
"-y",
"obsidian-brain"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"obsidian-brain": {
"env": {
"VAULT_PATH": "YOUR_VAULT_PATH"
},
"args": [
"-y",
"obsidian-brain"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add obsidian-brain --env VAULT_PATH=YOUR_VAULT_PATH -- npx -y obsidian-brain{
"mcpServers": {
"obsidian-brain": {
"env": {
"VAULT_PATH": "YOUR_VAULT_PATH"
},
"args": [
"-y",
"obsidian-brain"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add obsidian-brain npx -y obsidian-brainGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the obsidian-brain block.
About
Obsidian Brain is a standalone Node MCP server. It reads .md files directly from a vault folder, so Obsidian does not need to be running. It builds a SQLite index with chunk-level embeddings and FTS5 BM25 search, and its default hybrid search combines both with Reciprocal Rank Fusion. The server runs as a local stdio process, and the source says vault content never leaves the machine.
The server exposes 18 tools for finding and reading notes, analysing links and themes, writing and moving notes, and reindexing. A separate optional companion plugin adds live editor tools such as active_note, dataview_query and base_query. The project is aimed at users of Claude Desktop, Claude Code and other MCP clients who want local, private search and editing over an Obsidian vault.
Written from the project's README and checked against it.
Tools it gives your assistant
searchHybrid semantic and keyword search across vault notes, chunk by chunk.list_notesLists notes in the vault.read_noteReads the contents of a single note.find_connectionsFinds notes connected to a given note in the knowledge graph.find_path_betweenFinds a path of links between two notes.detect_themesDetects theme clusters across the vault's notes.rank_notesRanks notes by influence using graph analytics.create_noteCreates a new note in the vault.edit_noteEdits an existing note.apply_edit_previewApplies a previewed edit to a note.
What you need
- Node.js 20 or later
- An Obsidian vault or a folder of .md files
- Claude Desktop or another MCP client
- macOS for the one-line install script
| Setting | Needed | What it is |
|---|---|---|
VAULT_Environment variable | Required | Absolute path to your Obsidian vault (or any folder of .md files). |
DATA_Environment variable | Optional | Where to store the SQLite index. Defaults to $XDG_DATA_HOME/obsidian-brain or ~/.local/share/obsidian-brain. (Downloaded embedding models live in the transformers.js cache — set TRANSFORMERS_CACHE to move it.) |
EMBEDDING_Environment variable | Optional | Preset name: english (default, bge-small-en-v1.5), english-fast, english-quality, multilingual, multilingual-quality, multilingual-ollama, multilingual-openai. Ignored when EMBEDDING_MODEL is set. Default: english |
EMBEDDING_Environment variable | Optional | Power-user override: any transformers.js checkpoint, Ollama model id, or — for EMBEDDING_PROVIDER=openai-compatible — the id of the model the server has loaded. Takes precedence over EMBEDDING_PRESET. Switching auto-reindexes. |
EMBEDDING_Environment variable | Optional | Embedding backend. 'transformers' (local, default), 'ollama' (requires a running Ollama server), or 'openai-compatible' (any server speaking POST /v1/embeddings — llama.cpp's llama-server, LM Studio, vLLM, text-embeddings-inference, or Open Default: transformers |
OLLAMA_Environment variable | Optional | Base URL of a local Ollama server. Only used when EMBEDDING_PROVIDER=ollama. Default: http://localhost:11434 |
OLLAMA_Environment variable | Optional | Override the embedding dimensionality when EMBEDDING_PROVIDER=ollama. If unset, the server probes the model on startup. |
OLLAMA_Environment variable | Optional | Override Ollama's num_ctx for embed requests. Leave UNSET to let obsidian-brain auto-detect via `/api/show`'s `context_length` (e.g. nomic-embed-text=2048, bge-m3=8192, qwen3-embedding:0.6b=32 768). Setting this manually imposes a hard cap |
OBSIDIAN_Environment variable | Optional | Auto-pull the configured Ollama model when /api/show returns 404 (model not present). Default ON — choosing an Ollama-backed preset is implicit consent to download its model. Streams /api/pull progress to stderr. Set to '0' to disable auto- |
OBSIDIAN_Environment variable | Optional | Opt-in to auto-pull for BYOM (custom EMBEDDING_MODEL) Ollama models OUTSIDE Ollama's official `library/` namespace. Default OFF — third-party models (e.g. `user/custom-fork`, `myregistry.com/team/model`) require this env var to be set to `1 |
EMBEDDING_Environment variable | Optional | Base URL of an OpenAI-compatible embedding server. Only used when EMBEDDING_PROVIDER=openai-compatible (or one of its aliases). A trailing '/v1' is optional — it is stripped so both spellings work. Example for llama.cpp: llama-server -m mod Default: http://localhost:8080 |
EMBEDDING_Environment variable | Optional | Override the embedding dimensionality when EMBEDDING_PROVIDER=openai-compatible. If unset, the server learns it by spending one throwaway embed at startup — the OpenAI protocol has no metadata endpoint to ask. Well-known dims: Qwen3-Embeddi |
EMBEDDING_Environment variable | Optional | Bearer token sent to an OpenAI-compatible embedding server. Only used when EMBEDDING_PROVIDER=openai-compatible. Leave unset for a local llama.cpp / LM Studio server, which needs no auth; required when pointing at a hosted endpoint. |
OBSIDIAN_Environment variable | Optional | Set to '1' to disable the live chokidar file watcher. Useful on SMB/NFS vaults where FSEvents/inotify don't fire reliably — fall back to running `obsidian-brain index` on a schedule (launchd/systemd). |
OBSIDIAN_Environment variable | Optional | Set to '1' to skip the startup catchup reindex pass that picks up edits made while the server was down. The live file watcher still starts (via OBSIDIAN_BRAIN_NO_WATCH=1 to disable that separately), and first-time indexing on an empty DB is |
OBSIDIAN_Environment variable | Optional | Folders or files to keep out of the index, in .gitignore syntax: a comma- or newline-separated list, or a JSON array for names that contain commas (e.g. `Claude outputs/, Templates/`). Same rules as a `.obsidianbrainignore` file at the vaul |
OBSIDIAN_Environment variable | Optional | Set to '1' to also skip everything listed in Obsidian's Settings → Files and links → Excluded files (read from `.obsidian/app.json`), matched the way Obsidian matches them. Off by default. |
OBSIDIAN_Environment variable | Optional | Per-file reindex debounce for the live watcher, in milliseconds. Default: 3000 |
OBSIDIAN_Environment variable | Optional | Graph-wide community-detection (Louvain) debounce for the live watcher, in milliseconds. Louvain is the only expensive op — batching it prevents per-edit CPU spikes. Default: 60000 |
OBSIDIAN_Environment variable | Optional | Per-tool-call timeout in milliseconds. Tools exceeding this return an MCP error instead of hanging. Applies to every tool except `reindex`, which keeps its own 10-minute default unless OBSIDIAN_BRAIN_TOOL_TIMEOUT_MS_REINDEX is set. Default: 30000 |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Search my vault for notes about project planning and summarise them.
- Show me the notes that connect most closely to my reading list note.
- Find the main theme clusters in my vault and list their notes.
Good to know
- Live tools active_note, dataview_query and base_query need the optional companion plugin and a running Obsidian.
- First boot downloads a roughly 34 MB embedding model, so tools can take 30 to 60 seconds to appear.
- Server and plugin should share the same major.minor version.
Security check
B- Runs a script automatically when the package is installedIn
package.json:"postinstall":
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Obsidian Brain
All alternatives →Connects a Zotero research library to AI assistants such as Claude and ChatGPT through the Model Context Protocol. It lets the assistant search, read, annotate and add papers, in local mode or through the web API. Built for researchers who want their references available in chat.
AgentDB is a vector memory database for AI agents. It stores embeddings, indexes and learning state in one file and exposes 41 MCP tools to clients such as Claude Code, Cursor and Cline.
Genkitx MCP is listed as a Genkit plugin for Model Context Protocol interoperability. The source is the main Genkit framework README and does not describe this plugin, so its features cannot be confirmed.
QMD is an on-device search engine for markdown notes, meeting transcripts and documentation. It combines BM25 keyword search, vector search and LLM reranking, and exposes an MCP server for AI assistants.
RuVector is a Rust native vector database that gives AI agents persistent memory and local semantic retrieval. Its npm package includes an MCP server for MCP compatible clients, and it suits developers building agent memory in Node.js, Python, or Rust.
Gives AI coding agents persistent memory, so each new session starts where the last one left off. Works with Claude Code, Codex, Cursor, OpenCode and 11 more agents.
Compare with Zotero MCP, Agentdb or Genkitx MCP
Obsidian Brain: common questions
Does Obsidian Brain need the Obsidian app to be running?
No. The source says it reads .md files directly from disk, so Obsidian can be closed. Only the companion plugin tools need Obsidian running.
Does my vault content leave my computer?
The source says vault content never leaves the machine. It runs as one local stdio process with no hosted endpoint or API key.
Do I need the Local REST API plugin?
No. The source says no Local REST API plugin is required for the core experience.
How do I install Obsidian Brain?
In Claude Code run claude mcp add obsidian-brain -e VAULT_PATH=YOUR_VAULT_PATH -- npx -y obsidian-brain. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Obsidian Brain the official server?
Obsidian Brain is a community project by sweir1, not verified by a company domain.
Is Obsidian Brain free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is Obsidian Brain safe to use?
It scores 82 of 100. Grades: maintenance A, licence A, quality C. Security check: grade B (runs a script automatically when the package is installed). Review the code before you install. How grades work.
What are alternatives to Obsidian Brain?
Similar MCP servers: Zotero MCP, Agentdb, Genkitx MCP, Qmd.
Does Obsidian Brain work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
