obsidian-mcp-server
by cyanheads·★ 525·综合分 52
一个用于 Obsidian 笔记库的 MCP 服务器,包含 14 个工具,可用于读取、写入、搜索和编辑笔记、标签和前置元数据。
概述
obsidian-mcp-server 提供 14 个工具和 3 个资源,可全面访问 Obsidian 笔记库。它支持多种格式的笔记读取,包括原始内容、完整结构化文档和文档地图。服务器通过修补、替换和追加等操作工具进行精细编辑,可对笔记、标签和前置元数据进行精细控制。它还提供文本、Dataview DQL 和 JSONLogic 模式的搜索功能,使其能够满足不同查询需求。服务器通过环境变量实现强大的权限控制,允许路径范围访问和只读配置,确保安全部署。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当您需要为 Obsidian 笔记库提供全面的程序化访问以实现 AI 集成或自动化时,尤其是处理复杂笔记结构和元数据时,选择此 MCP 服务器。
什么时候不要选它
如果您需要访问非 Obsidian 笔记系统,或者需要为敏感数据提供认证/加密功能时,避免使用此服务器,因为它没有内置的安全模型。
此 server 暴露的工具
从 README 抽取出 12 个工具obsidian_get_noteRead a note in various formats (raw content, structured form, document map, or specific section).
obsidian_list_notesList notes and subdirectories at a vault path with filtering options.
obsidian_list_tagsList all tags found across the vault with usage counts.
obsidian_search_notesSearch the vault by text, Dataview DQL, or JSONLogic with context windows.
obsidian_write_noteCreate a note or replace a specific section, with protection against accidental overwrites.
obsidian_append_to_noteAppend content to a note or create the note if it doesn't exist.
obsidian_patch_noteSurgically edit a specific section of a note (append, prepend, or replace).
obsidian_replace_in_notePerform body-wide search-replace operations in a single note.
obsidian_manage_frontmatterGet, set, or delete frontmatter keys in a note.
obsidian_manage_tagsAdd, remove, or list tags on a note, reconciling frontmatter and inline syntax.
obsidian_delete_notePermanently delete a note with confirmation when supported.
obsidian_open_in_uiOpen a file in the Obsidian app UI.
可对比工具
安装
npm install -g obsidian-mcp-server对于 Claude Desktop,添加到 claude_desktop_config.json 中:
{
"mcpServers": {
"obsidian": {
"command": "obsidian-mcp-server",
"args": []
}
}
}服务器也可以通过 STDIO 或 Streamable HTTP 运行。
FAQ
- 使用此 MCP 服务器需要什么?
- 服务器需要安装了 Local REST API 插件的 Obsidian。还需要 Node.js 或 Bun 运行时。
- 如何控制文件权限?
- 通过环境变量:OBSIDIAN_READ_PATHS、OBSIDIAN_WRITE_PATHS 和 OBSIDIAN_READ_ONLY,用于限制对特定笔记库路径的访问。
obsidian-mcp-server 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。