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.
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_REPOSITORIESare 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:
- Fork this repository.
- Create Cloudflare KV, D1, and Queues resources plus an OAuth App on GitHub.
- Create a fine-grained GitHub token restricted to selected vault repositories.
- Copy
wrangler.example.jsoncto the ignoredwrangler.jsoncand enter only non-secret deployment values. - Upload the four base runtime secrets to Cloudflare, apply the D1 migrations, and deploy. Add
OPENAI_API_KEYonly when enabling an AI automation. - Connect an MCP client to
https://your-host/mcpand approve its consent screen. - 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-notewrites 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.