DuckDB RAG MCP Sample
markdown ドキュメントを埋め込みベクトル化して、MCP から RAG で解説できるようにするサンプルです。
ベクトル化には Plamo-Embedding-1B を使用しています。
機能
- markdown ファイルからテキスト抽出・ベクトル化
- DuckDB を使用したベクトル検索
- Parquet ファイルによるベクトルデータの永続化
- MCP からベクトル検索
使用方法
ベクトルデータ生成
最初に検索対象にしたい markdown ファイルを特定のディレクトリに配置し、以下のコマンドで Parquet ファイルに変換してください。
MCP の設定
ビルド
以下のコマンドでシングルバイナリが dist/server
として生成されます。
MCP のクライアント設定
利用したいクライアントに応じて設定してください。
Claude Desktop の場合は以下のような感じです。
VECTOR_PARQUET は先ほど変換したファイルを指定してください。
以下のように設定されます。
開発用サーバー起動
ライセンス
DuckDB RAG MCP Sampleは、Apache License, Version 2.0の下で提供されています。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
An MCP server that enables RAG (Retrieval-Augmented Generation) on markdown documents by converting them to embedding vectors and performing vector search using DuckDB.
Related MCP Servers
- AsecurityFlicenseAqualityAn MCP server for converting Markdown documents to PDF files.Last updated -11JavaScript
- AsecurityAlicenseAqualityConverts various file formats to Markdown using the MarkItDown utility and can be integrated with MCP clients for seamless document processing and conversion.Last updated -26PythonMIT License
Vectorizeofficial
AsecurityAlicenseAqualityVectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.Last updated -36067JavaScriptMIT LicenseAgentsetofficial
AsecurityAlicenseAqualityAn open-source platform for Retrieval-Augmented Generation (RAG). Upload documents and query them ⚡Last updated -1415JavaScriptMIT License