MCP-RAG Server
mcp-rag
通过 MCP 将 RAG 应用程序连接到 open-webui
1. MCP PoC 基本框架 / Hello World
pip install mcp[cli]查找有关 sse 片段的文档
使用 uvicorn 运行服务器
不起作用 -> 查找
SseServerTranpsort类中的文档,该文档与 MCP 网站不同更改路线 -> 安装 starlette_app,然后就可以工作了
starlette 给出 307 临时重定向,用 curl 测试后发现,这是由于缺少尾部斜杠造成的
在 github repo 上查找,那里的路由以服务器代码的尾部斜杠结尾,特别是
sse = SseServerTransport("/messages/")部分,我猜它告诉客户端要调用什么添加一些提示并在客户端检查
写作
我想尝试一下模型上下文协议 (MCP),因为我一直在尝试使用 RAG 原型来与 open-webui 配合使用。MCP 看起来与 LSP 类似。由于服务器和客户端不在同一台机器上,所以我们必须使用 SSE 传输。
MCP 官方文档中附带了一些代码片段,我不得不根据 mcp python 库提供的文档字符串对它们进行了一些修改。我花了一段时间才让一切正常,最初处理了 307 临时重定向错误,因为服务器发送了错误的端点。
测试一下!构建一个可以与服务器交互的小型 REPL
目标
了解 MCP 是什么
实现简单的服务器和客户端
尝试函数调用/工具使用
Related MCP server: MCP SSE Ory Server
2. 实现基本的知识库
我想建立一个简单的知识库,我们可以将其粘贴到 MCP 服务器中并通过客户端调用来检索一些上下文。
3. MCP 客户端 + Open-WebUI
This server cannot be deployed
Maintenance
Related MCP Connectors
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Server-Sent Events implementation using FastAPI framework that integrates Model Context Protocol (MCP), allowing AI models to access external tools and data sources like weather information.51MIT

MCP SSE Ory Serverofficial
AlicenseNot gradedqualityBmaintenanceImplements a Model Context Protocol server using Server-Sent Events for real-time communication with OAuth 2.1 integration via Ory Network, enabling secure AI model communication with authentication and client management.Apache 2.0- FlicenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol (MCP) server implementation that uses Server-Sent Events (SSE) to enable real-time, server-pushed updates between AI models and tools over HTTP connections.1-
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to connect to LLM/API services using the Model Context Protocol, providing real-time interaction and tool access. Also offers RESTful API endpoints via FastAPI for programmatic integration with existing systems.Apache 2.0