Agentic RAG Assistant
Click on "Install 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., "@Agentic RAG AssistantHow much leave do I have left, and what's the WFH policy?"
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.
Agentic RAG Assistant with FastAPI + MCP
An internal-docs assistant that combines four things recruiters are currently screening for:
Agentic AI — a tool-use loop where the LLM decides whether to search the knowledge base, run a calculation, or answer directly.
FastAPI — a clean REST backend (
/ingest,/query,/agent/chat) with auto-generated Swagger docs.RAG — documents are chunked, indexed, and retrieved by semantic relevance before the LLM answers.
MCP (Model Context Protocol) — the same tools (RAG search + business logic) are exposed as an MCP server so any MCP-compatible client (Claude Desktop, Claude Code, etc.) can use them directly, not just this API.
Architecture
┌────────────────────┐
│ FastAPI Service │
│ (app/main.py) │
└─────────┬───────────┘
│
┌─────────▼───────────┐
│ Agent Loop │◄──── Groq API (tool use)
│ (app/agent.py) │
└─────────┬───────────┘
│ calls
┌─────────────┼──────────────┐
▼ ▼
┌────────────────┐ ┌──────────────────┐
│ RAG Engine │ │ Business Tools │
│ (app/rag.py) │ │ (app/tools.py) │
└────────────────┘ └──────────────────┘
▲ ▲
└─────────────┬───────────────┘
│ same tools, exposed via
┌──────────▼───────────┐
│ MCP Server │
│ (app/mcp_server.py) │
└────────────────────────┘Setup
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # add your GROQ_API_KEYRun the API
uvicorn app.main:app --reload --port 8000Open http://localhost:8000/docs for interactive Swagger docs.
Try it
# Pure retrieval, no LLM call
curl -X POST http://localhost:8000/query \
-H "Content-Type: application/json" \
-d '{"query": "how many days of leave do I get?"}'
# Full agentic chat — LLM decides which tool(s) to call
curl -X POST http://localhost:8000/agent/chat \
-H "Content-Type: application/json" \
-d '{"message": "I joined in March and have taken 4 days off. How much leave do I have left, and what is the WFH policy?"}'The second call demonstrates multi-tool reasoning: the model calls rag_search for the WFH policy AND calculate_leave_balance for the math, in one conversation.
Run as an MCP server
python -m app.mcp_serverPoint any MCP host at this script over stdio (e.g. add it to Claude Desktop's claude_desktop_config.json as a custom MCP server) and it will expose rag_search, get_current_datetime, and calculate_leave_balance as callable tools.
What to say about this project in an interview
Why TF-IDF instead of embeddings by default: keeps the demo runnable with zero API keys and zero external downloads; the
VectorStoreclass is written so swapping in FAISS/Chroma + real embeddings is a drop-in change, not a rewrite.Why the tools live in one file (
tools.py) and get exposed twice (agent.py and mcp_server.py): single source of truth, no logic duplication between the HTTP path and the MCP path.The agent loop is a manual implementation of the tool-use pattern (not a black-box framework), so you can explain every step: model requests a tool → server executes it → result is fed back → model continues or answers.
Possible extensions (good "what would you improve" answers)
Swap TF-IDF for real embeddings (OpenAI/Voyage/local sentence-transformers) + a persistent vector DB.
Add conversation memory across turns (currently each
/agent/chatcall is stateless).Add streaming responses via Server-Sent Events.
Add authentication (API key or JWT) before deploying publicly.
Containerize with Docker + docker-compose for one-command startup.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Agentic search over your Dewey document collections from any MCP-compatible client.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/snehaharurkar/agentic-rag-mcp-assistant'
If you have feedback or need assistance with the MCP directory API, please join our Discord server