Back to MCP directory
publicPublicdnsLocal runtime

ragflow-mcp-server

RAGFlow API MCP服务器项目,提供知识库查询和聊天功能,支持多种开发环境配置和发布流程。

article

README

🚀 RAGFlow知识库对话服务器

RAGFlow API 知识库对话服务器可用于搜索知识库和进行聊天,为用户提供便捷的知识查询与交流体验。

🚀 快速开始

下载文档

可通过以下命令下载 MCP 开发文档和 RAGFlow API 参考:

wget https://modelcontextprotocol.io/llms-full.txt -O docs/mcp-llms-full.txt
wget https://github.com/infiniflow/ragflow/raw/refs/heads/main/docs/references/python_api_reference.md -O docs/ragflow-python_api_reference.md

安装

GitHub Copilot

.vscode/mcp.json 中进行如下配置:

{
    "servers": {
        "ragflow-mcp-server": {
            "command": "uvx",
            "args": [
                "ragflow-mcp-server",
                "--api-key=ragflow-dhMzViYzJlMTM1NjExZjBiNWU5MDI0Mm",
                "--base-url=http://172.16.33.66:8060"
            ]
        }
    }
}

Continue

config.yaml 中进行如下配置:

mcpServers:
  - name: RAGFlow Server
    command: uvx
    args:
      - ragflow-mcp-server
      - --api-key
      - ragflow-dhMzViYzJlMTM1NjExZjBiNWU5MDI0Mm
      - --base-url
      - http://172.16.33.66:8060

Claude Desktop

  • 在 MacOS 上:配置文件路径为 ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • 在 Windows 上:配置文件路径为 %APPDATA%/Claude/claude_desktop_config.json%
开发/未发布的服务器配置 ``` "mcpServers": { "ragflow-mcp-server": { "command": "uv", "args": [ "--directory", "/Users/junjian/GitHub/wang-junjian/ragflow-mcp-server", "run", "ragflow-mcp-server" ] } } ```
发布版服务器配置 ``` "mcpServers": { "ragflow-mcp-server": { "command": "uvx", "args": [ "ragflow-mcp-server", "--api-key=your_api_key_here", "--base-url=http://your_base_url_here" ] } } ```

✨ 主要特性

组件 - 工具

  1. list_datasets

    • 功能:列出所有数据集。
    • 返回:数据集的 ID 和名称。
  2. create_chat

    • 功能:创建一个新的聊天助手。
    • 输入:
      • name:聊天助手的名称。
      • dataset_id:数据集的 ID。
    • 返回:创建的聊天助手的 ID、名称和会话 ID。
  3. chat

    • 功能:与聊天助手进行对话。
    • 输入:
      • session_id:聊天助手的会话 ID。
      • question:提问内容。
    • 返回:聊天助手的回答。

📚 详细文档

🔧 技术细节

开发

构建和发布

  1. 同步依赖:
uv sync
  1. 安装依赖:
uv install
  1. 运行测试:
uv test
  1. 打包:
uv package

调试

使用 MCP 调试工具进行调试:

npm install -g @mcp/debugger
mcp-debugger

通过这些步骤,您可以轻松集成和使用 RAGFlow 知识库对话服务器到您的项目中。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client