
Obsidian MCP Server
io.github.tylern91由 GitHub 帳號 tylern91 發布v0.3.0更新於 Oct 24, 2026
Filesystem-based MCP server for Obsidian vaults — read, search, and edit notes, no app required.
概覽
讓助理直接在本地檔案系統上讀取、搜尋、編輯與整理 Obsidian 筆記庫,不需要執行 Obsidian 應用程式。
- 可以做什麼
- 這是一個本機 stdio MCP 伺服器,直接操作 Obsidian 筆記庫目錄。它提供讀取、寫入、修補、移動與刪除筆記的工具;解析與更新 YAML frontmatter;新增、移除、列出與重新命名標籤;計算反向連結;執行 BM25 全文檢索以及 RE2 正規表達式或 glob 搜尋;批次讀取筆記;取得週期筆記;並稽核筆記庫中的孤立筆記、失效連結、無標籤筆記與重複標題。它也提供唯讀資源與提示範本,例如 summarize_note 與 vault_health_check。
- 適用情境
- 適合讓助理處理個人或團隊的 Obsidian 筆記庫:摘要與回顧筆記、尋找相關筆記、清理標籤與連結,或搜尋筆記內容。如果你希望在不開啟 Obsidian 應用程式的情況下存取筆記庫,它很合適。
- 執行需求
- 以本機程序在使用者機器上執行;必須透過 --vault 參數或 OBSIDIAN_VAULT_PATH 環境變數提供筆記庫路徑。可透過 Claude Desktop 的 .mcpb 套件、發行版二進位檔、Homebrew 安裝,或以 Go 1.27+ 從原始碼建置。選用的 HTTP 傳輸使用 TLS 與 bearer token 驗證。未宣告需要帳號或 API 金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Obsidian MCP Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
obsidian-mcp-server
[CI] [Release] [Go Report Card] [License: Apache-2.0] [Go Version]
A Go Model Context Protocol (MCP) server for Obsidian vaults. It gives AI agents and development tools direct filesystem access to your vault — no running Obsidian instance required.
Features
- Read, write, and list notes and directories via MCP tools
- Frontmatter — parse and update YAML frontmatter with format-preserving rewrites
- Tags — extract inline
#tags, aggregate vault-wide tag counts, add/remove tags - Backlinks — on-demand reverse link graph (wikilinks and markdown links)
- Mutations — heading-anchored patch, safe delete, and move with confirmation guards
- Full-text search — BM25 Okapi ranked search with match snippets
- Regex/glob search — RE2 regex or filepath glob search across paths and content
- Path security — 4-layer validation: lexical checks, ignore/extension filters, case-insensitive existence lookup, and symlink escape prevention
- Stdio transport — works with any MCP client (Claude Code, Claude Desktop, etc.)
- Streamable HTTP transport (optional) — TLS 1.3 + bearer token auth by default, loopback-only unless explicitly widened; see
--transport httpin Configuration andSECURITY.md§ HTTP transport - Zero Obsidian dependency — operates on the vault directory directly
- Token counting — responses include approximate token counts (cl100k_base)
MCP Tools
search_notes, search_regex, list_directory, and get_recent_changes results also include an
obsidian://open deepLink field per note, built from --vault-name (see Configuration below).
Notes
patch_note semantics: position controls where content is inserted relative to the heading:
before— inserted immediately before the heading lineafter— inserted after the heading's body (before the next same-level or higher heading)replace_body— replaces everything between the heading line and the next same-level heading
search_notes parameters:
Returns: { query, results: [{ path, score, matchCount, matches: [{line, snippet, term}], tokenCount, reason }], total }
search_regex parameters:
Returns: { pattern, scope, results: [{ path, matches: [{line, snippet}] }], total }
Batch tools (read_multiple_notes, get_notes_info): The paths parameter is a JSON array string — e.g. '["Notes/foo.md","Notes/bar.md"]'. summary:true returns headOf (first N runes from headChars, default 200) instead of full content, which is useful for large notes to stay within context limits. Both tools enforce --max-batch (default 10); requests with more paths are silently truncated and the response includes "truncated": true.
Optimistic concurrency (if_match / etag): read_note, read_multiple_notes, and get_notes_info return a SHA-256 etag of the note's content. Pass that value as if_match on write_note, patch_note, update_frontmatter, manage_tags, delete_note, or move_note to make the write conditional — if the note has changed since you read it, the call fails with a REVISION_CONFLICT error instead of silently overwriting someone else's edit. if_match is optional everywhere; omitting it writes unconditionally, as before. Two edge cases: passing if_match for a note that doesn't exist yet is always a conflict (it never creates the note), and move_note's dryRun:true preview does not enforce if_match.
Periodic notes (get_periodic_note, get_recent_periodic_notes): Configuration (folder and date format per granularity) is read from .obsidian/plugins/periodic-notes/data.json inside the vault. If that file is missing, built-in defaults are used: daily notes use YYYY-MM-DD in Daily Notes/, weekly notes use gggg-[W]ww in Weekly Notes/, and so on. offset=0 resolves to the current period, offset=-1 to the previous period (yesterday, last week, etc.), and offset=+1 to the next period. createIfMissing=true creates an empty note at the resolved path if it does not already exist.
get_vault_stats: Returns noteCount, totalBytes, totalLinks, totalTags, topTags (top 20 by count), oldestNote, newestNote, and vaultRoot. Setting includeTokenCounts:true runs token counting across every note — this is expensive for large vaults and is disabled by default.
audit_notes classes:
orphans— notes that have no tags AND no incoming wikilinks or markdown links (completely isolated notes)dangling-links— notes containing links to vault paths that do not exist (broken references)untagged— notes with no frontmatter tags and no inline#tagsduplicate-titles— multiple notes sharing the same filename stem, which causes wikilink ambiguity
Each class result is capped at limit entries (default 20). When results are truncated, the response includes "truncated": true.
MCP Prompts
Prompts are server-defined conversation starters that the host (Claude Code, Claude Desktop) exposes in its UI. Each prompt pulls live vault data and constructs a ready-to-use message for the LLM.
Prompts are invoked from the host's prompt picker (e.g. / in Claude Code). They never modify the vault.
MCP Resources
Resources are read-only vault data that the host can attach directly to a conversation context window — no explicit tool call required.
Static resources (obsidian://vault/*) are always available in the resource picker. Template resources are resolved when the host reads them — if the note does not exist, the resource returns an explanatory empty body instead of an error.
Installation
Install script
Downloads the right binary for your OS/architecture, verifies its checksum, and installs it to
~/.local/bin (override with a second argument):
Pin a version instead of latest:
Claude Desktop (.mcpb bundle)
Download obsidian-mcp-<version>.mcpb from the latest release and double-click it — Claude Desktop installs the extension and prompts for your vault path. No manual JSON editing.
Release binary
Download a prebuilt binary from the latest release, verify its checksum, and install:
Homebrew (macOS/Linux)
go install
Requires Go 1.27+ to build from source. Building with GOTOOLCHAIN=local on an older Go
requires upgrading first — GOTOOLCHAIN=auto (the default since Go 1.21) downloads a matching
toolchain automatically.
Build from source
Requires Go 1.27+. Building with GOTOOLCHAIN=local on an older Go
requires upgrading first — GOTOOLCHAIN=auto (the default since Go 1.21) downloads a matching
toolchain automatically.
Usage
Claude Code
Claude Desktop
Add to claude_desktop_config.json:
Cursor
Edit the vault path after install — the deeplink can't know it in advance.
VS Code
[Install in VS Code] [Install in VS Code Insiders]
Edit the vault path after install — the deeplink can't know it in advance.
Direct
Print the version and exit:
Configuration
Configuration follows CLI flag > environment variable > default precedence.
Examples
Precedence in action: with OBSIDIAN_LOG_LEVEL=debug exported, obsidian-mcp --vault ... --log-level info runs at info — the explicit flag wins. Unset flags inherit the env var; if neither is set, the default applies.
Security
All paths are validated through a 4-layer security model before any filesystem operation:
- Lexical — rejects absolute paths,
..traversal, and null bytes - Filter — blocks ignored patterns (
.git,.obsidian, etc.) and unapproved extensions - Existence — verifies the file exists with a case-insensitive fallback; rejects ambiguous matches
- Symlink — resolves symlinks and verifies the target remains inside the vault root
The optional --transport http listener has its own security posture (TLS, bearer auth,
loopback-only default, session binding) — see SECURITY.md § HTTP transport.
Project Structure
Development
License
來源:README.md,提交 f1de1bf
工具
0版本歷史
1- v0.3.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
