Obsidian Brain MCP Setup & Guide
io.github.sweir1/obsidian-brain · v1.7.24
Obsidian MCP server: semantic search, knowledge graph, and vault editing. No plugin required.
Copy the install config on this page first, then verify docs and permissions upstream.
Overview
Obsidian MCP server: semantic search, knowledge graph, and vault editing. No plugin required. Obsidian Brain is a MCP Server listed from MCP Registry. Transports: stdio. This page includes an overview, setup tutorial, install commands, and use cases for Trae, Tongyi Lingma, Cursor, Claude Code, and VS Code.
Use cases
AgentHub Verified AvailabilityTested & Ready
Automated pipeline validated install commands, protocol & client compatibility
Copy by platform
Choose your platform
- Open or create .cursor/mcp.json in your project root
- Click Copy config and paste; merge only this mcpServers entry if others exist
- Replace <placeholders> in env with real secrets (see Environment variables below)
- Save, then Cmd+Shift+P → Reload Window
Pre-fill Environment Variables (Optional)
{
"mcpServers": {
"obsidian-brain": {
"command": "npx",
"args": [
"-y",
"obsidian-brain"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}Setup tutorial
- Open the Obsidian Brain page and confirm this MCP Server (source: MCP Registry).
- Copy the Cursor, Claude Code, or VS Code snippet.
- Merge it into mcpServers and replace env placeholders with real secrets.
- Reload the window, then call the MCP tools from your agent chat.
Install commands
Install commands and setup steps are in the HTML so search engines and no-JS browsers can read them without running client JavaScript.
Claude Code (local)
- Install Claude Code CLI
- Copy the command below, replace <placeholders> with real env values, then run in terminal
- See Environment variables below if listed
claude mcp add obsidian-brain --env VAULT_PATH=<VAULT_PATH> -- npx -y obsidian-brainCursor — .cursor/mcp.json (local)
- Open or create .cursor/mcp.json in your project root
- Click Copy config and paste; merge only this mcpServers entry if others exist
- Replace <placeholders> in env with real secrets (see Environment variables below)
- Save, then Cmd+Shift+P → Reload Window
{
"mcpServers": {
"obsidian-brain": {
"command": "npx",
"args": [
"-y",
"obsidian-brain"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}VS Code — .vscode/mcp.json (local)
- Install GitHub Copilot in VS Code with MCP support
- Open or create .vscode/mcp.json in your project root
- Click Copy config and paste; merge only this mcpServers entry if others exist
- Replace <placeholders> in env with real secrets
- Save and Developer: Reload Window
{
"mcpServers": {
"obsidian-brain": {
"command": "npx",
"args": [
"-y",
"obsidian-brain"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}Claude Desktop — claude_desktop_config.json (local)
- Open Claude Desktop claude_desktop_config.json (see remote guide for paths)
- Click Copy config and merge under mcpServers
- Replace <placeholders> in env with real secrets
- Fully quit and restart Claude Desktop
{
"mcpServers": {
"obsidian-brain": {
"command": "npx",
"args": [
"-y",
"obsidian-brain"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}Trae — .trae/mcp.json (local)
- Trae → Settings → MCP, or edit .trae/mcp.json / global mcp.json
- Click Copy config and merge mcpServers
- Replace <placeholders> in env with real secrets
- Save and reload Trae
{
"mcpServers": {
"obsidian-brain": {
"command": "npx",
"args": [
"-y",
"obsidian-brain"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}Cherry Studio — MCP settings (local)
- Cherry Studio → Settings → MCP Servers → Add (STDIO)
- Or import JSON: click Copy config and merge mcpServers
- Replace <placeholders> in env; ensure Node.js / uv (npx, uvx) are installed
- Enable the server and check tools load
{
"mcpServers": {
"obsidian-brain": {
"command": "npx",
"args": [
"-y",
"obsidian-brain"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}Tongyi Lingma — MCP config (local)
- Lingma Settings → MCP → + → STDIO or config file
- Click Copy config and merge mcpServers
- Replace <placeholders> in env; need Node.js 18+ (npx) or uv (uvx)
- Confirm connected before using tools in agent chat
{
"mcpServers": {
"obsidian-brain": {
"command": "npx",
"args": [
"-y",
"obsidian-brain"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}Windsurf — mcp_config.json (local)
- Edit ~/.codeium/windsurf/mcp_config.json
- Click Copy config and merge mcpServers (stdio same as Cursor)
- Replace <placeholders> in env, save, refresh Cascade
{
"mcpServers": {
"obsidian-brain": {
"command": "npx",
"args": [
"-y",
"obsidian-brain"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}Cline — MCP Servers (local)
- Cline panel → Settings → MCP Servers
- Click Copy config and merge
- Replace <placeholders> in env, then save
{
"mcpServers": {
"obsidian-brain": {
"command": "npx",
"args": [
"-y",
"obsidian-brain"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}WorkBuddy — .workbuddy/mcp.json (local)
- Edit ~/.workbuddy/mcp.json (user) or project .workbuddy/mcp.json
- Or Plugins → MCP Servers → Configure MCP and paste the JSON below
- Replace <placeholders> in env; on Windows prefer absolute paths for command/scripts
- Save, restart WorkBuddy, confirm connector status is green
{
"mcpServers": {
"obsidian-brain": {
"command": "npx",
"args": [
"-y",
"obsidian-brain"
],
"env": {
"VAULT_PATH": "<VAULT_PATH>"
}
}
}
}Troubleshooting & Common ErrorsFAQ
Common connection errors and verified fixes for Obsidian Brain
Getting 'connection closed' or exit code 1 in Cursor / Claude Code for Obsidian Brain?
Usually caused by missing runtime paths or IDE environment inheritance. Fix steps: 1. Verify Node.js 18+ (npx) or Python 3.10+ (uvx) is installed; 2. Run 'which npx' or 'which uvx' in terminal, and replace 'command' with absolute path; 3. Reload or restart the client window after modifying config.
# Check binary path in terminal: which npx node -v
Getting 'spawn npx ENOENT' or 'command not found'?
The editor background process does not inherit your full terminal PATH. Solution: Globally install the package, or set the absolute binary path (e.g. C:\Program Files\nodejs\npx.cmd on Windows, or /usr/local/bin/npx on macOS).
Missing required environment variable or authentication failure?
Obsidian Brain requires environment variables (VAULT_PATH). Ensure you have added valid keys under the 'env' object in your config file without trailing whitespace.
// .cursor/mcp.json 或 claude_desktop_config.json
{
"env": {
"VAULT_PATH": "your_actual_key_here"
}
}Tool Mock Playground
SandboxObsidian Brain Tool Interface Simulation · Preview tool schema & outputs without local runtime
{
"target": "Obsidian Brain",
"action": "execute",
"options": {
"mode": "standard",
"timeoutMs": 5000
}
}Click 'Run Mock' above
to preview the raw response returned to the LLM
Decision Guide: Why & When to Use
Assess suitability before installing to save trial-and-error time
- PR review
- Changelog generation
- Cross-repo issue search
- Replacing human security audit
- Unauthorized repo access
Obsidian Brain + Scenario Prompt → Complete Agent Automation
MCP hands-on: install to visible results
Follow the full lab (expected UI/output + contrast checks). After installing this item, verify with the tutorial prompts.
Related resources
Kryptonian Labs XRPL APIs
v0.8.0
com.kriptonianlabs/xrpl
Read-only XRP Ledger data for agents: fees, order books, slippage, AMM pools, accounts and health.
Linkbreakers MCP
v1.158.2
com.linkbreakers/mcp
QR-driven customer-journey platform for tracked QR codes, short links, and analytics.
McpOrchestrator
v0.6.1
io.github.Byggarepop/dotnet-mcp-orchestrator
Route one agent through one MCP server to many, with progressive tool discovery to shrink context.
benethos-yahoo-finance-mcp
v0.8.4
io.github.benethos-hub/benethos-yahoo-finance-mcp
Unofficial read-only MCP server exposing Yahoo Finance data (via yfinance) over stdio or HTTP.
keryx
v0.4.15
io.github.tang-vu/keryx
Budgeted research with cited evidence and visible payment state on the selected Arc network.
Open Components
v1.0.0
com.uxfront/open-components
Guidelines for UI components with a perfect UX, DX and AX, whether humans or AI agents write them.
Often paired with
Planning with files
v3.23.0
io.clawhub.othmanadi/planning-with-files
Persistent file-based planning for multi-step AI-agent work. Keeps task_plan.md, findings.md, and progress.md on disk; lifecycle hooks inject selected project planning context. Automatic recovery reads project planning files only. Explicit session-catchup.py --metadata reads same-project local agent session records and emits aggregate counts only; --replay may emit bounded nonce-framed excerpts. Optional gated mode can request continuation only when the host supports it and never runs commands declared in Markdown. The skill has no network upload path. Use for research or work needing 5+ tool calls.
OpenClaw Command Center
v1.5.0
io.clawhub.jontsai/command-center
Mission control dashboard for OpenClaw - real-time session monitoring, LLM usage tracking, cost intelligence, and system vitals. View all your AI agents in one place.
ClawCall
v2.0.1
io.clawhub.clawcall-dev/clawcall-dev
Use when the user wants an AI agent to place a US phone call, call a business, handle hold or phone menus, confirm/reschedule/cancel/book/follow up/check an order, reach a real person, leave voicemail, connect the user into a live call, configure ClawCall voice/personality/profile or inbound reserved-number answering, poll received inbound calls, or link a ClawCall API key. Not for SMS, email, or international calls.
中文公文写作
v2.0.25
io.clawhub.gongyu0918-debug/chinese-official-writing
用于中文公文、事务性材料和新闻稿件的起草、改写、压缩、润色、审校、文种核对、去口语化、降 AI 味及 Word 格式处理,适用于机关、企事业单位、学校和新闻机构。涵盖申请、请示、报告、通知、通告、意见、决定、决议、议案、公报、命令、函、复函、批复、说明、方案、纪要、公告、公示、通报、制度、规定、办法、细则、操作规程、工作要点、总结、调研、讲话、致辞、主持词、述职、可研、审查材料、技术需求、新闻消息、编者按、新闻评论,以及采购、整改、反馈和 AI 算力等场景。
Keep exploring AgentHub
Most people compare similar tools or check scenario guides before installing—start here.
Listing badge: put AgentHub on your site
Copy either snippet into your project homepage, docs, or GitHub README. The badge is a hotlinked SVG — nothing to host — and it links back to this page so visitors can find the install steps.
<a href="https://myagenthub.cn/p/io.github.sweir1/obsidian-brain" title="Listed on AgentHub: Obsidian Brain" target="_blank" rel="noopener">
<img src="https://myagenthub.cn/badge/io.github.sweir1/obsidian-brain?lang=en" alt="Listed on AgentHub: Obsidian Brain" height="20" style="border:0"/>
</a>[](https://myagenthub.cn/p/io.github.sweir1/obsidian-brain)Badges are generated on the fly from /badge/<package-id>, so name and listing changes propagate automatically. Keep the link target unchanged — it is what counts as the referral.
Unified Manifest
{
"id": "io.github.sweir1/obsidian-brain",
"type": "mcp-server",
"version": "1.7.24",
"displayName": "Obsidian Brain",
"description": "Obsidian MCP server: semantic search, knowledge graph, and vault editing. No plugin required.",
"repository": {
"url": "https://github.com/sweir1/obsidian-brain",
"source": "github"
},
"homepage": "https://sweir1.github.io/obsidian-brain/",
"distribution": {
"packages": [
{
"registryType": "npm",
"identifier": "obsidian-brain",
"version": "1.7.24",
"runtimeHint": "npx",
"transport": "stdio",
"environmentVariables": [
{
"name": "VAULT_PATH",
"description": "Absolute path to your Obsidian vault (or any folder of .md files).",
"isRequired": true
},
{
"name": "DATA_DIR",
"description": "Where to store the SQLite index + embedding cache. Defaults to $XDG_DATA_HOME/obsidian-brain or ~/.local/share/obsidian-brain."
},
{
"name": "EMBEDDING_PRESET",
"description": "Preset name: english (default, bge-small-en-v1.5), english-fast, english-quality, multilingual, multilingual-quality, multilingual-ollama. Ignored when EMBEDDING_MODEL is set."
},
{
"name": "EMBEDDING_MODEL",
"description": "Power-user override: any transformers.js checkpoint or Ollama model id. Takes precedence over EMBEDDING_PRESET. Switching auto-reindexes."
},
{
"name": "EMBEDDING_PROVIDER",
"description": "Embedding backend. 'transformers' (local, default) or 'ollama' (requires a running Ollama server)."
},
{
"name": "OLLAMA_BASE_URL",
"description": "Base URL of a local Ollama server. Only used when EMBEDDING_PROVIDER=ollama."
},
{
"name": "OLLAMA_EMBEDDING_DIM",
"description": "Override the embedding dimensionality when EMBEDDING_PROVIDER=ollama. If unset, the server probes the model on startup."
},
{
"name": "OLLAMA_NUM_CTX",
"description": "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."
},
{
"name": "OBSIDIAN_BRAIN_OLLAMA_AUTO_PULL",
"description": "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>`)."
},
{
"name": "OBSIDIAN_BRAIN_OLLAMA_BYOM_AUTO_PULL",
"description": "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."
},
{
"name": "OBSIDIAN_BRAIN_NO_WATCH",
"description": "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)."
},
{
"name": "OBSIDIAN_BRAIN_NO_CATCHUP",
"description": "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."
},
{
"name": "OBSIDIAN_BRAIN_WATCH_DEBOUNCE_MS",
"description": "Per-file reindex debounce for the live watcher, in milliseconds."
},
{
"name": "OBSIDIAN_BRAIN_COMMUNITY_DEBOUNCE_MS",
"description": "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."
},
{
"name": "OBSIDIAN_BRAIN_TOOL_TIMEOUT_MS",
"description": "Per-tool-call timeout in milliseconds. Tools exceeding this return an MCP error instead of hanging."
},
{
"name": "OBSIDIAN_BRAIN_MAX_CHUNK_TOKENS",
"description": "Override the adaptive chunk-size budget (in tokens). When set, this beats the capacity probed from the model's tokenizer or Ollama /api/show. Use for debugging or for models with stale tokenizer configs."
},
{
"name": "OBSIDIAN_BRAIN_CONFIG_DIR",
"description": "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."
},
{
"name": "OBSIDIAN_BRAIN_DEBUG",
"description": "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."
},
{
"name": "OBSIDIAN_BRAIN_LOG_FORMAT",
"description": "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."
}
]
}
],
"remotes": []
},
"dependencies": [],
"installTargets": [
"claude-code",
"claude-desktop",
"cursor",
"vscode",
"trae",
"cherry-studio",
"lingma",
"windsurf",
"cline",
"workbuddy"
],
"keywords": [],
"provenance": {
"origin": "official-mcp-registry",
"originalId": "io.github.sweir1/obsidian-brain",
"originalUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/io.github.sweir1%2Fobsidian-brain/versions/latest",
"isOfficial": true,
"status": "active"
}
}