🚀 Agentic RAG 与 MCP 服务器
✨ 概述

带有 MCP 服务器的 Agentic RAG是一个强大的项目,它将 MCP(模型上下文协议)服务器和客户端结合在一起,用于构建Agentic RAG (检索增强生成)应用程序。
此设置为您的 RAG 系统提供了高级工具,例如:
🕵️♂️实体提取
🔍查询细化
✅相关性检查
服务器承载这些智能工具,而客户端展示如何无缝连接和使用它们。
🖥️ 服务器 — server.py
在mcp库的FastMCP类的支持下,服务器公开了以下便捷的工具:
工具名称 | 描述 | 图标 |
| 返回 当前日期和时间 | ⏰ |
| 使用 OpenAI 从查询中提取实体——增强文档检索相关性 | 🧠 |
| 利用 OpenAI 支持的改进技术 提高用户查询的质量 | ✨ |
| 通过使用 LLM 检查块相关性来过滤不相关的内容 | ✅ |
🤝 客户端 — mcp-client.py
客户端演示如何与 MCP 服务器连接并交互:
与
mcp库中的ClientSession建立连接列出所有可用的服务器工具
使用自定义参数调用任何工具
利用OpenAI 或 Gemini和 MCP 工具协同处理查询
⚙️ 要求
Python 3.9 或更高版本
openaiPython 包mcp库python-dotenv用于环境变量管理
🛠️ 安装指南
🔐 配置
创建
.env文件(使用.env.sample作为模板)在
.env中设置你的 OpenAI 模型:
🚀 如何使用
启动 MCP 服务器:
运行 MCP 客户端:
📜 许可证
该项目已获得MIT 许可。
感谢阅读🙏
This server cannot be installed
Related Resources
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 -116Apache 2.0
- -securityFlicense-qualityThis 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
Agentsetofficial
AsecurityAlicenseAqualityAn open-source platform for Retrieval-Augmented Generation (RAG). Upload documents and query them ⚡Last updated -12423MIT License- -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 -5