NativeAIHub
Obsidian MCP Server

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.

MCP Server·3 sections·1 min read
productivitycontent
Install Prompt

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

Your local knowledge base, accessible to your agent

Unlike cloud tools, Obsidian vaults live on your local machine. This MCP server bridges your local knowledge base and your AI agent through the Obsidian Local REST API plugin. Everything stays on your hardware while giving the agent read and write access to your entire vault.
🔍
Search and ReadQuick keyword search or advanced regex search across your vault. Read single notes or batch multiple files at once.
✏️
Create and UpdateWrite new notes anywhere in your vault, append content to existing notes, or insert text at specific locations.
📅
Periodic NotesAccess daily notes, weekly notes, and other periodic formats. Track recent changes and modifications.

02Real Scenarios

1

"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.

2

"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.

3

"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.

4

"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

1

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).

2

Add to Config

Add the STDIO config to ~/.claude.json with OBSIDIAN_API_KEY and OBSIDIAN_API_URL as environment variables.

3

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.

Treat the API key like any other credential. Although the REST API is local only, do not commit it to version control or share it in plain text.