OBSIDIANMCP Server
Bridge between AI agents and your Obsidian vault. Read, search, create, and update notes — plus manage frontmatter, tags, and full-text search/replace across your entire knowledge base.
WHAT IT DOES
The Obsidian MCP Server bridges AI agents to your Obsidian vault through the Local REST API plugin. It turns your vault into a queryable, writable knowledge base — a natural fit for anyone using Obsidian as a personal wiki, research repository, or daily journal. The agent pulls context from your existing notes to give more grounded, personalized answers.
Two connection options:
- HTTP (recommended) — non-encrypted local server, typically at
http://127.0.0.1:27123. Simplest setup. - HTTPS — encrypted endpoint at
https://127.0.0.1:27124with a self-signed certificate. RequiresOBSIDIAN_VERIFY_SSL=false.
What you can do:
- Read notes — retrieve content and metadata in markdown or JSON format
- Search vault — full-text and regex search across the entire vault with pagination and path filtering
- Create & update — write new notes or modify existing ones via append, prepend, or overwrite
- Search & replace — find-and-replace within a specific note using text or regex
- Frontmatter — get, set, or delete YAML frontmatter keys atomically
- Tags — add, remove, or retrieve tags from notes (frontmatter and inline)
- List directories — browse files and subdirectories with filtering by extension or name
- Delete notes — permanently remove files from the vault
Prerequisites
- Obsidian installed with a vault open
- Local REST API plugin enabled — go to Settings > Community plugins, search "Local REST API", install and enable it
- API key — generated in the plugin settings (copy it for the next step)
- Node.js v18+ with npm
Setup — Claude Code
- Run:
claude mcp add obsidian-server -e OBSIDIAN_API_KEY=YOUR_KEY -e OBSIDIAN_BASE_URL=http://127.0.0.1:27123 -- npx obsidian-mcp-server - Start a new Claude Code instance
- Use
/mcpto verify the server is connected
Setup — Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"obsidian": {
"command": "npx",
"args": ["obsidian-mcp-server"],
"env": {
"OBSIDIAN_API_KEY": "YOUR_KEY",
"OBSIDIAN_BASE_URL": "http://127.0.0.1:27123"
}
}
}
}
Setup — Cursor / VS Code / Windsurf
Add to your MCP configuration (.mcp.json or editor settings):
{
"servers": {
"obsidian": {
"command": "npx",
"args": ["obsidian-mcp-server"],
"env": {
"OBSIDIAN_API_KEY": "YOUR_KEY",
"OBSIDIAN_BASE_URL": "http://127.0.0.1:27123"
}
}
}
}
Example prompts
"Search my vault for everything I've written about microservices architecture and summarize it."
"Create a new note in Projects titled 'CLI Rewrite Plan' with sections for goals, timeline, and open questions."
"Read today's daily note and pull out all action items into a bullet list."
"Find all notes tagged #product-ideas and identify common themes across them."
Tips for better results
Keep your vault organized with clear folder structures and consistent tagging — the agent's search results improve dramatically with well-named notes and meaningful frontmatter. For large vaults, the built-in cache (enabled by default, refreshes every 10 minutes) keeps operations fast. If you're on HTTPS, set OBSIDIAN_VERIFY_SSL=false to avoid self-signed certificate errors.