Dual Obsidian vault architecture with knowledge graphs and glowing connections
MCP Server • Production Ready • v1.0

Obsidian MCP Server

Enable AI assistants to read and write your Obsidian notes via WebSocket and HTTP/SSE. Dual-vault support for Personal and Work vaults with auto-discovery.

2
Vaults Connected
2
Transport Types
Auto-Discovery
Multi-Client

What is Obsidian MCP?

An Obsidian plugin that implements a Model Context Protocol (MCP) server, enabling Claude Code and Claude Desktop to interact directly with your Obsidian vaults. No more copying and pasting - your AI assistant can read your notes, search your vault, and create new content automatically.

Example: Personal Vault

Port 22360 • Projects, learning, personal notes, creative work

Example: Work Vault

Port 22361 • Client work, documentation, daily tasks, professional notes

Why dual vaults? Keep personal and professional knowledge separate while giving your AI assistant access to both simultaneously. Query across contexts without manual vault switching. Each vault runs on its own port with independent configuration.

Key Features

🔌

Dual Transport

Supports both WebSocket (for Claude Code) and HTTP/SSE (for Claude Desktop) simultaneously.

🔍

Auto-Discovery

Claude Code automatically finds and connects to your vaults. No manual configuration needed.

📝

File Operations

Read, write, search, list files. Complete vault access through MCP protocol.

🗂️

Workspace Context

Provides current active file and vault structure to AI assistants for better context.

👥

Multiple Clients

Connect both Claude Code and Claude Desktop to the same vault simultaneously.

⚙️

Configurable Ports

Avoid conflicts when running multiple vaults with separate port assignments.

Setup Guide

1. Install Obsidian Plugin

Option A: From Community Plugins (Coming Soon)

  1. Open Obsidian Settings → Community Plugins
  2. Browse and search for "Claude Code MCP"
  3. Click Install, then Enable

Option B: Manual Installation (Current)

# Clone the repository
cd /Users/demo/dev/tools/work/mcp/
git clone https://github.com/iansinnott/obsidian-claude-code-mcp.git

# Install dependencies and build
cd obsidian-claude-code-mcp
npm install
npm run build

# Copy to your vault's plugin directory
cp -r . /path/to/vault/.obsidian/plugins/obsidian-claude-code-mcp/

2. Configure Plugin Ports

In each vault's plugin settings:

Personal Vault

Port: 22360

Purpose: Business, entrepreneurship, learning

Work Vault

Port: 22361

Purpose: Property management work

3. Configure Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "obsidian-personal": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:22360/sse"],
      "env": {}
    },
    "obsidian-work": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:22361/sse"],
      "env": {}
    }
  }
}

Note: Claude Desktop requires the mcp-remote bridge tool (automatically downloaded via npx) because it doesn't directly support HTTP transports.

4. Claude Code Setup (Optional)

Claude Code automatically discovers Obsidian vaults via WebSocket - no configuration needed!

  1. Install and enable the plugin in Obsidian
  2. Run claude in your terminal
  3. Use the /ide command
  4. Select "Obsidian" from the IDE list
  5. Claude Code will automatically connect

5. Verify Setup

Test Commands in Your AI Assistant:

  • • "What files are in my personal vault Business folder?"
  • • "Show me tasks from my work vault"
  • • "Read my Business/_Overview.md from personal vault"
  • • "Create a daily note for today in both vaults"

Available MCP Tools

obsidian_list_files_in_vault

Lists all files and directories in the root directory of your vault.

Returns: Array of file/directory names

obsidian_list_files_in_dir

Lists all files and directories in a specific directory path (relative to vault root).

Parameters: dirpath (string)

obsidian_get_file_contents

Returns the content of a single file in your vault.

Parameters: filepath (string, relative to vault root)

obsidian_simple_search

Simple text search across all files in the vault with configurable context length.

Parameters: query (string), context_length (integer, default 100)

obsidian_complex_search

Complex search using JsonLogic queries with pattern matching (glob/regexp).

Parameters: query (JsonLogic object)

obsidian_patch_content

Insert content into existing notes relative to headings, blocks, or frontmatter.

Operations: append, prepend, replace

obsidian_append_content

Append content to a new or existing file in the vault.

Parameters: filepath (string), content (string)

obsidian_delete_file

Delete a file or directory from the vault (requires confirmation).

Parameters: filepath (string), confirm (boolean, must be true)

obsidian_batch_get_file_contents

Return contents of multiple files concatenated with headers.

