Skip to content

[Question]: How to get the MCP Server running? #8544

Open
@Drasek

Description

@Drasek

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (Language Policy).
  • Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Describe your problem

I try to get the MCP server running, thats what i did (i am on v0.19.1 full):

dit the docker-compose-gpu.yml and added the lines from the normal docker-compose for mcp:

The RAGFlow team do not actively maintain docker-compose-gpu.yml, so use them at your own risk.

Pull requests to improve it are welcome.

include:

  • ./docker-compose-base.yml

services:
ragflow:
depends_on:
mysql:
condition: service_healthy
image: ${RAGFLOW_IMAGE}
# Example configuration to set up an MCP server:
command:
- --enable-mcpserver
- --mcp-host=0.0.0.0
- --mcp-port=9382
- --mcp-base-url=http://127.0.0.1:9380
- --mcp-script-path=/ragflow/mcp/server/server.py
- --mcp-mode=self-host
- --mcp-host-api-key=ragflow-VlMTExYjAyNTAyNzExZjA4YjhmY2U5MG
container_name: ragflow-server
ports:
- ${SVR_HTTP_PORT}:9380
- 80:80
- 443:443
volumes:

and it looks like it is starting:

Starting nginx...
Starting ragflow_server...
Starting MCP Server on 0.0.0.0:9382 with base URL http://127.0.0.1:9380...
Starting 1 task executor(s) on host '6aa950a45727'...
2025-06-26 19:18:59,749 INFO 19 ragflow_server log path: /ragflow/logs/ragflow_server.log, log levels: {'peewee': 'WARNING', 'pdfminer': 'WARNING', 'root': 'INFO'}


| / |/ | _ \ / || | _ \ \ / / | _
| |/| | | | |
) | _
| | | |) \ \ / /| | | |) |
| | | | |
| / ) | || _ < \ V / | |
| _ <
|
| |
|_
|
| |
_/|_____|| _\ _/ |_____|| _\

MCP launch mode: self-host
MCP host: 0.0.0.0
MCP port: 9382
MCP base_url: http://127.0.0.1:9380
INFO: Started server process [17]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:9382 (Press CTRL+C to quit)
2025-06-26 19:19:01,381 INFO 19 found 1 gpus
2025-06-26 19:19:04,200 INFO 19 init database on cluster mode successfully
2025-06-26 19:19:06,431 INFO 19 load_model /ragflow/rag/res/deepdoc/det.onnx uses GPU
2025-06-26 19:19:06.477002338 [W:onnxruntime:, session_state.cc:1166 VerifyEachNodeIsAssignedToAnEp] Some nodes were not assigned to the preferred execution providers which may or may not have an negative impact on performance. e.g. ORT explicitly assigns shape related ops to CPU to improve perf.
2025-06-26 19:19:06.477022463 [W:onnxruntime:, session_state.cc:1168 VerifyEachNodeIsAssignedToAnEp] Rerunning with verbose output on a non-minimal build will show node assignments.
2025-06-26 19:19:06,487 INFO 19 load_model /ragflow/rag/res/deepdoc/rec.onnx uses GPU
2025-06-26 19:19:09,888 INFO 19
____ ___ ______ ______ __
/ __ \ / | / // // / _ __
/ /
/ // /| | / / __ / /
/ // __ | | /| / /
/ , // ___ |/ // // __/ / // // /| |/ |/ /
/
/ |
|// ||_/// // _/ |/|__/

2025-06-26 19:19:09,888 INFO 19 RAGFlow version: v0.19.1 full

But if i try to reach it with curl (on the same server) i get this:

curl -N -H "api_key: ragflow-XXXX" http://127.0.0.1:9382/sse
curl: (7) Failed to connect to 127.0.0.1 port 9382 after 0 ms: Couldn't connect to server

Did i miss something? Thank you for your advise!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions