obsidian-mcp
obsidian-mcp
MCP 服务器,可将任意 Obsidian 仓库转化为可被 AI 查询的知识图谱。
与 24+ 个现有 Obsidian MCP 服务器的不同之处:
图谱优先 — 通过
[[wikilinks]]实现 BFS、最短路径、连通分量、桥接检测零基础设施 — 无需数据库、无需运行 Obsidian、无需 API 密钥
仓库无关 — 适用于任何现有仓库,无需特定结构
反向链接感知写入 —
move_note自动更新整个仓库中的所有引用小巧 — 4 个运行时依赖,约 42KB 体积
快速开始
npx obsidian-mcp --vault ~/my-obsidian-vaultClaude Desktop
添加到 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["-y", "obsidian-mcp", "--vault", "/path/to/vault"]
}
}
}Claude Code
claude mcp add obsidian -- npx -y obsidian-mcp --vault /path/to/vaultRelated MCP server: some-vault-some-mcp
工具(12)
阅读与发现
工具 | 描述 |
| 概览:笔记总数、标签、链接、孤立笔记、组件、热门标签/枢纽 |
| 完整内容 + 前置元数据 + 链接 + 反向链接 + 章节 |
| 按标签、文件夹、前置元数据、关键词筛选。均可组合使用 |
图谱遍历
工具 | 描述 |
| 笔记的直接链接 + 反向链接 |
| 从笔记出发的 BFS/DFS,N 层深度,支持标签过滤 |
| 两篇笔记之间的最短链接链 |
| 组件、孤立笔记、桥接、枢纽、死链接 |
写入与操作
工具 | 描述 |
| 创建笔记,支持内容 + 前置元数据 |
| 追加、前置或替换章节。更新前置元数据 |
| 重命名/移动 + 自动更新整个仓库中的所有反向链接 |
| 删除并报告损坏链接 |
| 添加/移除/重命名标签(支持全仓库重命名) |
配置
默认零配置。可选的在仓库根目录放置 .obsidian-mcp.json:
{
"ignore": ["templates/", "daily-notes/", ".trash/"],
"watchDebounce": 100,
"maxTraversalDepth": 10,
"maxSearchResults": 500
}CLI 标志
--vault <path> Path to Obsidian vault (required)
--verbose Enable debug logging
--log-level <level> error | warn | info | debug (default: info)工作原理
启动时,扫描所有
.md文件并构建内存图谱(1000 篇笔记约 1-3 秒)文件监视器检测更改并增量更新图谱(每次更改约 5 毫秒)
Claude 通过 MCP 工具查询图谱 — 无需重新扫描
写入操作同时原子性地更新文件系统和图谱
硬编码排除项:.obsidian/、.trash/、node_modules/
开发
npm install
npm test # Run 66 tests
npm run build # Build to dist/
npm run dev -- --vault test/fixtures/vault # Dev mode许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAn open-source MCP server that makes your Obsidian vault accessible from any AI client with hybrid search, read/write, and graph analysis capabilities.3023MIT
- AlicenseNot gradedqualityAmaintenanceMCP server that gives AI models read/write access to Obsidian vaults with semantic search, link graph analysis, canvas manipulation, and incremental indexing.1MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that treats Obsidian vaults as knowledge graphs, enabling AI agents to traverse wikilinks, assemble token-budgeted context, and search with backlink awareness.31MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that enables AI agents to read, search, and write to your Obsidian vault.4MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that gives your AI access to the source code and docs of all public github repos
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/seynurmammad0v/obsidian-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server