Skip to main content
Glama

obsidian-mcp

MCP 服务器,可将任意 Obsidian 仓库转化为可被 AI 查询的知识图谱。

与 24+ 个现有 Obsidian MCP 服务器的不同之处:

  • 图谱优先 — 通过 [[wikilinks]] 实现 BFS、最短路径、连通分量、桥接检测

  • 零基础设施 — 无需数据库、无需运行 Obsidian、无需 API 密钥

  • 仓库无关 — 适用于任何现有仓库,无需特定结构

  • 反向链接感知写入move_note 自动更新整个仓库中的所有引用

  • 小巧 — 4 个运行时依赖,约 42KB 体积

快速开始

npx obsidian-mcp --vault ~/my-obsidian-vault

Claude 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/vault

Related MCP server: some-vault-some-mcp

工具(12)

阅读与发现

工具

描述

vault_stats

概览:笔记总数、标签、链接、孤立笔记、组件、热门标签/枢纽

read_note

完整内容 + 前置元数据 + 链接 + 反向链接 + 章节

search_notes

按标签、文件夹、前置元数据、关键词筛选。均可组合使用

图谱遍历

工具

描述

graph_neighbors

笔记的直接链接 + 反向链接

graph_traverse

从笔记出发的 BFS/DFS,N 层深度,支持标签过滤

graph_shortest_path

两篇笔记之间的最短链接链

graph_analyze

组件、孤立笔记、桥接、枢纽、死链接

写入与操作

工具

描述

create_note

创建笔记,支持内容 + 前置元数据

patch_note

追加、前置或替换章节。更新前置元数据

move_note

重命名/移动 + 自动更新整个仓库中的所有反向链接

delete_note

删除并报告损坏链接

manage_tags

添加/移除/重命名标签(支持全仓库重命名)

配置

默认零配置。可选的在仓库根目录放置 .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)

工作原理

  1. 启动时,扫描所有 .md 文件并构建内存图谱(1000 篇笔记约 1-3 秒)

  2. 文件监视器检测更改并增量更新图谱(每次更改约 5 毫秒)

  3. Claude 通过 MCP 工具查询图谱 — 无需重新扫描

  4. 写入操作同时原子性地更新文件系统和图谱

硬编码排除项:.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

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    Not graded
    quality
    B
    maintenance
    An open-source MCP server that makes your Obsidian vault accessible from any AI client with hybrid search, read/write, and graph analysis capabilities.
    30
    23
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that treats Obsidian vaults as knowledge graphs, enabling AI agents to traverse wikilinks, assemble token-budgeted context, and search with backlink awareness.
    3
    1
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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