obsidian-vault-mcp

obsidian-vault-mcp

Enables AI agents to list, read, search, create, update, rename, and delete markdown notes in a local Obsidian vault via an HTTP MCP endpoint.

Category
Visit Server

README

Obsidian Vault MCP

HTTP Model Context Protocol server that gives AI agents controlled access to a local Obsidian vault.

Built for agent runtimes (Grok bots, Claude, OpenClaw, custom MCP clients) that need to list, read, search, create, update, rename, and carefully delete markdown notes.

Features

  • Streamable HTTP MCP endpoint (/mcp)
  • Bearer / API-key auth
  • Full-vault mode (ALLOWLIST=*) or folder allowlists
  • Read tools: list_notes, list_folder, read_note, search_notes
  • Write tools: create_note, append_note, update_note, create_folder, rename_path, delete_path
  • Blocks .obsidian, .git, dotfiles, .env, and key material
  • Atomic writes + size limits
  • Health endpoint for ops: /healthz

Quick start

npm install
export VAULT_ROOT="/absolute/path/to/your/vault"
export BEARER_TOKEN="$(openssl rand -hex 32)"
export ALLOWLIST="*"
export WRITE_ALLOWLIST="*"
export MODE="read-write"
export PORT=8790
export BIND=127.0.0.1
export PUBLIC_BASE="http://127.0.0.1:8790"
npm start

Health check:

curl -s http://127.0.0.1:8790/healthz | jq .

Environment variables

Variable Required Default Description
VAULT_ROOT yes Absolute path to the Obsidian vault
BEARER_TOKEN yes Shared secret for MCP clients
ALLOWLIST no sample folders Comma list of relative folders, or * for whole vault
WRITE_ALLOWLIST no same as ALLOWLIST Write scope; * = whole vault (still blocks secrets/dotfiles)
MODE no read-write read-write or read-only
PORT no 8790 Listen port
BIND no 127.0.0.1 Bind address
PUBLIC_BASE no http://127.0.0.1:8790 Public base URL advertised in metadata
MAX_SEARCH_HITS no 25 Search result cap
MAX_FILE_BYTES no 400000 Max note size for reads
MAX_WRITE_BYTES no 350000 Max note size for writes

Auth headers accepted:

  • Authorization: Bearer <token>
  • X-Api-Key: <token>
  • X-Obsidian-Token: <token>

MCP tools

Read

  • list_notes — list markdown paths (optional prefix)
  • list_folder — list files/dirs (recursive optional)
  • read_note — read one note + simple frontmatter
  • search_notes — case-insensitive substring search

Write (when MODE=read-write)

  • create_note — create markdown note (overwrite optional)
  • append_note — append to note
  • update_note — replace full note
  • create_folder — create folder tree
  • rename_path — rename/move file or folder
  • delete_path — delete markdown file or folder (recursive for non-empty)

Safety:

  • never serves .obsidian, .git, hidden paths, .env, or key files
  • write limited to .md / .markdown / .txt
  • protected top-level structure anchors cannot be deleted wholesale
  • no secrets belong in the vault or this server config committed to git

Reverse proxy example (nginx)

location ^~ /obsidian-mcp/ {
  proxy_pass http://127.0.0.1:8790/;
  proxy_http_version 1.1;
  proxy_set_header Host $host;
  proxy_set_header Authorization $http_authorization;
  proxy_set_header X-Api-Key $http_x_api_key;
  proxy_buffering off;
}

Expose only over HTTPS and keep BIND=127.0.0.1 on the Node process.

Grok / agent prompt snippet

You have MCP tools for an Obsidian vault via obsidian-vault-mcp.

Rules:
1. First call list_folder path="" to see top-level structure.
2. Read OBSIDIAN-STRUCTURE.md if present before reorganizing.
3. Prefer append_note for changelogs; do not rewrite history casually.
4. Create notes only as .md under clear topic folders.
5. Never store secrets, tokens, private keys, or .env values.
6. Use search_notes before creating near-duplicate docs.
7. Use rename_path to organize; use delete_path only for clearly obsolete drafts.

Security notes

  • This server is powerful. Treat BEARER_TOKEN like a password.
  • Prefer network isolation + reverse proxy auth in production.
  • Full-vault write mode is intentional for trusted internal agents; tighten WRITE_ALLOWLIST for less-trusted bots.
  • Do not commit .env, tokens, or real vault contents.

License

MIT

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured