mcp-duckvault

mcp-duckvault

Provides a RAG system for your Obsidian Vault using DuckDB and vector search, enabling semantic search and note retrieval through AI agents.

Category
Visit Server

README

DuckVault-MCP

DuckVault-MCP is an MCP (Model Context Protocol) server that provides a RAG (Retrieval-Augmented Generation) system for your Obsidian Vault using DuckDB and vector search.

Features

  • Local Vector Search: Uses sentence-transformers (intfloat/multilingual-e5-small) for local embeddings.
  • Obsidian URI Links: Includes direct links to open notes in Obsidian from search results.
  • Incremental Indexing: Uses MD5 hashing to only update modified files.
  • Real-time Monitoring: Uses watchdog to index changes as you edit your notes.
  • Progress Indicators: Displays a progress bar during initial indexing for large vaults.
  • Fast Search: Leverages DuckDB with the vss extension and HNSW indexing for millisecond-level retrieval.
  • MCP Compatible: Works seamlessly with AI agents like Claude Code or Cursor.

Installation

# Using uv (recommended)
uv tool install mcp-duckvault

# From GitHub directly
uv tool install git+https://github.com/caron14/mcp-obsidian-duckdb.git

# From PyPI (once published)
pip install mcp-duckvault

Usage

Start the MCP server by pointing it to your Obsidian Vault:

duckvault /path/to/your/obsidian/vault

Options

  • --db-path: Path to the DuckDB file (default: ~/.duckvault/vault.db).
  • --sync-only: Perform a full sync of the vault and exit.
  • -v, --verbose: Enable verbose logging.

CLI Examples

Basic usage:

duckvault /path/to/your/obsidian/vault

Custom database path: Specify a custom location for the DuckDB index file.

duckvault /path/to/your/obsidian/vault --db-path ./vault_index.db

Sync only (Headless mode): Index all files and exit without starting the MCP server.

duckvault /path/to/your/obsidian/vault --sync-only

Example Queries for AI Agents

Once connected, you can interact with your vault using natural language through an AI agent:

  • Semantic Search: "Find notes about machine learning projects and list the key concepts mentioned."
  • Filtered Search: "Search for notes about 'meeting' with the tag #work and summarize the action items."
  • Stay Updated: "What are the most important notes I've worked on in the last 3 days?"
  • Cross-Note Analysis: "Based on my recent notes about 'React', how has my understanding of Hooks evolved?"

Excluding Files (.vaultignore)

To exclude specific files or directories from being indexed, create a .vaultignore file in the root of your Obsidian Vault. The syntax is similar to .gitignore.

By default, .obsidian and .trash are always excluded.

Example .vaultignore:

# Exclude specific folders
private/
drafts/

# Exclude specific file types
*.tmp
*.log

Registration for AI Agents

This server is MCP (Model Context Protocol) compliant and can be used with the following agents after you have installed it via uv tool install or pip install.

Note: Please specify the vault path as an absolute path (e.g., /Users/username/Documents/MyVault).

Claude Desktop (macOS)

Add the following to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "duckvault": {
      "command": "duckvault",
      "args": [
        "/absolute/path/to/your/obsidian/vault"
      ]
    }
  }
}

Claude Code

You can add the server persistently using the CLI command (recommended) or by editing the configuration file.

Using the CLI command:

claude mcp add duckvault -- duckvault /absolute/path/to/your/obsidian/vault

By editing the configuration file: Add to ~/.claude.json:

{
  "mcpServers": {
    "duckvault": {
      "command": "duckvault",
      "args": [
        "/absolute/path/to/your/obsidian/vault"
      ]
    }
  }
}

Gemini CLI

You can add the server persistently using the CLI command (recommended) or by editing the configuration file.

Using the CLI command:

gemini mcp add duckvault --scope user duckvault /absolute/path/to/your/obsidian/vault

By editing the configuration file: Add to the mcpServers section of your configuration file (~/.gemini/settings.json).

{
  "mcpServers": {
    "duckvault": {
      "command": "duckvault",
      "args": [
        "/absolute/path/to/your/obsidian/vault"
      ]
    }
  }
}

GitHub Copilot (in the CLI)

GitHub Copilot in the CLI supports MCP servers. You can add the server using the interactive /mcp command or by editing the configuration file.

Using the CLI command:

  1. Start an interactive session: copilot (or gh copilot chat).
  2. Run the /mcp add command and follow the prompts.

By editing the configuration file: Add to ~/.copilot/mcp-config.json:

{
  "mcpServers": {
    "duckvault": {
      "command": "duckvault",
      "args": [
        "/absolute/path/to/your/obsidian/vault"
      ]
    }
  }
}

## MCP Tools

The server exposes the following tools to AI agents:

1. `search_notes(query: str, tag: Optional[str] = None, limit: int = 5)`: Search for relevant notes using natural language.
2. `list_recent_notes(days: int = 7)`: List notes that were recently updated.

## License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured