Design Engineer Logo
Visit Repo
Open Graph preview

MCP Obsidian

A server implementation for interacting with Obsidian via the Local REST API community plugin

Site favicon
💡 Knowledge Base

Overview

MCP Obsidian Server

Overview

A server implementation for interacting with Obsidian via the Local REST API community plugin.

Components & Tools

The server provides several tools for Obsidian interaction:

  • list_files_in_vault: Browse all files/directories in vault root
  • list_files_in_dir: Browse specific directory contents
  • get_file_contents: Retrieve single file content
  • search: Full-text search across vault
  • patch_content: Insert content relative to headings/references
  • append_content: Add content to new/existing files

Example Usage

First instruct Claude to use Obsidian. Example prompts:

  1. "Get and summarise last architecture call notes"
  2. "Find Azure CosmosDB mentions and explain context"
  3. "Create meeting summary note with email intro"

Configuration

Obsidian REST API Key Setup

Two configuration methods:

1. Server Config (Recommended)

{
    "mcp-obsidian": {
        "command": "uvx",
        "args": ["mcp-obsidian"],
        "env": {
            "OBSIDIAN_API_KEY": "<your_api_key_here>"
        }
    }
}

2. Environment File

Create .env file:

OBSIDIAN_API_KEY=your_api_key_here

Installation Guide

Prerequisites

  1. Install Obsidian REST API community plugin
  2. Enable in settings
  3. Copy API key

Claude Desktop Paths

  • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json

Development

Building

Prepare for distribution by syncing dependencies and updating lockfile

Debugging

Use MCP Inspector for optimal debugging:

npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-obsidian run mcp-obsidian

Monitor server logs:

tail -n 20 -f ~/Library/Logs/Claude/mcp-server-mcp-obsidian.log