ragflow-kb-mcp
The MCP server is distributed via a public GitHub repository (github.com/feci/ragflow-mcp-server) and can be installed directly from it using uvx. The repository hosts the source code for the ragflow-kb-mcp package.
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-kb-mcpupload meeting-notes.md to the docs dataset and parse it"
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
An MCP server for managing RAGFlow knowledge bases through the RAGFlow HTTP API: create datasets, upload documents, run parsing, edit chunks and metadata, and search.
RAGFlow ships its own MCP endpoint, but it only offers ragflow_list_datasets,
ragflow_list_chats and ragflow_retrieval. Agents could search the knowledge base and
could not add anything to it. This server fills that gap. Tested against RAGFlow
1.0.0-rc2 (Go API).
The Python package and the command are called ragflow-kb-mcp.
Tools
Area | Tools |
Datasets |
|
Documents |
|
Parsing |
|
Chunks |
|
Metadata |
|
Search |
|
Tools carry MCP annotations: read-only tools are marked readOnlyHint, and the delete
tools are marked destructiveHint, so clients can ask before running them.
Uploading
ragflow_upload_document takes exactly one source:
text: UTF-8 content such as Markdown notes. Needs afilenamewith an extension.content_base64: file bytes. The bytes pass through the model's context, so use this only for small files.url: RAGFlow downloads the file or page itself.file_path: a file on the machine that runs this server. This is off until the operator lists allowed directories inRAGFLOW_UPLOAD_ROOTS. Paths are resolved, including symlinks, before the check.
The file extension decides which RAGFlow parser runs. Parsing starts right after the
upload unless parse is false. Set wait_seconds (up to 600) to wait for the chunks.
An existing document with the same name makes the upload fail unless you pass
replace_existing. For url uploads, include the extension in filename: RAGFlow adds one
when it is missing, and the duplicate check compares the name you passed. In that case the new file is uploaded first and the old one is
deleted afterwards.
ragflow_update_metadata without document_ids or metadata_condition would change every
document in the dataset, so it asks for all_documents: true first.
Related MCP server: RAGFlow MCP Server
Configuration
Variable | Required | Meaning |
| yes | e.g. |
| yes | RAGFlow API key |
| no | embedding model for new datasets, |
| no | comma-separated tool names to leave out, e.g. the delete tools |
| no | directories |
| no | HTTP timeout in seconds, default 120 |
Running
The server speaks MCP over stdio.
uvx --from git+https://github.com/feci/ragflow-mcp-server ragflow-kb-mcpClaude Code:
claude mcp add ragflow-kb \
-e RAGFLOW_BASE_URL=https://ragflow.example.com \
-e RAGFLOW_API_KEY=... \
-e RAGFLOW_UPLOAD_ROOTS="$HOME/Documents" \
-- uvx --from git+https://github.com/feci/ragflow-mcp-server ragflow-kb-mcpIf RAGFlow's built-in MCP endpoint is also connected, you can avoid duplicate tool names
with RAGFLOW_DISABLED_TOOLS=ragflow_list_datasets,ragflow_retrieval.
RAGFlow 1.0 notes
These differences from the published HTTP reference were checked against a live 1.0.0-rc2 instance and its source:
Dataset creation needs
parse_type: 1together withparser_id(e.g.general), and rejectsdescriptionandchunk_method. The server sets the description with a follow-up update.Parsing state is reported in
ingestion_status(UNSTART,SCHEDULED,RUNNING,COMPLETED,FAILED,STOPPED) together withprogress.Listing documents with a
nameoridfilter that matches nothing returns error code 102 ("you don't own the document") instead of an empty list. The server reports it as an empty result.Upload with
?type=webdownloads any URL (a file or a page) on the RAGFlow side, so the MCP server never fetches remote content itself.
Development
uv sync
uv run pytestLicense
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
- chatbaseOAuthco.chatbase
Manage Chatbase agents, sources, conversations and help-desk tickets.
Ingest, manage, and retrieve documents for RAG-powered AI applications
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
Access Pollinations models and API capabilities through agent tools.
Related MCP Servers
- AlicenseBqualityDmaintenanceAllows AI models to interact with SourceSync.ai's knowledge management platform to organize, ingest, retrieve, and search content in knowledge bases.2511 npm3MIT
- 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-
- FlicenseBqualityDmaintenanceEnables listing datasets, creating chat assistants, and chatting with them via RAGFlow API.33-
- AlicenseNot gradedqualityDmaintenanceEnables semantic retrieval and knowledge base management through the RAGFlow API, including dataset, document, chunk, chat, and graph operations.6MIT