MCP RAG Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP RAG ServerWhat is the conclusion of the annual report?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP RAG
MCP server that owns the full RAG pipeline, plus a small web client for uploading PDFs and asking questions.
Layout
src/mcp_rag/
server/ MCP tools: ingest, index, search, ask
client/ FastAPI UI: upload files, ask questions
data/docs/ PDF corpus (owned by the MCP server)
data/faiss_index/ cached embeddingsPDFs uploaded in the client
│
▼
MCP server (:8001/mcp)
ingest → chunk → embed → FAISS
retrieve → generate (OpenAI / LangGraph)
│ Streamable HTTP
▼
Web client (:8000)
upload / delete / askRelated MCP server: ragi
Requirements
Python 3.10+ (3.12 recommended)
An OpenAI API key
Setup
uv sync
copy .env.example .env # or: cp .env.example .envPut your OpenAI key in .env. Optional sample PDFs:
uv run python scripts/make_sample_pdfs.pyRun
Terminal 1 — MCP server (RAG):
uv run python -m mcp_rag.serverTerminal 2 — web client:
uv run python -m mcp_rag.clientOpen http://127.0.0.1:8000. Upload PDFs, then ask questions.
On Windows you can also use scripts\run_server.bat and scripts\run_client.bat.
MCP tools
Tool | Purpose |
| Add a PDF (base64) and rebuild the index |
| Remove a PDF and rebuild the index |
| Build or reuse the FAISS index |
| Semantic search over chunks |
| Retrieve + generate a grounded answer |
| List PDFs in the corpus |
| Index readiness and chunk count |
Client API
Method | Path | Purpose |
|
| Client + MCP status |
|
| List PDFs |
|
| Multipart PDF upload |
|
| Remove a PDF |
|
| Rebuild FAISS index |
|
|
|
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for querying Forkast documentation
DocBase MCP server for AI agents
- docs2mcpOAuthcom.docs2mcp
Query your own PDFs and documents from any MCP client. Every answer cites the page it came from.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for document ingestion and semantic search on Qdrant. Enables ingesting local documents, generating embeddings with OpenAI, and performing vector search with metadata filters.Apache 2.0
- AlicenseAqualityDmaintenanceLocal-first RAG indexing and semantic search MCP server. Enables document retrieval and context-aware queries using local embedding models.35 npmMIT
- FlicenseAqualityDmaintenanceA local RAG MCP server for PDF development experience, enabling document ingestion, semantic search, and Q\&A with source citations using TF-IDF and cosine similarity.3-
- FlicenseAqualityDmaintenanceMCP server that enables semantic search over local PDF collections using local RAG, with automatic indexing of new documents.5-