Obsidian MCP Server
Connect your AI agent to your Obsidian vault. Search notes, create and update content, navigate your knowledge graph, and bridge your local knowledge base with your AI workflow.
Paste this into Claude Code to set it up:
I want to add the Obsidian MCP Server to my Claude Code setup.
IMPORTANT: Never use Read/Edit tools on ~/.claude.json. Use jq via Bash instead.
Prerequisites:
1. Install the "Local REST API" community plugin in Obsidian (Settings > Community Plugins > search for "Local REST API")
2. Enable the plugin and note the API key and port (default is 27123)
3. Obsidian must be running for the MCP server to connect
Run this command to add the MCP server (replace the API key and URL if your port differs):
```bash
jq '.mcpServers["obsidian"] = {"type": "stdio", "command": "npx", "args": ["-y", "@anthropic/obsidian-mcp"], "env": {"OBSIDIAN_API_KEY": "your-api-key", "OBSIDIAN_API_URL": "https://127.0.0.1:27123"}}' ~/.claude.json > /tmp/claude-json-tmp && mv /tmp/claude-json-tmp ~/.claude.json
```
After adding, restart Claude Code. Make sure Obsidian is running with the Local REST API plugin enabled. The agent will have read and write access to your entire vault.01What It Does
02Real Scenarios
"Find my notes about the pricing strategy meeting"
The agent searches your vault, reads relevant files, and presents a summary. If notes span multiple files, it synthesizes them.
"Create a research note about LLM fine tuning"
The agent creates a structured note in your research folder with sections for key concepts, approaches, open questions, and references.
"Append today's meeting notes to the project page"
The agent finds the project page and appends notes under a new dated section, preserving everything already there.
"Summarize my daily notes from this week"
The agent retrieves each day's notes, reads through them, and provides a consolidated summary of themes and open threads.
03Setup
Install the Local REST API Plugin
In Obsidian, go to Settings > Community Plugins, search for "Local REST API," install and enable it. Note the API key and port (default 27123).
Add to Config
Add the STDIO config to ~/.claude.json with OBSIDIAN_API_KEY and OBSIDIAN_API_URL as environment variables.
Keep Obsidian Running
The REST API only works while Obsidian is open. If the agent cannot connect, check that Obsidian is running and the plugin is enabled.