RAG MCP Server
MCP RAG mit Python, LangChain, LangGraph und LlamaIndex
Projekt für einen Model Context Protocol (MCP)-Server zum Indizieren von Dokumenten und Beantworten von Fragen mit RAG (Retrieval-Augmented Generation). Der Server verwendet FastMCP über SSE, LlamaIndex + ChromaDB für die Abfrage, LangGraph für die Orchestrierung und LangChain für die Generierung.
Architektur
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
Schnellstart
cp .env.example .env
# Edite .env e informe OPENAI_API_KEY
docker compose up --buildDer MCP-SSE-Endpunkt befindet sich unter http://localhost:8000/sse.
Dokumente
Um einen lokalen Ordner für den Container verfügbar zu machen, kommentieren Sie das Volume ./docs:/workspace/docs:ro in der docker-compose.yml aus. Rufen Sie dann das Tool mit einem Pfad wie /workspace/docs/manual.md auf.
MCP-Tools
ingest_documents
Indiziert .txt-, .md- und .pdf-Dateien.
{"paths": ["/workspace/docs/manual.md"]}ask_rag
Ruft die relevantesten Textabschnitte ab und antwortet mit Referenzen [S1], [S2].
{"question": "Quais são os procedimentos de backup?", "top_k": 5}Umgebungsvariablen
Variable | Verwendung |
| API-Schlüssel für OpenAI-kompatible APIs |
| LangChain-Generierungsmodell |
| LlamaIndex-Embedding-Modell |
| Optionale Basis-URL für kompatiblen Endpunkt |
| Persistenter ChromaDB-Ordner |
| Name der Vektorsammlung |
| Größe der indizierten Textabschnitte |
| Überlappung zwischen Textabschnitten |
Sicherheit
Setzen Sie SSE nicht ohne TLS und Authentifizierung öffentlich ein. Mounten Sie nur autorisierte Dokumentverzeichnisse, da das Ingestions-Tool die angegebenen Pfade liest.
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.-