
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 分