RAG MCP Server
Python、LangChain、LangGraph、LlamaIndex による MCP RAG
ドキュメントをインデックス化し、RAG(Retrieval-Augmented Generation)で質問に回答する Model Context Protocol (MCP) サーバープロジェクト。このサーバーは、SSE 経由の FastMCP、検索用の LlamaIndex + ChromaDB、オーケストレーション用の LangGraph、生成用の LangChain を使用します。
アーキテクチャ
Cliente MCP -> SSE (/sse) -> FastMCP
-> ingest_documents(paths)
-> ask_rag(question)
-> LangGraph
-> recuperar contexto (LlamaIndex/Chroma)
-> gerar resposta (LangChain/OpenAI)
-> validar citaçõesRelated MCP server: Antigravity PDF MCP Server
クイックスタート
cp .env.example .env
# Edite .env e informe OPENAI_API_KEY
docker compose up --buildMCP SSE エンドポイントは http://localhost:8000/sse にあります。
ドキュメント
ローカルフォルダをコンテナで利用できるようにするには、docker-compose.yml のボリューム ./docs:/workspace/docs:ro のコメントを解除します。次に、/workspace/docs/manual.md のようなパスでツールを呼び出します。
MCP ツール
ingest_documents
.txt、.md、.pdf ファイルをインデックス化します。
{"paths": ["/workspace/docs/manual.md"]}ask_rag
最も関連性の高い断片を取得し、[S1]、[S2] の参照付きで回答します。
{"question": "Quais são os procedimentos de backup?", "top_k": 5}環境変数
変数 | 用途 |
| OpenAI 互換 API キー |
| LangChain 生成モデル |
| LlamaIndex 埋め込みモデル |
| 互換エンドポイントのオプションのベース URL |
| ChromaDB の永続ディレクトリ |
| ベクターコレクション名 |
| インデックス化された断片のサイズ |
| 断片間のオーバーラップ |
セキュリティ
TLS と認証なしで SSE を公開しないでください。インジェストツールは指定されたパスを読み取るため、許可されたドキュメントディレクトリのみをマウントしてください。
This server cannot be deployed
Maintenance
Related MCP Connectors
Ingest, manage, and retrieve documents for RAG-powered AI applications
Turn documents into structured, AI-ready data by parsing, enriching, chunking, and embedding.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables RAG (Retrieval-Augmented Generation) capabilities with document processing, vector storage, and intelligent Q\&A using OpenAI embeddings and semantic search.-
- FlicenseNot gradedqualityDmaintenanceEnables intelligent ingestion and querying of PDF, Markdown, and text files using hybrid search that combines keyword matching and semantic embeddings with citations.2-
- AlicenseAqualityDmaintenanceEnables document Q&A with grounded citations using the official Gemini File Search API. Upload documents, create stores, and ask questions that return exact passage citations.78 npm2MIT
- FlicenseNot gradedqualityDmaintenanceEnables searching a knowledge base and asking grounded questions with hybrid retrieval, reranking, and cited answers.-