Skip to main content
Glama
AITech-Team

RAGFlow MCP Server

by AITech-Team

ragflow-mcp-server-continue MCP server

RAGFlow API MCP Server,可以查找知识库和聊天。

Components

Tools

  1. list_datasets

    • 列出所有数据集

    • 返回数据集的 ID 和名称

  2. create_chat

    • 创建一个新的聊天助手

    • 输入:

      • name: 聊天助手的名称

      • dataset_id: 数据集的 ID

    • 返回创建的聊天助手的 ID、名称和会话 ID

  3. chat

    • 与聊天助手进行对话

    • 输入:

      • session_id: 聊天助手的会话 ID

      • question: 提问内容

    • 返回聊天助手的回答

  4. retrieve

    • 检索相关信息

    • 输入:

      • dataset_ids: 数据集的 ID

      • question: 提问内容

    • 返回从知识库检索到的内容

Related MCP server: mcp-lightrag

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:8060

Claude 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:

  1. Sync dependencies and update lockfile:

uv sync
  1. Build package distributions:

uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:

uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN

  • Or username/password: --username/UV_PUBLISH_USERNAME and --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 ragflow-mcp-server-continue run ragflow-mcp-server-continue

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

Available Tools

4 tools
chat聊天C

向聊天助手提问

ParametersJSON Schema
NameRequiredDescriptionDefault
session_idYes聊天会话ID
questionYes提问的问题

TDQS

C2.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It doesn't disclose what happens after asking (e.g., returns an answer), any side effects, or idempotency. Simply says 'ask'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one short sentence, which is concise but under-specified. It could be slightly longer to include key details without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given only two parameters and no output schema, the description should clarify that it returns a response and requires an existing session. It lacks this information, making it incomplete for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (both parameters described). The description adds no extra meaning beyond schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'ask the chat assistant' is somewhat vague but indicates the tool is for asking questions. It doesn't explicitly distinguish from sibling 'create_chat', but context implies this is for existing sessions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus siblings. For example, it doesn't say to use this for ongoing conversations and 'create_chat' for new ones.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create_chat创建聊天C

创建一个新的聊天助手,基于指定的数据集

ParametersJSON Schema
NameRequiredDescriptionDefault
dataset_idYes数据集ID
nameNo聊天助手的名称,可选,默认为'RAGFlow助手'

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While '创建一个新的聊天助手' clearly indicates a write/mutation operation, the description doesn't address important behavioral aspects: what permissions are required, whether there are rate limits, what happens if creation fails, or what the expected response format is. For a creation tool with zero annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - a single sentence that directly states the tool's purpose. Every word earns its place with no redundancy or unnecessary elaboration. It's front-loaded with the core functionality immediately apparent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation/mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what gets created (beyond '聊天助手'), what the creation process entails, what happens on success/failure, or what the agent should expect as a result. The description leaves too many behavioral questions unanswered for a tool that modifies system state.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters completely. The description adds no additional parameter semantics beyond what's in the schema - it mentions '基于指定的数据集' which corresponds to dataset_id, but provides no extra context about dataset requirements, format, or constraints. Baseline 3 is appropriate when schema does all the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('创建一个新的聊天助手' - creates a new chat assistant) and the resource ('基于指定的数据集' - based on specified dataset). It's specific about what the tool does, though it doesn't explicitly differentiate from sibling tools like 'chat' which might be for interacting with existing assistants rather than creating new ones.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, when this creation operation is appropriate, or how it differs from sibling tools like 'chat', 'list_datasets', or 'retrieve'. The agent must infer usage context from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_datasets列出数据集B

列出 RAGFlow 中的所有数据集

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, authentication requirements, or pagination behavior, which are important for a tool with no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no wasted words, appropriately sized for the simplicity of the operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description does not detail the output format or behavior (e.g., ordering, empty results), which is needed given the absence of an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, and schema coverage is 100%. The baseline for zero parameters is 4, and no additional parameter semantics are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List all datasets in RAGFlow' using a specific verb and resource, distinguishing it from sibling tools like chat and create_chat.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

retrieve检索相关信息C

从RAGFlow中指定的数据集检索相关内容

ParametersJSON Schema
NameRequiredDescriptionDefault
dataset_idsYes数据集ID
questionYes提出的问题

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves content but doesn't describe how it works (e.g., similarity search, ranking), what the output format is (since no output schema exists), or any constraints like rate limits or authentication needs. For a retrieval tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to understand at a glance. Every part of the sentence earns its place by conveying essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a retrieval operation with no annotations and no output schema, the description is incomplete. It doesn't explain what 'relevant content' means, how results are returned, or any behavioral traits. For a tool that likely involves search logic and result formatting, more context is needed to understand its full functionality and limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters ('dataset_ids' and 'question') with descriptions. The tool description adds no additional meaning beyond what the schema provides, such as explaining how the question is used for retrieval or the format of dataset IDs. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('检索相关内容' - retrieve relevant content) and the resource ('从RAGFlow中指定的数据集' - from specified datasets in RAGFlow). It distinguishes from sibling tools like 'chat' and 'create_chat' by focusing on retrieval rather than conversation, though it doesn't explicitly mention how it differs from 'list_datasets'. The purpose is specific and actionable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer 'retrieve' over 'chat' or 'create_chat' for information needs, nor does it specify prerequisites or exclusions. Usage is implied by the purpose but lacks explicit context for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updates
    • First observedchat
    • First observedcreate_chat
    • First observedlist_datasets
    • First observedretrieve

TDQS

B3.2/5.0

Scored across 4 tools

Disambiguation4/5

The tools are mostly distinct with clear purposes: chat for queries, create_chat for new assistants, list_datasets for enumeration, and retrieve for content retrieval. However, chat and retrieve could potentially be confused since both involve interacting with datasets, though their descriptions clarify different intents (general Q&A vs. specific content fetching).

Naming Consistency5/5

All tool names follow a consistent verb-based pattern: chat, create_chat, list_datasets, and retrieve. They use simple, clear verbs without mixing conventions like camelCase or snake_case, making the naming predictable and easy to understand.

Tool Count4/5

With 4 tools, the count is reasonable for a RAG-focused server, covering core operations like chatting, dataset management, and retrieval. It's slightly lean but functional; adding tools for updating or deleting datasets could enhance completeness without being necessary for basic use.

Completeness3/5

The tools cover key RAG workflows: dataset listing, retrieval, and chat interactions. However, there are notable gaps, such as no tools for creating, updating, or deleting datasets, which limits full lifecycle management. Agents can work around this by focusing on existing datasets, but the surface is incomplete for comprehensive dataset control.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers