Back to Browse

Obsidian Brain MCP Server

by Sweir1
Productivity10.0Low riskMCP RegistryLocal
Free

Server data from the Official MCP Registry

Obsidian MCP server: semantic search, knowledge graph, and vault editing. No plugin required.

About

Obsidian MCP server: semantic search, knowledge graph, and vault editing. No plugin required.

At a glance

Runs
On your computer, from the npm package obsidian-brain, which we verified belongs to this listing.
Works with
Claude Desktop, Claude Code, Grok Build (formerly Cursor), Windsurf, VS Code, Codex, Antigravity CLI, Gemini CLI, ChatGPT.
Can access
  • Runs commands on your computer

Security report

How we score
10.0out of 10Low riskMCP Marketplace security score

Valid MCP server (1 strong, 1 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.

8 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

file_system

Check that this permission is expected for this type of plugin.

database

Check that this permission is expected for this type of plugin.

env_vars

Check that this permission is expected for this type of plugin.

Shell Command Execution

Runs commands on your machine. Only use it if you trust this plugin.

What You'll Need

Set these up before or after installing:

Absolute path to your Obsidian vault (or any folder of .md files).Optional

Environment variable: VAULT_PATH

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.)Optional

Environment variable: DATA_DIR

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.Optional

Environment variable: EMBEDDING_PRESET

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.Optional

Environment variable: EMBEDDING_MODEL

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 OpenAI itself). Aliases for the last one: openai, llamacpp, llama-cpp, llama.cpp, lmstudio, lm-studio, vllm, tei.Optional

Environment variable: EMBEDDING_PROVIDER

Base URL of a local Ollama server. Only used when EMBEDDING_PROVIDER=ollama.Optional

Environment variable: OLLAMA_BASE_URL

Override the embedding dimensionality when EMBEDDING_PROVIDER=ollama. If unset, the server probes the model on startup.Optional

Environment variable: OLLAMA_EMBEDDING_DIM

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 and may silently truncate longer inputs — see https://github.com/ollama/ollama/issues/14259. Ollama's own default is 2048 which truncates for any model trained on a larger context. See also https://github.com/ollama/ollama/issues/7008. Fallback when both env is unset AND /api/show is unreachable: 8192.Optional

Environment variable: OLLAMA_NUM_CTX

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-pull entirely (master kill-switch) and fall back to the actionable error path (`HTTP 404 — try: ollama pull <model>`).Optional

Environment variable: OBSIDIAN_BRAIN_OLLAMA_AUTO_PULL

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` before they will auto-pull, to prevent silent downloads of arbitrary user-named artifacts. Preset-known models (via EMBEDDING_PRESET) and bare model ids in the official library (e.g. `qwen3-embedding:0.6b`, `library/llama3:8b`) continue to auto-pull by default per the existing OBSIDIAN_BRAIN_OLLAMA_AUTO_PULL behavior.Optional

Environment variable: OBSIDIAN_BRAIN_OLLAMA_BYOM_AUTO_PULL

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 model.gguf --embedding --pooling last --port 8080.Optional

Environment variable: EMBEDDING_BASE_URL

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-Embedding-0.6B = 1024, Qwen3-Embedding-4B = 2560, Qwen3-Embedding-8B = 4096, bge-m3 = 1024.Optional

Environment variable: EMBEDDING_DIM

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.Optional

Environment variable: EMBEDDING_API_KEY

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).Optional

Environment variable: OBSIDIAN_BRAIN_NO_WATCH

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 unaffected — this knob only governs the post-restart `enqueueBackgroundReindex` walk.Optional

Environment variable: OBSIDIAN_BRAIN_NO_CATCHUP

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 vault root, applied after it. Excluded notes stay on disk; already-indexed ones are removed on the next catch-up or reindex.Optional

Environment variable: OBSIDIAN_BRAIN_IGNORE

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.Optional

Environment variable: OBSIDIAN_BRAIN_HONOR_EXCLUDED_FILES

Per-file reindex debounce for the live watcher, in milliseconds.Optional

Environment variable: OBSIDIAN_BRAIN_WATCH_DEBOUNCE_MS

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.Optional

Environment variable: OBSIDIAN_BRAIN_COMMUNITY_DEBOUNCE_MS

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.Optional

Environment variable: OBSIDIAN_BRAIN_TOOL_TIMEOUT_MS

Override the chunk-size budget (in tokens). When set, this beats the capacity probed from the model's tokenizer or Ollama /api/show, and the 512-token cap applied to models whose window exceeds 1,024 tokens. Use to choose larger chunks for a long-context model, or for models with stale tokenizer configs.Optional

Environment variable: OBSIDIAN_BRAIN_MAX_CHUNK_TOKENS

Override the per-user config directory where obsidian-brain stores model overrides (`model-overrides.json`) and the user-fetched seed (`seed-models.json`). Default is `$XDG_CONFIG_HOME/obsidian-brain` on macOS/Linux (or `~/.config/obsidian-brain`) and `%APPDATA%/obsidian-brain` on Windows. Both files survive `npm update obsidian-brain` because they live outside the package.Optional

Environment variable: OBSIDIAN_BRAIN_CONFIG_DIR

Set to "1" to print a verbose synchronous startup trace to stderr — every preflight, createContext, server.connect, and shutdown step is logged with a monotonic timestamp. The LAST line before any silent failure tells you exactly which step the server reached. No-op when unset (no overhead). Use to diagnose silent-crash failure modes.Optional

Environment variable: OBSIDIAN_BRAIN_DEBUG

Set to 'ndjson' for one-JSON-object-per-line stderr output (timestamp + level + message + structured fields). Default is human-readable plain text (`obsidian-brain: <message>`). Useful for piping logs into aggregators (Datadog, Loki, Vector, journald) that index structured fields.Optional

Environment variable: OBSIDIAN_BRAIN_LOG_FORMAT

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "obsidian-brain": {
      "command": "npx",
      "args": [
        "-y",
        "obsidian-brain@1.8.5"
      ],
      "env": {
        "DATA_DIR": "your-data-dir-here",
        "VAULT_PATH": "your-vault-path-here",
        "EMBEDDING_DIM": "your-embedding-dim-here",
        "OLLAMA_NUM_CTX": "your-ollama-num-ctx-here",
        "EMBEDDING_MODEL": "your-embedding-model-here",
        "OLLAMA_BASE_URL": "your-ollama-base-url-here",
        "EMBEDDING_PRESET": "your-embedding-preset-here",
        "EMBEDDING_API_KEY": "your-embedding-api-key-here",
        "EMBEDDING_BASE_URL": "your-embedding-base-url-here",
        "EMBEDDING_PROVIDER": "your-embedding-provider-here",
        "OBSIDIAN_BRAIN_DEBUG": "your-obsidian-brain-debug-here",
        "OLLAMA_EMBEDDING_DIM": "your-ollama-embedding-dim-here",
        "OBSIDIAN_BRAIN_IGNORE": "your-obsidian-brain-ignore-here",
        "OBSIDIAN_BRAIN_NO_WATCH": "your-obsidian-brain-no-watch-here",
        "OBSIDIAN_BRAIN_CONFIG_DIR": "your-obsidian-brain-config-dir-here",
        "OBSIDIAN_BRAIN_LOG_FORMAT": "your-obsidian-brain-log-format-here",
        "OBSIDIAN_BRAIN_NO_CATCHUP": "your-obsidian-brain-no-catchup-here",
        "OBSIDIAN_BRAIN_TOOL_TIMEOUT_MS": "your-obsidian-brain-tool-timeout-ms-here",
        "OBSIDIAN_BRAIN_MAX_CHUNK_TOKENS": "your-obsidian-brain-max-chunk-tokens-here",
        "OBSIDIAN_BRAIN_OLLAMA_AUTO_PULL": "your-obsidian-brain-ollama-auto-pull-here",
        "OBSIDIAN_BRAIN_WATCH_DEBOUNCE_MS": "your-obsidian-brain-watch-debounce-ms-here",
        "OBSIDIAN_BRAIN_HONOR_EXCLUDED_FILES": "your-obsidian-brain-honor-excluded-files-here",
        "OBSIDIAN_BRAIN_COMMUNITY_DEBOUNCE_MS": "your-obsidian-brain-community-debounce-ms-here",
        "OBSIDIAN_BRAIN_OLLAMA_BYOM_AUTO_PULL": "your-obsidian-brain-ollama-byom-auto-pull-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

obsidian-brain

npm version License: Apache 2.0 Node ≥ 22.12 GitHub stars

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 — unlocks active_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 .md files 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=llamacpp at any OpenAI-compatible /v1/embeddings server and use the GGUF weights you already have.
  • All in one npx install — 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/_npx to clear a half-updated npx cache, quit Claude (⌘Q), relaunch.
  • ERR_DLOPEN_FAILED / NODE_MODULE_VERSION mismatch — better-sqlite3 built 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 the env block 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 @latest in 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_note returns 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_query that 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.

Reviews

No reviews yet

Be the first to review this server!