
DuckDB-RAG-MCP-Sample
An MCP server that enables RAG (Retrieval-Augmented Generation) on markdown documents by converting them to embedding vectors and performing vector search using DuckDB.
README
DuckDB RAG MCP Sample
markdown ドキュメントを埋め込みベクトル化して、MCP から RAG で解説できるようにするサンプルです。
ベクトル化には Plamo-Embedding-1B を使用しています。
機能
- markdown ファイルからテキスト抽出・ベクトル化
- DuckDB を使用したベクトル検索
- Parquet ファイルによるベクトルデータの永続化
- MCP からベクトル検索
使用方法
ベクトルデータ生成
最初に検索対象にしたい markdown ファイルを特定のディレクトリに配置し、以下のコマンドで Parquet ファイルに変換してください。
uv run main.py --directory ~/path/to/markdown/files --parquet vectors.parquet
MCP の設定
ビルド
以下のコマンドでシングルバイナリが dist/server
として生成されます。
uv run pyinstaller --clean --strip --noconfirm --onefile server.py
MCP のクライアント設定
利用したいクライアントに応じて設定してください。
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の下で提供されています。
Recommended Servers
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.
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.
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.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.