mcp-duckvault
Provides tools for searching and listing notes in an Obsidian vault using natural language queries, with support for tag filtering and recent note retrieval, returning Obsidian URI links.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-duckvaultFind notes about machine learning projects"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DuckVault-MCP
DuckVault-MCP v0.3.0 is a local RAG server for Obsidian Vaults and Markdown knowledge bases. It combines DuckDB vector search, local GraphRAG, Open Knowledge Format (OKF) support, and an offline interactive graph viewer behind an MCP interface.
Quick Start — v0.3.0
1. Prerequisites
Python 3.11 or newer
An Obsidian Vault or directory containing Markdown files
An absolute path to that directory
2. Install
From a local checkout:
git clone https://github.com/caron14/mcp-duckvault.git
cd mcp-duckvault
uv tool install .Alternatively, install the packaged release:
uv tool install mcp-duckvault3. Run the first sync
Use a dedicated database file for each Vault:
duckvault /absolute/path/to/vault \
--db-path ~/.duckvault/my-vault.db \
--sync-onlyThe first sync may download intfloat/multilingual-e5-small. Later starts load
the model from ~/.duckvault/models and only re-index changed Markdown files.
4. Connect Claude Code
claude mcp add duckvault -- \
duckvault /absolute/path/to/vault \
--db-path ~/.duckvault/my-vault.db
claude mcp listThe registered command performs an incremental sync before starting the MCP server. Running the first sync separately avoids a model download during the initial MCP connection.
5. Try the retrieval tools
Ask your AI agent:
“Find notes about customer revenue.”
“Find notes tagged
salesthat discuss orders.”“Use
find_related_notesfortables/orders.md.”“Use
hybrid_search_notesto find customer metrics and linked notes.”“List OKF concepts with type
tableand tagsales.”“Explain the OKF concept
tables/orders.”
6. Generate the offline graph viewer
duckvault /absolute/path/to/vault \
--db-path ~/.duckvault/my-vault.db \
--visualize \
--output ./duckvault-graph.htmlThis writes:
duckvault-graph.html
duckvault-graph.jsonOpen the HTML file in a modern browser. It contains the graph data and Cytoscape.js, requires no backend or network connection, and does not embed the Markdown bodies.
Related MCP server: EzRAG MCP Server
Features
Area | Capability |
Vector RAG | Local E5 embeddings, DuckDB VSS, cosine similarity, optional tag filtering |
GraphRAG | Markdown links, Wiki links, headings, tags, folders, resources, and citations |
OKF | Concept detection, type/resource/tag metadata, reserved |
Hybrid retrieval | Vector seeds expanded through graph relationships and reranked |
Visualization | Self-contained HTML plus canonical JSON with search, filters, layouts, and diagnostics |
Indexing | MD5-based incremental sync, |
Integration | MCP tools with direct Obsidian links |
All indexed content and graph data remain local. Initial setup may download the DuckDB VSS extension and embedding model. The generated graph viewer makes no network requests; external resource links are opened only when selected.
How It Works
DuckVault scans Markdown files, excluding configured paths.
It parses YAML frontmatter, splits content at H1-H3 headings, and generates local embeddings.
It extracts document, link, heading, tag, folder, OKF type, resource, and citation graph records into DuckDB.
MCP tools query the vector index, traverse the graph, or combine both.
Visualization mode exports the persisted graph without re-parsing Markdown.
The existing search_notes vector behavior remains available alongside the
GraphRAG and OKF tools.
CLI Reference
duckvault [OPTIONS] VAULT_PATHVAULT_PATH must be an existing directory. Absolute paths are strongly
recommended, and are required in AI agent configuration.
Option | Description |
| DuckDB path. Default: |
| Sync the Vault and exit without starting MCP |
| Sync, generate offline HTML/JSON, and exit |
| Visualization HTML path. Default: |
| Override the JSON sidecar path |
| Enable debug logging on stderr |
Common commands
Start the MCP server and filesystem watcher:
duckvault /absolute/path/to/vaultUse a custom database:
duckvault /absolute/path/to/vault --db-path ./vault-index.dbChoose both visualization output paths:
duckvault /absolute/path/to/vault \
--visualize \
--output ./artifacts/graph.html \
--json-output ./artifacts/graph-data.jsonMCP Tools
Tool | Description |
| Vector similarity search with optional frontmatter tag filtering |
| Notes indexed within the requested number of days |
| Related documents found by graph traversal |
| Neighboring documents and structural graph nodes |
| Vector results reranked with graph relationships |
| OKF concepts filtered by type and tag |
| Structured OKF metadata, links, resources, citations, and related notes |
Hybrid results use:
final_score = 0.7 * vector_similarity + 0.3 * graph_score
graph_score = max(seed_vector_similarity / depth)Document-oriented retrieval results include obsidian://open links.
Graph Visualization
The viewer initially displays documents and document-to-document relationships. The sidebar can enable:
folders
headings
tags
OKF types
resources and citations
dangling link targets
It also provides:
title, path, concept ID, and tag search
type, tag, directory, relation, and structural-node filters
force-directed, concentric, breadth-first, circle, and grid layouts
structured metadata and inbound/outbound relationships
Obsidian and validated HTTP/HTTPS resource links
orphan, dangling-link, duplicate-title, and high-degree diagnostics
The HTML enforces a Content Security Policy that prevents external connections.
The JSON sidecar uses schema version 1.0.
OKF Authoring
Any Markdown file with leading YAML frontmatter containing type is indexed as
an OKF Concept Document.
---
type: table
title: Orders
description: One row per customer order
resource: https://console.example.com/warehouse/orders
tags: [sales, finance]
timestamp: 2026-07-01T00:00:00Z
---
# Orders
Each order belongs to a [customer](./customers.md).
Revenue is defined by [weekly revenue](/metrics/weekly_revenue.md).The Concept ID is the Vault-relative path without .md:
tables/orders.md -> tables/ordersLink resolution:
Link | Resolution |
| Vault root |
| Current document directory |
| Relative parent directory |
| External citation |
Missing local target | Retained as a dangling graph node |
index.md and log.md are stored as navigation/history nodes, not OKF
concepts. Frontmatter fields beyond the standard OKF fields remain available in
node metadata.
Graph mapping
Markdown/OKF element | Graph representation |
Markdown file |
|
H1-H3 heading |
|
Frontmatter or inline tag |
|
Wiki/Markdown link |
|
Directory |
|
OKF |
|
OKF |
|
External URL |
|
AI Agent Setup
Use the same absolute Vault path and database path in every configuration.
Claude Code
claude mcp add duckvault -- \
duckvault /absolute/path/to/vault \
--db-path /absolute/path/to/duckvault.dbClaude Desktop
Add this entry to the mcpServers object in
~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"duckvault": {
"command": "duckvault",
"args": [
"/absolute/path/to/vault",
"--db-path",
"/absolute/path/to/duckvault.db"
]
}
}
}Gemini CLI
gemini mcp add --scope user duckvault \
duckvault /absolute/path/to/vault \
--db-path /absolute/path/to/duckvault.dbVerify with:
gemini mcp listGitHub Copilot CLI
Start Copilot, run /mcp add, and register:
name: duckvault
command: duckvault
args: /absolute/path/to/vault --db-path /absolute/path/to/duckvault.dbConfiguration
Database and model cache
Data | Default location |
DuckDB index |
|
Sentence Transformers cache |
|
Use a separate --db-path for each Vault. Synchronizing an unrelated Vault
against the same database replaces the indexed document set.
Excluding files
Create .vaultignore at the Vault root. Patterns use glob matching.
.obsidian and .trash are always excluded.
# Directories
private/
drafts/
# File patterns
archive-*.mdTroubleshooting
The first start is slow
The embedding model is loaded lazily and tried from the local cache first. If it
is not cached, DuckVault downloads it from Hugging Face. Run --sync-only
before registering MCP to complete this step separately.
MCP fails to connect
Confirm
duckvaultis available in the same environment as the AI agent.Use absolute Vault and database paths.
Run the configured command manually with
--sync-only.Add
--verbose; logs are written to stderr so MCP stdout remains valid.
Notes or graph records look stale
DuckVault normally re-indexes files when their MD5 changes. If parsing, schema, or embedding configuration changed between versions, remove the affected database and run a full sync again:
rm ~/.duckvault/my-vault.db
duckvault /absolute/path/to/vault \
--db-path ~/.duckvault/my-vault.db \
--sync-onlyBack up the database first if it is needed for diagnostics.
The graph viewer is empty
Confirm the sync completed successfully.
Check that Markdown files are not excluded by
.vaultignore.Verify that HTML and JSON output paths differ.
Inspect the JSON sidecar to confirm
stats.documentsis greater than zero.
Broken links appear in diagnostics
This is expected for unresolved local links. DuckVault preserves them as
link_target nodes so they can be found and repaired.
Development
uv sync --all-extras
uv run pytest
uv run black --check src tests
uv run isort --check-only src testsThe functional source of truth is SPECIFICATION.md.
Current Scope
v0.3.0 does not include LLM entity extraction, community detection, community summaries, Global GraphRAG, Neo4j export, GraphML/CSV export, or CI-enforced graph quality gates.
License
DuckVault-MCP is released under the MIT License. The bundled Cytoscape.js
library is also MIT-licensed; its license text is included at
src/mcp_duckvault/assets/CYTOSCAPE_LICENSE.txt.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/caron14/mcp-duckvault'
If you have feedback or need assistance with the MCP directory API, please join our Discord server