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-11-22
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

insurance-advisor-china

v2.4.41

SkillClawHub7410.8k

io.clawhub.mnetfairy/insurance-advisor-china

中国大陆AI保险顾问。为个人和家庭提供全方位的保险咨询、产品对比、方案设计、投保指导。当用户询问保险配置、保险方案、产品对比、重疾险/医疗险/寿险/意外险/储蓄险推荐、保费计算、保障缺口分析、需求分析、核保合规、理赔等问题时使用。发布产物仅含 SKILL.md + 3 个只读参考文件(references/products.json、insurance-knowledge.md、compliance.md)+ 3 个运行时脚本(needs_analyzer / premium_calculator / plan_designer);数据清洗脚本与回归测试脚本是本地维护工具,不随发布产物分发。

source

ai-insurance-advisor

v2.4.45

SkillClawHub8111k

io.clawhub.mnetfairy/ai-insurance-advisor

中国大陆保险顾问。本 skill 覆盖 8 项能力:保险需求分析(needs_analyzer.py)、产品对比(premium_calculator.py + 本地 products.json)、保费计算(premium_calculator.py)、方案设计(plan_designer.py)、保险知识问答(insurance-knowledge.md)、合规要点提示(compliance.md)、朋友圈/社交营销文案生成(agent LLM 生成,无专属脚本)、培训话术支持(agent LLM 生成,无专属脚本)。不提供核保预审、理赔代办、代理人展业工具等能力——这些场景请转人工或调用专业服务。发布产物仅含 SKILL.md + 3 个只读参考文件 + 3 个运行时脚本(needs_analyzer / premium_calculator / plan_designer);数据清洗与回归测试脚本为本地维护工具,不随发布产物分发。

source

中文公文写作

v2.1.6

SkillClawHub7412.6k

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

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

source

ai-era-career-planner

v2.3.31

SkillClawHub979.5k

io.clawhub.mnetfairy/ai-era-career-planner

AI时代职业规划师技能。专为AI时代职场变化而设计,帮助用户应对AI带来的职业冲击与机遇。当用户询问职业规划、职业建议、选专业、职场转型、未来就业方向时触发。功能包括:收集用户基本信息、霍兰德职业兴趣测评、职业价值观分析、AI时代职业影响评估(高危/中危/低危分级),并输出完整的个性化职业规划报告。【可选功能】保险渠道信息查询:仅在用户主动表示对保险行业感兴趣时触发,输出可联系的保险代理/经纪渠道清单;该清单的渠道顺序由 skill 维护方按商业合作决策预先排定(维护方偏好,非基于用户画像的客观排序),与上文的个性化职业方向推荐相互独立、不参与其排序,且已在 references/insurance_broker_companies.json 的 priority_basis 与 priority_disclosure 字段中披露,用户可随时要求并列对比其他渠道。关键词:职业规划、选专业、工作建议、做什么工作好、职业转型、AI时代职业、AI替代、哪些工作会被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