mcp-duckvault
Provides a RAG system for your Obsidian Vault using DuckDB and vector search, enabling semantic search and note retrieval through AI agents.
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
watchdogto 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
vssextension 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:
- Start an interactive session:
copilot(orgh copilot chat). - Run the
/mcp addcommand 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。