Skip to main content

RAGFlow MCP Server - A Model Context Protocol server integrating with RAGFlow APIs

Project description

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.md

Components

Tools

  1. list_datasets

    • 列出所有数据集
    • 返回数据集的 ID 和名称
  2. create_chat

    • 创建一个新的聊天助手
    • 输入:
      • name: 聊天助手的名称
      • dataset_id: 数据集的 ID
    • 返回创建的聊天助手的 ID、名称和会话 ID
  3. chat

    • 与聊天助手进行对话
    • 输入:
      • session_id: 聊天助手的会话 ID
      • question: 提问内容
    • 返回聊天助手的回答

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/Unpublished Servers Configuration ``` "mcpServers": { "ragflow-mcp-server": { "command": "uv", "args": [ "--directory", "/Users/junjian/GitHub/wang-junjian/ragflow-mcp-server", "run", "ragflow-mcp-server" ] } } ```
Published Servers Configuration ``` "mcpServers": { "ragflow-mcp-server": { "command": "uvx", "args": [ "ragflow-mcp-server" ] } } ```

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 /Users/junjian/GitHub/wang-junjian/ragflow-mcp-server \
  run ragflow-mcp-server \
  --api-key ragflow-dhMzViYzJlMTM1NjExZjBiNWU5MDI0Mm \
  --base-url http://172.16.33.66:8060

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tmeragflow_mcp_server-0.1.6.tar.gz (118.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tmeragflow_mcp_server-0.1.6-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file tmeragflow_mcp_server-0.1.6.tar.gz.

File metadata

  • Download URL: tmeragflow_mcp_server-0.1.6.tar.gz
  • Upload date:
  • Size: 118.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for tmeragflow_mcp_server-0.1.6.tar.gz
Algorithm Hash digest
SHA256 f1ecb20f6a94ae3e52e35b952fed66a64b954488f2f77f9a5fbbd77e087e0ec0
MD5 41a1b940a6440da8a6f01ba5bdffd415
BLAKE2b-256 aabfa0ffe1d2df5b25f1140d78e1f0e6085eafa92babe8423cf10307afdd424f

See more details on using hashes here.

File details

Details for the file tmeragflow_mcp_server-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for tmeragflow_mcp_server-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9bc5c6c5c8496b99e250fd4d8c3126b0e46c0e7004afb404b6812e70fe3c8ee2
MD5 8b1f2a5b925020a4e42212b1cc4563d2
BLAKE2b-256 f352c8a1a14e75bcab2c1b6a8b41be74cd82a983c0d064399b1b117862cd0cff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page