RAGFlow MCP Server
Allows interaction with RAGFlow knowledge bases and chat through GitHub Copilot via the MCP protocol.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@RAGFlow MCP Server list all datasets"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
RAGFlow MCP Server
RAGFlow API MCP Server,可以查找知识库和聊天。
下载 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.mdComponents
Tools
list_datasets
列出所有数据集
返回数据集的 ID 和名称
create_chat
创建一个新的聊天助手
输入:
name: 聊天助手的名称
dataset_id: 数据集的 ID
返回创建的聊天助手的 ID、名称和会话 ID
chat
与聊天助手进行对话
输入:
session_id: 聊天助手的会话 ID
question: 提问内容
返回聊天助手的回答
Related MCP server: Dify Management MCP
Configuration
[TODO: Add configuration details specific to your implementation]
Quickstart
Install
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:8060Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Development
Building and Publishing
To prepare the package for distribution:
Sync dependencies and update lockfile:
uv syncBuild package distributions:
uv buildThis will create source and wheel distributions in the dist/ directory.
Publish to PyPI:
uv publishNote: You'll need to set PyPI credentials via environment variables or command flags:
Token:
--tokenorUV_PUBLISH_TOKENOr username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector \
uv --directory /Users/junjian/GitHub/wang-junjian/ragflow-mcp-server \
run ragflow-mcp-server \
--api-key ragflow-dhMzViYzJlMTM1NjExZjBiNWU5MDI0Mm \
--base-url http://172.16.33.66:8060Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Available Tools
3 toolschat聊天C
向聊天助手提问
Inputs: session_id (required), question (required).
create_chat创建聊天B
创建一个新的聊天助手,基于指定的数据集
Inputs: dataset_id (required), name.
list_datasets列出数据集B
列出 RAGFlow 中的所有数据集
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: chat queries an assistant, create_chat creates a new assistant, and list_datasets retrieves available datasets. No overlap in functionality.
All tool names follow a consistent snake_case verb_noun pattern (chat, create_chat, list_datasets), making them predictable and easy to understand.
With only 3 tools, the server is minimal. While this might suffice for basic interactions, it feels thin for a full RAGFlow integration.
The tool set covers only basic operations: chatting, creating a chat assistant, and listing datasets. Missing crucial CRUD operations for datasets and assistants, leaving significant gaps for agents.
Maintenance
Related MCP Connectors
Enables AI assistants to retrieve event data and execute event management operations in Nunify.
Connect assistants to your workspace knowledge, skills, and work tools.
Manage Chatbase agents, sources, conversations and help-desk tickets.
Connect ChatGPT or Claude to your CRM, store or shipping API. Keys stay out of the chat.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables interaction with the RAGFlow API to manage knowledge base datasets and conduct AI-driven chat sessions. Users can list datasets, create chat assistants, and retrieve or query information from specialized knowledge bases.4-
- FlicenseNot gradedqualityDmaintenanceEnables programmatic management of a Dify instance, including datasets, apps, and tools.-
- AlicenseBqualityDmaintenanceEnables AI assistants to manage contacts, send messages, handle conversations, and manage workspace via the Respond.io API.28191 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables semantic retrieval and knowledge base management through the RAGFlow API, including dataset, document, chunk, chat, and graph operations.7MIT