Model Context Protocol Server

Model Context Protocol Server

A server exposing intelligent tools for enhancing RAG applications with entity extraction, query refinement, and relevance checking capabilities.

Category
Visit Server

README

🚀 Agentic RAG with MCP Server Agentic-RAG-MCPServer - AgenticRag


✨ 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 the mcp 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 package
  • mcp library
  • python-dotenv for environment variable management

🛠️ Installation Guide

# Step 1: Clone the repository
git clone https://github.com/ashishpatel26/Agentic-RAG-with-MCP-Server.git

# Step 2: Navigate into the project directory
cd Agentic-RAG-with-MCP-Serve

# Step 3: Install dependencies
pip install -r requirements.txt

🔐 Configuration

  1. Create a .env file (use .env.sample as a template)
  2. Set your OpenAI model in .env:
OPENAI_MODEL_NAME="your-model-name-here"
GEMINI_API_KEY="your-model-name-here"

🚀 How to Use

  1. Start the MCP server:
python server.py
  1. Run the MCP client:
python mcp-client.py

📜 License

This project is licensed under the MIT License.


Thanks for Reading 🙏

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured