Skip to main content
Glama
FoundZiGu

ragflow-mcp-server-fixed

by FoundZiGu

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 的更清晰的错误消息。

工具

工具

用途

list_datasets

列出 RAGFlow 数据集。

create_chat

为数据集创建聊天助手和会话。

chat

create_chat 返回的会话中提问。

ask_configured_chat

直接询问服务器配置的 RAGFlow 聊天助手。

retrieve

直接从数据集中检索匹配的块。

对于大多数用法,请配置 --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>"
  ]
}

服务器选项

选项

环境变量

描述

--api-key

RAGFLOW_API_KEY

RAGFlow API 密钥。

--base-url

RAGFLOW_BASE_URL

RAGFlow 基础 URL。

--default-chat-id

RAGFLOW_DEFAULT_CHAT_ID

用于 ask_configured_chat 的现有 RAGFlow 聊天助手 ID。

--default-chat-name

RAGFLOW_DEFAULT_CHAT_NAME

用于 ask_configured_chat 的现有 RAGFlow 聊天助手名称。

--default-session-name

RAGFLOW_DEFAULT_SESSION_NAME

为配置的聊天创建的会话名称。

本地开发

uv run ragflow-mcp-server --help
export 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 密钥。

  • 优先使用环境变量存储密钥。

  • 轮换出现在日志、截图、公开问题或聊天记录中的密钥。

Install Server
F
license - not found
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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