Skip to main content
Glama
Akashbakshi99

RAG Query MCP Server

RAG Pipeline

Hybrid-retrieval RAG (dense + BM25 sparse fused in Pinecone, Jina reranking, Gemini generation) over a single document.

Setup

pip install -r requirements.txt

Create 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 endpoint

Related MCP server: PDF MCP Server

Ingest (run once before querying)

Chunks and embeds data/*.pdf into Pinecone, and fits the BM25 index.

python ingest.py

Run 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 prompt

2. HTTP API (app.py, FastAPI)

python -m uvicorn app:app --host 127.0.0.1 --port 8000

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

Evaluation (optional)

python -m evals.evaluate
F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Akashbakshi99/RAG-Using-LangChain-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server