vault-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vault-mcpSearch notes for 'project planning'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
vault-mcp
Authenticated remote MCP server on Cloudflare Workers that exposes a private, GitHub-hosted Obsidian vault to both claude.ai (Web / Desktop / iPhone) and Claude Code — one free deployment serving every Claude surface. It reads notes, creates/overwrites them, and deletes them; it never renames or moves. Every mutation is a git commit, so deletes stay revertable.
It works against the vault through the GitHub API, so the source repo can stay private and there is no always-on machine to maintain. Deploy your own instance with C3 (one command) or clone it manually — both are covered below. Your vault target is set via secrets, so the committed config ships generic.
What it does
Auth: GitHub OAuth via
@cloudflare/workers-oauth-provider. Users sign in with GitHub; only logins inVAULT_ALLOWED_GITHUB_LOGINSget any tools at all.Accesses the vault through the GitHub API using a separate fine-grained PAT (
VAULT_GITHUB_TOKEN) scoped to Contents Read + Write on the one vault repo.Transport: Streamable HTTP at
/mcp.
Tools
Tool | Description |
| List note ( |
| Read the raw markdown of one note by repo-relative path. |
| Create a new note or overwrite an existing one (markdown paths only). |
| Delete an existing note by path (markdown paths only; recorded as a revertable git commit). |
| Content search (GitHub code search, indexed) + filename search, merged. |
Related MCP server: obsidian-mcp
Two GitHub tokens, two jobs
Purpose | Token | Scope |
Who may log in | GitHub OAuth App ( |
|
What the server accesses | fine-grained PAT ( | Contents: Read & Write, limited to your vault repo |
Keeping them separate means logging in never grants repo write via the OAuth app, and the vault PAT is scoped to exactly one repo. Keep the PAT scoped to that single repo — this server needs read and write on the vault, but nothing beyond it.
Access scope
Path visibility is controlled by two settings that default in src/config.ts; override
either per deploy with a secret of the same name (wrangler secret put):
VAULT_ALLOWED_PREFIXES— if non-empty, only paths under these prefixes are exposed (default: empty = whole repo).VAULT_DENIED_PREFIXES— always hidden (default:.git/,.obsidian/,.claude/).
read_note, write_note, and delete_note all reject absolute paths and .. traversal, and
write_note/delete_note only accept markdown paths — the deny/allow policy applies equally to
reads, writes, and deletes, so a mutation can never escape into .git/, .obsidian/, or agent
dirs. To hide (and block writes/deletes to) additional folders, override VAULT_DENIED_PREFIXES
with your extra prefixes.
Quick start (C3)
Scaffold your own copy with Cloudflare's C3:
npm create cloudflare@latest vault-mcp -- --template wakita181009/vault-mcp
cd vault-mcpThat clones the project and installs dependencies — but not the one-time setup: you still create the KV namespace, GitHub OAuth app, and fine-grained PAT (Contents: Read and write), and set the secrets. Continue with Setup from step 2 (step 1 is done for you). Cloning the repo directly works too; then start from step 0.
Setup
0. Prereqs
pnpm install
pnpm exec wrangler login # Cloudflare auth1. Point it at your vault
Your vault target (VAULT_OWNER / VAULT_REPO) and login allowlist
(VAULT_ALLOWED_GITHUB_LOGINS) are secrets, set in step 5 — you don't edit
wrangler.jsonc to point it at your repo. The committed wrangler.jsonc ships
generic; its only per-deploy value is the KV namespace id (step 2). Everything
else defaults in src/config.ts and is optional — override any of these per deploy
with wrangler secret put <NAME>:
VAULT_BRANCH— branch of the vault repo to read (defaultmain).VAULT_ALLOWED_PREFIXES/VAULT_DENIED_PREFIXES— see Access scope above.
2. Create the KV namespace (stores OAuth grants)
pnpm exec wrangler kv namespace create OAUTH_KVPut the returned id into wrangler.jsonc under kv_namespaces[0].id.
3. Create the PAT for accessing the vault
GitHub → Settings → Developer settings → Fine-grained tokens → Generate:
Resource owner: your account, Repository access: Only your vault repo
Permissions: Contents → Read and write
Save the token for VAULT_GITHUB_TOKEN below.
4. Create the GitHub OAuth App (login)
You need two apps (or reuse one with a second callback): local + production.
GitHub → Settings → Developer settings → OAuth Apps → New:
Local: Homepage
http://localhost:8788, Callbackhttp://localhost:8788/callbackProd: Homepage
https://vault-mcp.<subdomain>.workers.dev, Callbackhttps://vault-mcp.<subdomain>.workers.dev/callback
Note each app's Client ID and generate a Client Secret.
5a. Run locally
cp .dev.vars.example .dev.vars # LOCAL OAuth app, PAT, vault owner/repo/logins
openssl rand -hex 32 # value for COOKIE_ENCRYPTION_KEY
pnpm dev # http://localhost:8788/mcpTest with the MCP inspector:
pnpm dlx @modelcontextprotocol/inspector@latest
# connect to http://localhost:8788/mcp, complete the GitHub login5b. Deploy to production
pnpm exec wrangler secret put GITHUB_CLIENT_ID # PROD OAuth app
pnpm exec wrangler secret put GITHUB_CLIENT_SECRET
pnpm exec wrangler secret put COOKIE_ENCRYPTION_KEY # openssl rand -hex 32
pnpm exec wrangler secret put VAULT_GITHUB_TOKEN # fine-grained PAT, Contents R/W on the vault repo
pnpm exec wrangler secret put VAULT_OWNER # GitHub owner of the vault repo
pnpm exec wrangler secret put VAULT_REPO # vault repo name
pnpm exec wrangler secret put VAULT_ALLOWED_GITHUB_LOGINS # comma-separated allowed logins
pnpm run deployEndpoint: https://vault-mcp.<subdomain>.workers.dev/mcp
6. Connect the clients
claude.ai (Web): Settings → Connectors → add custom connector with the
/mcpURL. Registration is Web-only; it then syncs to Desktop and the iPhone app.Claude Code:
claude mcp add --transport http vault https://vault-mcp.<subdomain>.workers.dev/mcp(completes the OAuth flow in the browser). Works even on a Mac that has not cloned the vault.
Development
pnpm typecheck # verify generated Worker types, then run tsc --noEmit
pnpm lint # biome lint ./src
pnpm test # vitest run
pnpm cf-typegen # regenerate worker-configuration.d.ts after editing wrangler.jsonc
pnpm dev # local Worker at :8788Secrets are typed in src/env.d.ts (they are not part of the wrangler types output).
After changing wrangler.jsonc bindings/vars, rerun pnpm cf-typegen.
Layout
src/
├── index.ts # OAuthProvider + VaultMCP (McpAgent) wiring; registers the tools
├── tools.ts # MCP tool handlers (list/read/write/delete/search) + result & allowlist helpers
├── guard.ts # login-allowlist gate wrapping the MCP API handler
├── vault.ts # GitHub API access layer: list/read/write/delete/search + path-visibility policy
├── config.ts # env schema + defaults; parseEnv validates at startup
├── env.d.ts # secret bindings type augmentation
└── auth/
├── github-handler.ts # GitHub OAuth login flow (Hono)
├── approval-dialog.ts # OAuth approval dialog + HTML sanitization
├── workers-oauth-utils.ts # OAuth state / CSRF / approved-clients cookie
└── utils.ts # upstream OAuth authorize URL + token exchangeTests live in tests/ (Vitest), mirroring the src/ layout.
Derived from Cloudflare's remote-mcp-github-oauth template.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceRemote MCP server that exposes a personal git repository of markdown notes to Claude, enabling reading, writing, searching, and running scripts with automatic git commits and GitHub OAuth authentication.MIT
- Alicense-qualityDmaintenanceBidirectional MCP server that connects Claude with an Obsidian vault, enabling note management, full-text search, graph traversal, and daily notes operations.3,697MIT
- Alicense-qualityCmaintenanceA small, authenticated remote MCP server that lets an AI app safely read and write one GitHub repository, built for a second-brain / Obsidian vault stored on GitHub.MIT
- Flicense-qualityCmaintenanceRemote MCP server for Obsidian vault access, giving Claude read/search/archive access to markdown notes via OAuth 2.1 + PKCE auth.2
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wakita181009/vault-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server