ragflow-mcp-server-fixed

ragflow-mcp-server-fixed

A fixed MCP server that interacts with RAGFlow for dataset management and chat operations, handling legacy endpoint errors and providing a fallback to OpenAI-compatible endpoints.

Category
Visit Server

README

ragflow-mcp-server-fixed

中文说明

A fixed RAGFlow MCP server for stdio MCP clients.

It keeps the executable name ragflow-mcp-server, so clients can switch from the original package by changing only the package source.

What This Fixes

Some RAGFlow deployments return errors from the legacy chat endpoint, for example:

'NoneType' object is not subscriptable
required argument are missing: messages

This server handles that by:

  • calling RAGFlow HTTP APIs directly;
  • parsing stream responses defensively;
  • falling back to the OpenAI-compatible RAGFlow endpoint when needed;
  • returning clearer error messages from RAGFlow.

Tools

Tool Purpose
list_datasets List RAGFlow datasets.
create_chat Create a chat assistant and session for a dataset.
chat Ask a question in a session returned by create_chat.
ask_configured_chat Ask a server-configured RAGFlow chat assistant directly.
retrieve Retrieve matching chunks directly from a dataset.

For most usage, configure --default-chat-name or --default-chat-id, then use ask_configured_chat.

Quick Start

{
  "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>"
  ]
}

If your MCP client supports environment variables:

{
  "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>"
  }
}

Use chat ID instead of name when possible:

{
  "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>"
  ]
}

Server Options

Option Environment variable Description
--api-key RAGFLOW_API_KEY RAGFlow API key.
--base-url RAGFLOW_BASE_URL RAGFlow base URL.
--default-chat-id RAGFLOW_DEFAULT_CHAT_ID Existing RAGFlow chat assistant ID for ask_configured_chat.
--default-chat-name RAGFLOW_DEFAULT_CHAT_NAME Existing RAGFlow chat assistant name for ask_configured_chat.
--default-session-name RAGFLOW_DEFAULT_SESSION_NAME Session name created for the configured chat.

Local Development

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

Security

  • Do not commit API keys.
  • Prefer environment variables for secrets.
  • Rotate keys that have appeared in logs, screenshots, public issues, or chat transcripts.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured