Obsidian MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
cd ~/obsidian-mcp-server
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "OBSIDIAN_VAULT_PATH=${OBSIDIAN_VAULT_PATH}" obsidian-mcp-server -- node "<FULL_PATH_TO_OBSIDIAN_MCP_SERVER>/dist/index.js"

Replace <FULL_PATH_TO_OBSIDIAN_MCP_SERVER>/dist/index.js with the actual folder you prepared in step 1.

Required:OBSIDIAN_VAULT_PATH+ 1 optional
README.md

Provides real-time Claude AI access to Obsidian vaults via MCP

Obsidian MCP Server

Provides real-time Claude AI access to Obsidian vaults via Model Context Protocol (MCP)

Overview

This MCP server enables Claude to query, search, and read notes from Obsidian vaults without token limitations. Unlike Claude Projects which load all documents into context, this server provides dynamic, on-demand access to your knowledge base.

Features

  • Real-time Vault Access: Query and read notes dynamically without pre-uploading
  • Automatic Index Updates: File system watcher automatically updates vector index when notes change (v1.3.0)
  • Vector Search: Semantic search using local embeddings (Transformers.js) or Anthropic API
  • Hybrid Search: Combines keyword and semantic search for optimal results
  • Write Operations: Create, update, and delete notes programmatically
  • Search Tools: Keyword, tag, and folder-based filtering
  • Multiple Formats: JSON and Markdown response formats
  • Secure: Path validation and security checks prevent unauthorized access
  • Token Efficient: No vault size limitations or token constraints

Quick Start

Prerequisites

  • Node.js 18+ (recommended: 20+)
  • TypeScript 5.7+
  • Obsidian vault with markdown notes
  • Claude Desktop or MCP-compatible client

Installation

Windows (PowerShell):

# 1. Clone or navigate to repository
cd /path/to/obsidian-mcp-server

# 2. Install dependencies
npm install

# 3. Build TypeScript
npm run build

# 4. Verify build succeeded
Test-Path dist\index.js  # Should return True

macOS/Linux (Bash):

# 1. Clone or navigate to repository
cd ~/obsidian-mcp-server

# 2. Install dependencies
npm install

# 3. Build TypeScript
npm run build

# 4. Verify build succeeded
ls dist/index.js  # Should exist

Configuration

Option 1: Environment Variable (Recommended)

Windows (PowerShell):

# Set vault path (replace with your vault location)
$env:OBSIDIAN_VAULT_PATH = "C:\Users\YourName\Documents\ObsidianVault"

# Test server
node dist\index.js

macOS/Linux (Bash):

# Set vault path (replace with your vault location)
export OBSIDIAN_VAULT_PATH="/Users/YourName/Documents/ObsidianVault"

# Test server
node dist/index.js
Option 2: Configuration File

Create config.json in the project root:

{
  "includePatterns": ["**/*.md"],
  "excludePatterns": [".obsidian/**", ".trash/**", "node_modules/**"],
  "enableWrite": true,
  "vectorSearch": {
    "enabled": true,
    "provider": "transformers",
    "model": "Xenova/all-MiniLM-L6-v2",
    "indexOnStartup": "auto"
  },
  "searchOptions": {
    "maxResults": 20,
    "excerptLength": 200,
    "caseSensitive": false,
    "includeMetadata": true
  },
  "logging": {
    "level": "info",
    "file": "logs/mcp-server.log"
  }
}

Choosing the Right Embedding Model:

The default model (Xenova/all-MiniLM-L6-v2) works well for most users. Consider upgrading based on your hardware:

  • High-end CPU (Ryzen 9+, i9+, M3 Max+): Use Xenova/bge-base-en-v1.5 for best quality
  • Mid-range CPU (Ryzen 5-7, i5-i7, M2): Use Xenova/bge-small-en-v1.5 for improved quality
  • Multilingual vault: Use Xenova/paraphrase-multilingual-MiniLM-L12-v2

See Semantic Search Guide for detailed model comparison.

Initial Indexing (Required for Large Vaults)

Important: For vaults with 1,000+ notes or when switching embedding models, run initial indexing standalone before using Claude Desktop.

Quick Start:

# Windows
$env:OBSIDIAN_VAULT_PATH = "X:\Path\To\Your\Vault"
$env:OBSIDIAN_CONFIG_PATH = "D:\repos\obsidian-mcp-server\config.json"
node --expose-gc --max-old-space-size=16384 dist\index.js
# macOS/Linux
export OBSIDIAN_VAULT_PATH="/path/to/vault"
export OBSIDIAN_CONFIG_PATH="$HOME/obsidian-mcp-server/config.json"
node --expose-gc --max-old-space-size=16384 dist/index.js

After indexing completes, configure Claude Desktop (see below) for daily usage.

📚 See Indexing Workflow Guide for detailed instructions, troubleshooting, and model switching procedures.

Claude Desktop Integration

Windows

Edit Claude Desktop configuration:

# Config location: %APPDATA%\Claude\claude_desktop_config.json
notepad "$env:APPDATA\Claude\claude_desktop_config.json"

Add this configuration:

{
  "mcpServers": {
    "obsidian": {
      "command": "node",
      "args": ["/path/to/obsidian-mcp-server/dist/index.js"],
      "env": {
        "OBSIDIAN_VAULT_PATH": "C:\\Users\\YourName\\Documents\\ObsidianVault"
      }
    }
  }
}
macOS

Edit Claude Desktop configuration:

# Config location: ~/Library/Application Support/Claude/claude_desktop_config.json
vi ~/Library/Application\ Support/Claude/claude_desktop_config.json

Add this configuration:

{
  "mcpServers": {

Tools (3)

searchPerform keyword or semantic search across the Obsidian vault
read_noteRead the content of a specific note from the vault
write_noteCreate or update a note in the vault

Environment Variables

OBSIDIAN_VAULT_PATHrequiredThe absolute file system path to the Obsidian vault directory
OBSIDIAN_CONFIG_PATHPath to the optional config.json file

Configuration

claude_desktop_config.json
{"mcpServers": {"obsidian": {"command": "node", "args": ["/path/to/obsidian-mcp-server/dist/index.js"], "env": {"OBSIDIAN_VAULT_PATH": "C:\\Users\\YourName\\Documents\\ObsidianVault"}}}}

Try it

→Search my vault for notes related to 'project architecture' and summarize the key decisions.
→Find all notes tagged with #meeting and extract the action items.
→Create a new note titled 'Meeting Notes' with the summary of our current conversation.
→Read the note 'Daily Journal' from yesterday and tell me what I worked on.

Frequently Asked Questions

What are the key features of Obsidian MCP Server?

Real-time vault access without token limitations. Automatic vector index updates via file system watcher. Hybrid search combining keyword and semantic search. Programmatic note creation, updates, and deletion. Support for multiple embedding models via Transformers.js.

What can I use Obsidian MCP Server for?

Querying large personal knowledge bases that exceed standard AI context windows. Automating the capture of meeting notes directly into an Obsidian vault. Performing semantic discovery across years of research notes. Maintaining a synchronized knowledge base between AI assistants and local markdown files.

How do I install Obsidian MCP Server?

Install Obsidian MCP Server by running: cd ~/obsidian-mcp-server && npm install && npm run build

What MCP clients work with Obsidian MCP Server?

Obsidian MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Obsidian MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare