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.-