Manages environment variables for configuration, including storing API keys for OpenAI and Gemini models.
Hosts the repository for the Agentic RAG with MCP Server project, allowing users to clone and access the codebase.
Powers entity extraction, query refinement, and relevance checking capabilities, enabling enhanced document retrieval and processing in the Agentic RAG system.
🚀 Agentic RAG with MCP Server
✨ Overview
Agentic RAG with MCP Server is a powerful project that brings together an MCP (Model Context Protocol) server and client for building Agentic RAG (Retrieval-Augmented Generation) applications.
This setup empowers your RAG system with advanced tools such as:
- 🕵️♂️ Entity Extraction
- 🔍 Query Refinement
- ✅ Relevance Checking
The server hosts these intelligent tools, while the client shows how to seamlessly connect and utilize them.
🖥️ Server — server.py
Powered by the FastMCP
class from the mcp
library, the server exposes these handy tools:
Tool Name | Description | Icon |
---|---|---|
get_time_with_prefix | Returns the current date & time | ⏰ |
extract_entities_tool | Uses OpenAI to extract entities from a query — enhancing document retrieval relevance | 🧠 |
refine_query_tool | Improves the quality of user queries with OpenAI-powered refinement | ✨ |
check_relevance | Filters out irrelevant content by checking chunk relevance with an LLM | ✅ |
🤝 Client — mcp-client.py
The client demonstrates how to connect and interact with the MCP server:
- Establish a connection with
ClientSession
from themcp
library - List all available server tools
- Call any tool with custom arguments
- Process queries leveraging OpenAI or Gemini and MCP tools in tandem
⚙️ Requirements
- Python 3.9 or higher
openai
Python packagemcp
librarypython-dotenv
for environment variable management
🛠️ Installation Guide
🔐 Configuration
- Create a
.env
file (use.env.sample
as a template) - Set your OpenAI model in
.env
:
🚀 How to Use
- Start the MCP server:
- Run the MCP client:
📜 License
This project is licensed under the MIT License.
Thanks for Reading 🙏
This server cannot be installed
A server exposing intelligent tools for enhancing RAG applications with entity extraction, query refinement, and relevance checking capabilities.
Related MCP Servers
- -securityAlicense-qualityProvides RAG capabilities for semantic document search using Qdrant vector database and Ollama/OpenAI embeddings, allowing users to add, search, list, and delete documentation with metadata support.Last updated -54TypeScriptApache 2.0
Agentsetofficial
AsecurityAlicenseAqualityAn open-source platform for Retrieval-Augmented Generation (RAG). Upload documents and query them ⚡Last updated -1169JavaScriptMIT License- -securityAlicense-qualityAn MCP server that enables RAG (Retrieval-Augmented Generation) on markdown documents by converting them to embedding vectors and performing vector search using DuckDB.Last updated -PythonApache 2.0
- -securityFlicense-qualityImplements Retrieval-Augmented Generation (RAG) using GroundX and OpenAI, allowing users to ingest documents and perform semantic searches with advanced context handling through Modern Context Processing (MCP).Last updated -1Python