Parameters: filepaths (array of strings)

obsidian_get_periodic_note

Get current periodic note for the specified period (daily, weekly, monthly, etc.).

Parameters: period (daily/weekly/monthly/quarterly/yearly)

obsidian_get_recent_periodic_notes

Get most recent periodic notes with optional content inclusion.

Parameters: period, limit (default 5), include_content (boolean)

obsidian_get_recent_changes

Get recently modified files in the vault.

Parameters: limit (default 10), days (default 90)

Common Use Cases

Knowledge Management

  • • Ask your AI assistant to summarize notes on specific topics
  • • Create new notes from conversation insights
  • • Search across all notes for information
  • • Organize and tag existing content

Daily Productivity

  • • Create and update daily notes automatically
  • • Track tasks and project progress
  • • Extract action items from meetings
  • • Generate weekly summaries

Research & Writing

  • • Compile research from multiple notes
  • • Generate outlines from scattered ideas
  • • Find connections between concepts
  • • Create literature notes from sources

Work Separation

  • • Keep personal and work vaults separate
  • • Context-switch between different projects
  • • Maintain professional boundaries
  • • Access both vaults from same AI assistant instance

Troubleshooting

AI Assistant Can't See Vaults

  1. Verify Obsidian is open with both vaults
  2. Check plugin is enabled in both vaults
  3. Restart Claude Desktop
  4. Verify ports are correct (22360 and 22361)

Port Conflicts

If you get port conflict errors:

  • Personal vault must use port 22360
  • Work vault must use port 22361
  • Check plugin settings in each vault
  • Close and reopen Obsidian if changing ports

Update the Plugin

cd /Users/demo/dev/tools/work/mcp/obsidian-claude-code-mcp
git pull
npm install
npm run build

# Copy to both vault plugin directories
cp -r dist/* /path/to/personal-vault/.obsidian/plugins/obsidian-claude-code-mcp/
cp -r dist/* /path/to/work-vault/.obsidian/plugins/obsidian-claude-code-mcp/

Technical Details

Tech Stack

  • Language: TypeScript
  • Framework: Obsidian Plugin API
  • Transport: WebSocket + HTTP/SSE
  • Protocol: Model Context Protocol (MCP)
  • Platform: Cross-platform (macOS, Windows, Linux)

Architecture

  • Dual Transport: WebSocket for Claude Code, HTTP/SSE for Claude Desktop
  • Ports: Configurable per vault (default 22360+)
  • Security: Local-only connections (localhost)
  • Multi-Client: Simultaneous connections supported

My Setup

  • Personal Vault: /Users/demo/Documents/06_Vaults/Personal (Port 22360)
  • Work Vault: /Users/demo/Documents/06_Vaults/Work (Port 22361)
  • Plugin Source: /Users/demo/dev/tools/work/mcp/obsidian-claude-code-mcp
  • Clients: Both Claude Desktop and Claude Code

Business Impact

How connecting AI to your knowledge base transforms productivity and decision-making

🚀

Context Retrieval

90%

Faster access to relevant context. AI reads your notes directly instead of manual copy-paste. Search thousands of notes instantly. No more "where did I write that?"

🧠

Knowledge Integration

2 Vaults

Seamless access to both Personal and Work knowledge. AI maintains context separation while enabling cross-vault insights when appropriate.

Workflow Automation

100%

Automated documentation generation. Project templates from notes. Meeting notes transformed into action items. Knowledge graphs built automatically.

Real-World Applications

📝

Documentation Generation

This portfolio website was built entirely from Obsidian notes. AI reads project documentation, extracts details, and generates complete HTML pages with consistent formatting.

🏢

Property Management Automation

Work vault contains HOA documentation, property details, compliance requirements. AI generates resale certificates, pulls relevant regulations, creates document templates automatically.

💡

Learning & Research

Personal vault tracks technical learning, code snippets, architecture patterns. AI answers questions like "How did I implement OAuth in that project?" by searching your actual implementation notes.

🔍

Decision Support

Cross-reference meeting notes, project decisions, and historical context. AI provides data-backed recommendations by analyzing your documented experiences and outcomes.

Why Dual-Vault Matters

Personal vault: entrepreneurial ventures, technical learning, side projects. Work vault: day job documentation, HOA management, professional tasks. Separate contexts, unified AI access. No context bleeding, but cross-vault insights when you need them.

Related Projects

Connect Your Knowledge

Give AI assistants direct access to your Obsidian vaults. No more copy-paste.