RAG Query MCP Server
Provides document query capabilities using a hybrid retrieval RAG pipeline with Google's Gemini for generation.
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., "@RAG Query MCP ServerWhat is the company's policy on remote work?"
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.
RAG Pipeline
Hybrid-retrieval RAG (dense + BM25 sparse fused in Pinecone, Jina reranking, Gemini generation) over a single document.
Setup
pip install -r requirements.txtCreate a .env in the project root:
GOOGLE_API_KEY=your_key
PINECONE_API_KEY=your_key
PINECONE_INDEX_NAME=rag-hybrid
JINA_API_KEY=your_key
API_KEY=your_choice # protects the FastAPI endpointRelated MCP server: search-context
Ingest (run once before querying)
Chunks and embeds data/*.pdf into Pinecone, and fits the BM25 index.
python ingest.pyRun the endpoints
All three answer questions through the same pipeline.
1. CLI (ask.py)
python ask.py "What is the standard meal expense cap during business travel at Texazdi X?" # one-shot
python ask.py # interactive prompt2. HTTP API (app.py, FastAPI)
python -m uvicorn app:app --host 127.0.0.1 --port 8000Then query it (send the API_KEY from your .env as the x-api-key header):
curl -X POST http://127.0.0.1:8000/query \
-H "Content-Type: application/json" \
-H "x-api-key: your_choice" \
-d '{"question": " How many days of paid annual leave can be carried over to the next year, and what is the total annual leave allotment?"}'Health check: GET http://127.0.0.1:8000/health
3. MCP server (mcp_server.py)
Exposes a query_documents tool over MCP (stdio):
python mcp_server.pyEvaluation (optional)
python -m evals.evaluateThis server cannot be deployed
Maintenance
Related MCP Connectors
Ingest, manage, and retrieve documents for RAG-powered AI applications
Search your knowledge bases from any AI assistant using hybrid RAG.
- docs2mcpOAuthcom.docs2mcp
Query your own PDFs and documents from any MCP client. Every answer cites the page it came from.
Medical RAG: semantic search for clinical guidelines, drug interactions, diagnoses & EHR data.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered querying of PDF documents using hybrid retrieval (BM25 + vector search) and retrieval-augmented generation, returning structured answers with source citations and confidence scores.-
- FlicenseAqualityFmaintenanceEnables semantic search across documentation stored in Gemini FileSearchStores, returning AI-generated answers with source citations.11-
- FlicenseNot gradedqualityCmaintenanceEnables searching a knowledge base and asking grounded questions with hybrid retrieval, reranking, and cited answers.-
- AlicenseNot gradedqualityBmaintenanceEnables querying PDF documents using natural language with grounded answers and source citations via a local RAG pipeline.MIT