Skip to main content
Glama

MCP Obsidian

by alexhholmes

mcp-obsidian

An MCP (Model Context Protocol) server for semantic search in Obsidian vaults using embedded ChromaDB vector storage.

Features

  • 🔍 Semantic search across your Obsidian vaults using vector embeddings

  • 📅 Temporal search to find notes by modification date with optional semantic filtering

  • 📁 Support for multiple vault configurations

  • 🔄 Real-time monitoring with automatic re-indexing after file change

  • 🔁 Manual re-indexing on demand via the reindex_vaults tool

  • 🚀 Fast, incremental updates with ChromaDB backend

  • 🔒 Thread-safe operations for concurrent access

  • 🔧 Works as both MCP server and CLI tool

Prerequisites

  • Python 3.10 or higher

  • uv package manager

Installation

Install uv (if not already installed)

# macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh # Windows powershell -c "irm https://astral.sh/uv/install.ps1 | iex" # Or with pip pip install uv

Install mcp-obsidian

  1. Clone the repository:

git clone https://github.com/yourusername/mcp-obsidian.git cd mcp-obsidian
  1. Create and activate a virtual environment with uv:

uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
  1. Install the package in development mode:

uv pip install -e .

This will install all dependencies including:

  • questionary (interactive CLI)

  • chromadb (vector database)

  • langchain-text-splitters (document chunking)

  • fastmcp (MCP server framework)

  • watchdog (file system monitoring)

Configuration

Initial Setup

Configure your Obsidian vaults:

mcp-obsidian configure

This interactive command will:

  1. Prompt you to select vault directories

  2. Name each vault for easy reference

  3. Store configuration in ~/.mcp-obsidian/config.json

Manual Configuration

You can also manually edit ~/.mcp-obsidian/config.json:

{ "vaults": [ { "name": "Personal Notes", "path": "/path/to/your/obsidian/vault" }, { "name": "Work Docs", "path": "/path/to/another/vault" } ] }

Usage

As an MCP Server

Run the server for use with MCP-compatible clients:

mcp-obsidian

The server exposes the following tools:

  • search_notes: Search across all configured vaults with semantic matching

  • search_vault: Search within a specific vault

CLI Usage

Search directly from the command line:

# Search all vaults mcp-obsidian search "your search query" # Search a specific vault mcp-obsidian search "your search query" --vault "Personal Notes" # Reconfigure vaults mcp-obsidian configure # Rebuild search index mcp-obsidian index

Integration with Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{ "mcpServers": { "obsidian": { "command": "mcp-obsidian" } } }

How It Works

  1. Indexing: The server reads all markdown files from configured vaults and creates vector embeddings using ChromaDB

  2. Chunking: Large documents are split into smaller chunks using recursive character splitting for better search granularity

  3. Search: Queries are converted to embeddings and matched against the document database using cosine similarity

  4. File Watching: The server monitors vault directories for changes and automatically updates the index

License

MIT License

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Enables semantic search across Obsidian vaults using vector embeddings and ChromaDB. Supports multiple vaults with real-time indexing and provides both MCP server and CLI interfaces for natural language querying of notes.

  1. Features
    1. Prerequisites
      1. Installation
        1. Install uv (if not already installed)
        2. Install mcp-obsidian
      2. Configuration
        1. Initial Setup
        2. Manual Configuration
      3. Usage
        1. As an MCP Server
        2. CLI Usage
        3. Integration with Claude Desktop
      4. How It Works
        1. License

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/alexhholmes/mcp-obsidian'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server