AgentHubAgentHub

Obsidian Brain MCP Setup & Guide

MCP ServerMCP RegistryOfficial

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

Verified At2026-10-10
Install Snippets TestedCLI & JSON config syntax verified
Protocol Handshake ReadyComplies with JSON-RPC 2.0 specifications
Origin Registry ActiveSourced from official-mcp-registry
Verified ClientsClaude Code、Claude Desktop、Cursor 等
Security Tier: A+ 级 · 官方认证推荐 (A+)·Maintained by official/verified teams, audited for standard MCP protocol compliance.

Copy by platform

Choose your platform

  1. Open or create .cursor/mcp.json in your project root
  2. Click Copy config and paste; merge only this mcpServers entry if others exist
  3. Replace <placeholders> in env with real secrets (see Environment variables below)
  4. Save, then Cmd+Shift+P → Reload Window

Pre-fill Environment Variables (Optional)

Required
Privacy Guarantee: Keys are replaced 100% locally in your browser memory and are NEVER uploaded or stored on any server.
Click to copy snippet
{
  "mcpServers": {
    "obsidian-brain": {
      "command": "npx",
      "args": [
        "-y",
        "obsidian-brain"
      ],
      "env": {
        "VAULT_PATH": "<VAULT_PATH>"
      }
    }
  }
}

Setup tutorial

  1. Open the Obsidian Brain page and confirm this MCP Server (source: MCP Registry).
  2. Copy the Cursor, Claude Code, or VS Code snippet.
  3. Merge it into mcpServers and replace env placeholders with real secrets.
  4. 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)

  1. Install Claude Code CLI
  2. Copy the command below, replace <placeholders> with real env values, then run in terminal
  3. See Environment variables below if listed
claude mcp add obsidian-brain --env VAULT_PATH=<VAULT_PATH> -- npx -y obsidian-brain

Cursor — .cursor/mcp.json (local)

  1. Open or create .cursor/mcp.json in your project root
  2. Click Copy config and paste; merge only this mcpServers entry if others exist
  3. Replace <placeholders> in env with real secrets (see Environment variables below)
  4. 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)

  1. Install GitHub Copilot in VS Code with MCP support
  2. Open or create .vscode/mcp.json in your project root
  3. Click Copy config and paste; merge only this mcpServers entry if others exist
  4. Replace <placeholders> in env with real secrets
  5. 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)

  1. Open Claude Desktop claude_desktop_config.json (see remote guide for paths)
  2. Click Copy config and merge under mcpServers
  3. Replace <placeholders> in env with real secrets
  4. 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)

  1. Trae → Settings → MCP, or edit .trae/mcp.json / global mcp.json
  2. Click Copy config and merge mcpServers
  3. Replace <placeholders> in env with real secrets
  4. Save and reload Trae
{
  "mcpServers": {
    "obsidian-brain": {
      "command": "npx",
      "args": [
        "-y",
        "obsidian-brain"
      ],
      "env": {
        "VAULT_PATH": "<VAULT_PATH>"
      }
    }
  }
}

Cherry Studio — MCP settings (local)

  1. Cherry Studio → Settings → MCP Servers → Add (STDIO)
  2. Or import JSON: click Copy config and merge mcpServers
  3. Replace <placeholders> in env; ensure Node.js / uv (npx, uvx) are installed
  4. 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)

  1. Lingma Settings → MCP → + → STDIO or config file
  2. Click Copy config and merge mcpServers
  3. Replace <placeholders> in env; need Node.js 18+ (npx) or uv (uvx)
  4. 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)

  1. Edit ~/.codeium/windsurf/mcp_config.json
  2. Click Copy config and merge mcpServers (stdio same as Cursor)
  3. 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)

  1. Cline panel → Settings → MCP Servers
  2. Click Copy config and merge
  3. 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)

  1. Edit ~/.workbuddy/mcp.json (user) or project .workbuddy/mcp.json
  2. Or Plugins → MCP Servers → Configure MCP and paste the JSON below
  3. Replace <placeholders> in env; on Windows prefer absolute paths for command/scripts
  4. 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.

Fix Snippet
# 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.

Fix Snippet
// .cursor/mcp.json 或 claude_desktop_config.json
{
  "env": {
    "VAULT_PATH": "your_actual_key_here"
  }
}

Tool Mock Playground

Sandbox

Obsidian Brain Tool Interface Simulation · Preview tool schema & outputs without local runtime

Sandbox Ready
fn: obsidian_brainExecute the core tool interface of Obsidian Brain
Request ArgumentsJSON Schema
{
  "target": "Obsidian Brain",
  "action": "execute",
  "options": {
    "mode": "standard",
    "timeoutMs": 5000
  }
}
💡Parameters generated dynamically by Agent runtime
Agent Tool Output

Click 'Run Mock' above

to preview the raw response returned to the LLM

Env: AgentHub Virtual SandboxJSON-RPC 2.0

Decision Guide: Why & When to Use

Assess suitability before installing to save trial-and-error time

Best Suited For
  • PR review
  • Changelog generation
  • Cross-repo issue search
When NOT to Use
  • Replacing human security audit
  • Unauthorized repo access
Recommended Workflow Pairing:View Scenario →

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.

Open tutorial →

Related resources

Often paired with

Planning with files

v3.23.0

SkillClawHub44.6k

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.

source

ClawCall

v2.0.1

SkillClawHub53.1k

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.

source

中文公文写作

v2.0.25

SkillClawHub9.1k

io.clawhub.gongyu0918-debug/chinese-official-writing

用于中文公文、事务性材料和新闻稿件的起草、改写、压缩、润色、审校、文种核对、去口语化、降 AI 味及 Word 格式处理,适用于机关、企事业单位、学校和新闻机构。涵盖申请、请示、报告、通知、通告、意见、决定、决议、议案、公报、命令、函、复函、批复、说明、方案、纪要、公告、公示、通报、制度、规定、办法、细则、操作规程、工作要点、总结、调研、讲话、致辞、主持词、述职、可研、审查材料、技术需求、新闻消息、编者按、新闻评论,以及采购、整改、反馈和 AI 算力等场景。

source

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.

PreviewListed on AgentHub: Obsidian Brain
HTML
<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>
Markdown (GitHub README)
[![Listed on AgentHub: Obsidian Brain](https://myagenthub.cn/badge/io.github.sweir1/obsidian-brain?lang=en)](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"
  }
}
Obsidian Brain MCP Setup & Guide - AgentHub