RAGflow MCP server for Claude Desktop and Agentic Coding
RAGflow is a knowledge base for your books, reports, documents, and tables. It uses custom (local) models and established (remote) LLMs to interact with AI agents. I wrote an MCP server for it, that works with Claude, opencode and other clients
RAG stands for Retrieval Augmented Generation. It's a way to pull in context. This can allow for a more selective and targeted approach. Search and dump. Use
- your eBooks
- papers
- conference proceedings
- business reports (incl. PPT)
- Excel sheets
- ...
RAGflow is a software that makes all of that possible. Using it the right way saves a lot of time. Research time, analysis time, data prep time.
You don't need to read all of "this"... you need AI to skim through this. Grok the content. Get you the interesting stuff. Serve you.

From RAGflow to Claude
The problem: how to get these wonderful information into your AI tools. Like Claude Desktop or claude , or opencode . Or the newest variant.



codex , Google gemini-cli or Anthropic claude will work for you.
claude can not only add the data to the context. It can write code to calculate model forecasts and aid you with Excel formulas. How to get started with RAGflow and Agentic
The answer: ragflow-claude-desktop-local-mcp, named after a famous scholar from the early 1900s...
MCP (Model Context Protocol) is an immature new technology and needs further development. Do not use this in production unless you have development experience. This tool should not be used outside of research setups for now.
An MCP config for Claude Desktop can look like the following listing. The setup is based on Anaconda Python, which is used by Data Scientists (and within MS365 Python cells in Microsoft Excel).
{
"mcpServers": {
"ragflow": {
"command": "/Users/mc/anaconda3/envs/mcp-servers/bin/uv",
"args": [
"run",
"--directory",
"/Users/mc/Source/ragflow-claude-desktop-local-mcp",
"ragflow-claude-mcp"
],
"env": {
"RAGFLOW_BASE_URL": "http://192.168.122.93:9380",
"RAGFLOW_API_KEY": "ragflow-A1...W"
}
}
}
}
Which provider and which Agents work best?
| Provider | Model | Tier/Tool | Speed | Result (1-5) | Note |
|---|---|---|---|---|---|
| OpenAI | o3 | Pro Codex + RAGflow MCP | 2s | 4+ | |
| OpenAI | codex-mini-latest | Pro Codex + RAGflow MCP | FAIL | 0 | The model seems to have problems in general 2025-07-08 |
| OpenRouter | DeepSeek | OpenRouter Codex + RAGflow MCP | 2s | 3 | |
| OpenRouter | DeepSeek | OpenRouter Claude Code CCS + RAGflow MCP | 2s | 3 | Does not detect context window overflow |
| Gemini | Free Gemini CLI + RAGflow MCP | 10s | 4.8 | ||
| x-AI | Grok 3 | OpenRouter Codex + RAGflow MCP | 4s | 4.9 | |
| Anthropic | Claude Sonnet | Pro Claude Code + RAGflow MCP | 4s | 5 | Auto-switches Claude models |
| Anthropic | Claude Sonnet 4 | GitHub Pro opencode + RAGflow MCP | 4s | 5 | Hacky (Sonnet 4 without extra charges) |
Connect the dots - with GraphRAG


Instead of Rerank, I use DSPy for query optimization.
This is an optional feature that is implemented with OpenRouter or OpenAI API support. It's probably even better than reranking, and it allows simple queries to return high quality information. With the power of GPT-5, Sonnet or Opus combined.
Summary
This is a research project. It's mighty, but it's a proof-of-concept research and development code base.
It shows promising results, which speak for themselves. Personally, I find RAGflow a fantastic software, like many Chinese open-source contributions recently.