
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 分
