Skip to main content
Glama

Model Context Protocol Server

🚀 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 NameDescriptionIcon
get_time_with_prefixReturns the current date & time
extract_entities_toolUses OpenAI to extract entities from a query — enhancing document retrieval relevance🧠
refine_query_toolImproves the quality of user queries with OpenAI-powered refinement
check_relevanceFilters 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 🙏

-
security - not tested
F
license - not found
-
quality - not tested

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

  1. ✨ Overview
    1. 🖥️ Server — server.py
      1. 🤝 Client — mcp-client.py
        1. ⚙️ Requirements
          1. 🛠️ Installation Guide
            1. 🔐 Configuration
              1. 🚀 How to Use
                1. 📜 License

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    Provides 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 -
                    5
                    4
                    TypeScript
                    Apache 2.0
                  • A
                    security
                    A
                    license
                    A
                    quality
                    An open-source platform for Retrieval-Augmented Generation (RAG). Upload documents and query them ⚡
                    Last updated -
                    1
                    169
                    JavaScript
                    MIT License
                  • -
                    security
                    A
                    license
                    -
                    quality
                    An 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 -
                    Python
                    Apache 2.0
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    Implements 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 -
                    1
                    Python
                    • Linux
                    • Apple

                  View all related MCP servers

                  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/ashishpatel26/Agentic-RAG-with-MCP-Server'

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