obsidian-vault-mcp

obsidian-vault-mcp

Self-hosted MCP server for private Obsidian vaults on GitHub, exposing tools to search, read, write, and analyze Markdown notes and their link graph.

Category
访问服务器

README

Obsidian Vault MCP

A self-hosted Model Context Protocol server for private Obsidian vaults stored in GitHub. It runs on Cloudflare Workers, authenticates the vault owner with OAuth 2.1, and exposes Markdown notes, an Obsidian-compatible link graph, and a durable event stream for vault automations.

The server does not run Obsidian. It derives links, backlinks, aliases, tags, embeds, unresolved references, and shortest paths from an immutable GitHub tree snapshot.

Security model

The default deployment is deliberately single-owner:

  • One immutable GitHub user ID may authorize MCP clients.
  • Only repositories in GITHUB_REPOSITORIES are addressable.
  • A fine-grained GitHub token must be restricted to exactly those repositories.
  • Each MCP client requires an explicit consent screen after GitHub login.
  • Read-only deployments do not register the write tool.
  • Writable deployments require vault:write; updates use the current Git blob SHA and reject stale or blind overwrites.
  • Secrets stay in Cloudflare and are never part of this repository.

Do not add unrelated users to a deployment backed by one shared token. See Multi-user architecture for the correct isolation model.

Tools

Tool Purpose
obsidian_list_vaults List explicitly configured vault repositories.
obsidian_list_notes Browse visible Markdown paths.
obsidian_search_notes Search note contents through GitHub.
obsidian_read_note Read one Markdown note with its current SHA.
obsidian_write_note Create or safely replace a note; available only in write mode.
obsidian_get_note_links Resolve outgoing links, embeds, backlinks, and broken references.
obsidian_get_graph Page through nodes, edges, tags, aliases, and orphans.
obsidian_find_path Find a deterministic shortest path between notes.
obsidian_list_events Inspect canonical note-created, updated, and deleted events.
obsidian_list_automations Inspect the server's configured internal automations.
obsidian_list_automation_runs Inspect automation attempts and outcomes.

Deploy your own instance

Follow the complete self-hosting guide. The short version is:

  1. Fork this repository.
  2. Create Cloudflare KV, D1, and Queues resources plus an OAuth App on GitHub.
  3. Create a fine-grained GitHub token restricted to selected vault repositories.
  4. Copy wrangler.example.jsonc to the ignored wrangler.jsonc and enter only non-secret deployment values.
  5. Upload the four base runtime secrets to Cloudflare, apply the D1 migrations, and deploy. Add OPENAI_API_KEY only when enabling an AI automation.
  6. Connect an MCP client to https://your-host/mcp and approve its consent screen.
  7. After the manual deployment passes its smoke tests, connect Cloudflare Workers Builds to the fork or enable the protected GitHub Actions alternative.

Development

bun install --frozen-lockfile
bun run check

bun run check runs strict TypeScript, 80+ unit tests, a production dependency audit, and a Wrangler bundle dry-run. CI runs the same command without deployment credentials.

Limits

  • Up to 1,000 Markdown notes and 8 MB of Markdown source per graph snapshot.
  • Up to 512 KB per note.
  • Graph data is cached by repository and immutable Git tree revision for five minutes.
  • Hidden paths and non-Markdown files are never exposed as notes.
  • Writes create Git commits; rename and delete operations are intentionally unavailable.
  • GitHub is canonical: pushes made by Obsidian, the MCP, GitHub's UI, or another Git client produce the same events.
  • Automation handlers are internal and explicitly configured; summarize-note writes only managed summaries and arbitrary outbound callback URLs are not supported yet.
  • One repository receives immediate webhook delivery per deployment; every allowlisted vault is still reconciled on the fifteen-minute schedule.

See Vault events and automations for delivery, filtering, retries, and the write-loop policy.

Project status

The personal self-hosted model is implemented. Shared multi-user hosting is a separate design and requires a GitHub App installation per tenant; it is not enabled by this codebase today.

See Security, security model, and contributing.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选