DuckDB-RAG-MCP-Sample
by nananaman
DuckDB RAG MCP Sample
markdown ドキュメントを埋め込みベクトル化して、MCP から RAG で解説できるようにするサンプルです。
ベクトル化には Plamo-Embedding-1B を使用しています。
機能
markdown ファイルからテキスト抽出・ベクトル化
DuckDB を使用したベクトル検索
Parquet ファイルによるベクトルデータの永続化
MCP からベクトル検索
Related MCP server: RAG-MCP
使用方法
ベクトルデータ生成
最初に検索対象にしたい markdown ファイルを特定のディレクトリに配置し、以下のコマンドで Parquet ファイルに変換してください。
uv run main.py --directory ~/path/to/markdown/files --parquet vectors.parquetMCP の設定
ビルド
以下のコマンドでシングルバイナリが dist/server として生成されます。
uv run pyinstaller --clean --strip --noconfirm --onefile server.pyMCP のクライアント設定
利用したいクライアントに応じて設定してください。
Claude Desktop の場合は以下のような感じです。
VECTOR_PARQUET は先ほど変換したファイルを指定してください。
uv run mcp install server.py -v VECTOR_PARQUET=/path/to/vectors.parquet以下のように設定されます。
{
"mcpServers": {
"DuckDB-RAG-MCP-Sample": {
"command": "/path/to/dist/server",
"env": {
"VECTOR_PARQUET": "/path/to/vectors.parquet"
}
}
}
}開発用サーバー起動
uv run mcp dev server.pyライセンス
DuckDB RAG MCP Sampleは、Apache License, Version 2.0の下で提供されています。
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues
Related MCP Connectors
An MCP server for search and retrieval over a local LanceDB database
Official Duck Framework MCP server for AI-assisted development and project scaffolding.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that indexes documents and serves relevant context to LLMs via Retrieval Augmented Generation (RAG).21 npm36MIT
- FlicenseNot gradedqualityDmaintenanceA Retrieval Augmented Generation MCP server that ingests documents into a local vector database and enables semantic search queries.9-
- AlicenseNot gradedqualityCmaintenanceMCP RAG Server is a Python MCP server that indexes documents in multiple formats (Markdown, text, PowerPoint, PDF) using multilingual-e5-large embeddings and enables vector search for retrieval-augmented generation.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables semantic search over a private knowledge base via pgvector, with GitHub OAuth authentication and a RAG pipeline.9 npmMIT