nexacorp-mcp-agent
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., "@nexacorp-mcp-agentWhat is the guest wifi password?"
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.
NexaCorp Agentic RAG with MCP & LangSmith
This project demonstrates a production-ready Agentic AI architecture. It features an advanced Hybrid RAG pipeline exposed as a standard Model Context Protocol (MCP) tool, an autonomous agent powered by Google's Gemini model, and full observability using LangSmith.
Built as part of an Agentic AI roadmap, this project moves beyond simple vector search by separating the retrieval engine (MCP Server) from the reasoning engine (Gemini Client) and tracking the entire flow with enterprise-grade tracing.
Architecture Highlights
Model Context Protocol (MCP): The RAG pipeline is wrapped in an MCP server. This means the knowledge base acts as an independent tool that any MCP-compliant client (like Claude Desktop, Cursor, or custom agents) can securely query.
Advanced Hybrid RAG:
Dense Retrieval: FAISS with
all-MiniLM-L6-v2embeddings for semantic similarity.Sparse Retrieval: BM25 for precise keyword matching.
Reranking: Cross-Encoder (
ms-marco-TinyBERT-L-2-v2) to re-score and surface the most relevant chunks.
Agentic Reasoning Engine: A Python client using LangChain and
gemini-2.5-flashthat autonomously decides when to query the MCP server and synthesizes the retrieved context into a natural language response.Observability (LangSmith): Integrated LangSmith tracing to monitor LLM latency, token usage, tool-call success rates, and the exact context payloads sent between the agent and the MCP server.
System Components
server.py: The local MCP Tool Server. Initializes the Hybrid RAG pipeline, ingestssample_data.txt, and exposes asearch_knowledge_basetool via stdio.agent_client.py: The agent runtime. Connects to the local MCP server, sets up the Gemini LLM with tool-calling capabilities, and handles the chat loop.rag_pipeline.py: The core Hybrid Search logic.sample_data.txt: The mock enterprise knowledge base (NexaCorp policies, secrets, and IT rules).
Prerequisites
Python 3.10+
Google Gemini API Key
LangSmith API Key (for observability)
Setup & Installation
Clone the repository:
git clone <your-repo-url> cd rag_projectInstall dependencies:
pip install langchain-google-genai mcp langchain langchain-community sentence-transformers faiss-cpu rank_bm25 python-dotenvConfigure Environment Variables: Create a
.envfile in the root directory:GOOGLE_API_KEY=your_gemini_api_key_here # LangSmith Observability LANGCHAIN_TRACING_V2=true LANGCHAIN_PROJECT=nexacorp-rag-agent LANGCHAIN_API_KEY=your_langsmith_key_here LANGCHAIN_ENDPOINT=https://apac.api.smith.langchain.com # Only if using APAC region
Usage
Start the agent client. The client will automatically boot up the MCP server in the background and establish a connection.
python agent_client.pyWait for the FAISS and SentenceTransformer models to load into memory (~20 seconds). Once the [Agent] Ready! prompt appears, you can ask questions like:
"What is the guest wifi password?"
"Who is the lead engineer for Project Crimson Falcon?"
"Can I deploy code on Friday afternoon?"
Observability & Tracing
With LangSmith enabled, every interaction is logged. You can view the traces in your LangSmith dashboard to inspect:
The raw prompt sent to Gemini.
The exact JSON-RPC payload of the MCP tool call.
The text chunks returned by the Hybrid RAG pipeline.
Latency and token cost per query.
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.
Latest Blog Posts
- 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/phalakmehta/nexacorp-mcp-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server