mcp-agentic-rag

mcp-agentic-rag

3.3

If you are the rightful owner of mcp-agentic-rag and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The mcp-agentic-rag project implements a Model Context Protocol server and client for building agentic Retrieval-Augmented Generation applications.

The mcp-agentic-rag project is designed to enhance the performance of Retrieval-Augmented Generation (RAG) systems by implementing a Model Context Protocol (MCP) server and client. The server provides tools such as entity extraction, query refinement, and relevance checking, which are crucial for improving the retrieval of relevant documents and filtering out irrelevant ones. The client demonstrates how to connect to the server and utilize these tools effectively. The project is built using Python and leverages the `mcp` library for server-client communication, as well as OpenAI for processing queries.

Features

  • Entity Extraction: Extracts key entities from a user's query to improve document retrieval.
  • Query Refinement: Refines user queries to enhance the quality and relevance of retrieved documents.
  • Relevance Checking: Filters out irrelevant documents by checking the relevance of text chunks to a given question.
  • Time Retrieval: Provides the current date and time with a specified prefix.
  • Client-Server Communication: Demonstrates how to connect to the MCP server and utilize its tools.

Tools

  1. get_time_with_prefix

    Return to the current date and time

  2. extract_entities_tool

    Extract entities from text queries using OpenAI

  3. refine_query_tool

    Optimize text query using OpenAI

  4. check_relevance

    Use LLM to check the relevance of text blocks to problems