
Mcp Obsidian Cli
io.github.stonematt由 GitHub 账号 stonematt 发布v2.1.0更新于 Oct 24, 2026
Save chat notes from Claude Desktop to your vault — MCP on Obsidian CLI. Keep what matters.
概览
让助手把聊天笔记保存到 Obsidian 仓库,并读取其中的反向链接、搜索结果、任务和属性。
- 可以做什么
- 把官方 Obsidian 命令行接口封装为 MCP 工具,助手因此可以创建笔记、追加到日记、设置 frontmatter 属性,以及读取或搜索已有笔记。一个通用透传工具覆盖 80 多条命令的完整 CLI 能力,另有面向日记、搜索、标签、任务、属性、反向链接、文件列表和最近文件的专用工具。它连接正在运行的 Obsidian 实例,因此看到的是 Obsidian 视角下的仓库,包括 Templater 模板和已解析的链接图谱。
- 适用场景
- 适合在聊天客户端中起草或调研后,希望把结果直接归档进仓库而无需复制粘贴的场景;也适合让助手把仓库中已有的反向链接和全文搜索结果带入对话。主要面向桌面聊天客户端,而非浏览器使用。
- 运行要求
- 以 npm 包形式通过 stdio 在本地运行,需要 Node.js 18 或更高版本。Obsidian 必须正在运行并已启用命令行接口。macOS 会自动检测 obsidian-cli;Linux 和 Windows 需自行设置 OBSIDIAN_CLI_PATH。用 OBSIDIAN_VAULT 指定目标仓库,未设置时服务器会在首次调用工具时询问。还支持可选的 OBSIDIAN_TIMEOUT_MS 和 YAML 配置文件。
安装
在 SourceWeft 中
- 打开 控制台中的 Mcp Obsidian Cli,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-obsidian-cli
[Obsidian CLI] [npm version] [npm downloads] [MCP Registry] [Node] [License: MIT]
Your thinking starts in Claude Desktop, not in Obsidian. You research, draft, argue with the model, and when something's worth keeping you say "save this to my vault." It lands in the right place: your template, your properties, today's daily note, wired into your link graph. No tab-switch, no copy-paste.
Installing this? Start at Install. One prompt in Claude Code handles the whole setup.
[Saving a Claude Desktop conversation into an Obsidian vault, then searching the vault from chat]
Two halves:
- Capture — turn a conversation into a real note, filed where it belongs.
- Augment — pull what's already in the vault (backlinks, full-text search) back into the chat to inform or update a note.
Needs Obsidian running. It can sit minimized, so you never switch to it.
Using this from Claude Code? The native obsidian-cli skill fits better there: direct CLI, no MCP layer. Installing is separate. The prompt below runs in Claude Code.
Install
Run the prompt below in Claude Code. It checks Node, enables the Obsidian CLI, writes your Claude Desktop config, and verifies the connection. Only hand-edit the config if that path fails.
Full walkthrough, including failure modes: docs/INSTALL.md.
Run the server directly. This starts the server in your terminal and installs nothing:
Requirements
The install prompt checks each of these. Listed here for reference:
- Obsidian running with its command line interface enabled (Settings → General → Advanced → Command line interface). The CLI ships built into Obsidian — nothing extra to install.
obsidian-clireachable. macOS auto-detects it inside the Obsidian app bundle, so there is nothing to configure. Linux and Windows have no auto-detection: pointOBSIDIAN_CLI_PATHat the binary yourself.- Node.js >= 18
How it works
The server exposes Obsidian CLI commands as MCP tools. A generic pass-through tool handles the full CLI surface (80+ commands), plus typed convenience tools for common operations:
The generic obsidian tool means the MCP server never falls behind the CLI — new CLI commands work immediately without a server update.
What it can do
It talks to the running Obsidian instance, so it works with your vault the way Obsidian sees it:
- Backlinks and full-text search across your resolved link graph and search index (the augment half).
- Templater templates and typed frontmatter properties when creating or updating notes.
- Daily notes, task queries, and tag counts.
- 80+ commands through the generic pass-through. No API keys, no REST plugin. Just the official Obsidian CLI.
Manual config (if you're not using Claude Code)
Automated installers should use the prompt under Install, which handles vault name, CLI path, and verification. This block is the hand-edit fallback.
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
Environment variables
Config file
The server can read settings from a YAML config file:
- Default:
~/.config/mcp-obsidian-cli/config.yaml - With
XDG_CONFIG_HOME:$XDG_CONFIG_HOME/mcp-obsidian-cli/config.yaml
Config file format:
Config precedence: env vars > config file > hardcoded defaults
Bugs / requests
File an issue: https://github.com/stonematt/mcp-obsidian-cli/issues/new/choose. Bug template asks for version, MCP client, tool call, and response — quick to fill, fast to act on.
License
MIT
Maintained by @stonematt Licensed under the MIT License
Trademark Notice: "Obsidian" is a trademark of Obsidian Publishing, Inc. This project is not affiliated with or endorsed by Obsidian Publishing.
来源:README.md,提交 9a75c30
工具
0版本历史
1- v2.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分