ragflow-mcp-server-fixed
ragflow-mcp-server-fixed
一个用于 stdio MCP 客户端的修复版 RAGFlow MCP 服务器。
它保留了可执行文件名 ragflow-mcp-server,因此客户端只需更改包来源即可从原始包切换过来。
此版本修复了什么
某些 RAGFlow 部署会从旧版聊天端点返回错误,例如:
'NoneType' object is not subscriptable
required argument are missing: messages此服务器通过以下方式处理该问题:
直接调用 RAGFlow HTTP API;
防御性地解析流式响应;
在需要时回退到兼容 OpenAI 的 RAGFlow 端点;
返回来自 RAGFlow 的更清晰的错误消息。
工具
工具 | 用途 |
| 列出 RAGFlow 数据集。 |
| 为数据集创建聊天助手和会话。 |
| 在 |
| 直接询问服务器配置的 RAGFlow 聊天助手。 |
| 直接从数据集中检索匹配的块。 |
对于大多数用法,请配置 --default-chat-name 或 --default-chat-id,然后使用 ask_configured_chat。
快速开始
{
"command": "uvx",
"args": [
"--from",
"git+https://github.com/FoundZiGu/ragflow-mcp-server-fixed.git@v0.1.2",
"ragflow-mcp-server",
"--api-key",
"ragflow-REPLACE_WITH_YOUR_KEY",
"--base-url",
"http://<RAGFLOW_HOST>:9380",
"--default-chat-name",
"<CHAT_NAME>"
]
}如果您的 MCP 客户端支持环境变量:
{
"command": "uvx",
"args": [
"--from",
"git+https://github.com/FoundZiGu/ragflow-mcp-server-fixed.git@v0.1.2",
"ragflow-mcp-server"
],
"env": {
"RAGFLOW_API_KEY": "ragflow-REPLACE_WITH_YOUR_KEY",
"RAGFLOW_BASE_URL": "http://<RAGFLOW_HOST>:9380",
"RAGFLOW_DEFAULT_CHAT_NAME": "<CHAT_NAME>"
}
}尽可能使用聊天 ID 而不是名称:
{
"command": "uvx",
"args": [
"--from",
"git+https://github.com/FoundZiGu/ragflow-mcp-server-fixed.git@v0.1.2",
"ragflow-mcp-server",
"--api-key",
"ragflow-REPLACE_WITH_YOUR_KEY",
"--base-url",
"http://<RAGFLOW_HOST>:9380",
"--default-chat-id",
"<CHAT_ID>"
]
}服务器选项
选项 | 环境变量 | 描述 |
|
| RAGFlow API 密钥。 |
|
| RAGFlow 基础 URL。 |
|
| 用于 |
|
| 用于 |
|
| 为配置的聊天创建的会话名称。 |
本地开发
uv run ragflow-mcp-server --helpexport RAGFLOW_API_KEY="ragflow-REPLACE_WITH_YOUR_KEY"
export RAGFLOW_BASE_URL="http://<RAGFLOW_HOST>:9380"
export RAGFLOW_DEFAULT_CHAT_NAME="<CHAT_NAME>"
uv run python tests/smoke_test.py安全性
请勿提交 API 密钥。
优先使用环境变量存储密钥。
轮换出现在日志、截图、公开问题或聊天记录中的密钥。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/FoundZiGu/ragflow-mcp-server-fixed'
If you have feedback or need assistance with the MCP directory API, please join our Discord server