Skip to main content
Glama

Model Context Protocol Server

🚀 Agentic RAG 与 MCP 服务器Agentic-RAG-MCP服务器 - AgenticRag


✨ 概述

带有 MCP 服务器的 Agentic RAG是一个强大的项目,它将 MCP(模型上下文协议)服务器和客户端结合在一起,用于构建Agentic RAG (检索增强生成)应用程序。

此设置为您的 RAG 系统提供了高级工具,例如:

  • 🕵️‍♂️实体提取

  • 🔍查询细化

  • 相关性检查

服务器承载这些智能工具,而客户端展示如何无缝连接和使用它们。


🖥️ 服务器 — server.py

mcp库的FastMCP类的支持下,服务器公开了以下便捷的工具:

工具名称

描述

图标

get_time_with_prefix

返回

当前日期和时间

extract_entities_tool

使用

OpenAI

从查询中提取实体——增强文档检索相关性

🧠

refine_query_tool

利用

OpenAI 支持的改进技术

提高用户查询的质量

check_relevance

通过使用 LLM 检查块相关性来过滤不相关的内容


🤝 客户端 — mcp-client.py

客户端演示如何与 MCP 服务器连接并交互:

  • mcp库中的ClientSession建立连接

  • 列出所有可用的服务器工具

  • 使用自定义参数调用任何工具

  • 利用OpenAI 或 Gemini和 MCP 工具协同处理查询


⚙️ 要求

  • Python 3.9 或更高版本

  • openai Python 包

  • mcp

  • python-dotenv用于环境变量管理


🛠️ 安装指南

# 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

🔐 配置

  1. 创建.env文件(使用.env.sample作为模板)

  2. .env中设置你的 OpenAI 模型:

OPENAI_MODEL_NAME="your-model-name-here" GEMINI_API_KEY="your-model-name-here"

🚀 如何使用

  1. 启动 MCP 服务器:

python server.py
  1. 运行 MCP 客户端:

python mcp-client.py

📜 许可证

该项目已获得MIT 许可


感谢阅读🙏

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

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 -
    1
    16
    Apache 2.0
  • -
    security
    F
    license
    -
    quality
    This server enables AI assistants (CLINE, Cursor, Windsurf, Claude Desktop) to share a common knowledge base through Retrieval Augmented Generation (RAG), providing consistent information access across multiple tools.
    Last updated -
    4
    • Apple
  • A
    security
    A
    license
    A
    quality
    An open-source platform for Retrieval-Augmented Generation (RAG). Upload documents and query them ⚡
    Last updated -
    1
    24
    23
    MIT License
  • -
    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 -
    5
    • 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