Browse Source

Docs: add MCP streamable-http transport (#9093)

### What problem does this PR solve?

Add documentation for MCP streamable-http transport.

### Type of change

- [x] Documentation Update

---------

Co-authored-by: writinwaters <93570324+writinwaters@users.noreply.github.com>
tags/v0.20.0
Yongteng Lei 3 months ago
parent
commit
ec51508f3e
No account linked to committer's email address
1 changed files with 15 additions and 0 deletions
  1. 15
    0
      docs/develop/mcp/launch_mcp_server.md

+ 15
- 0
docs/develop/mcp/launch_mcp_server.md View File

- `host`: host mode. - `host`: host mode.
- `api_key`: Required in self-host mode to authenticate the MCP server with the RAGFlow server. See [here](../acquire_ragflow_api_key.md) for instructions on acquiring an API key. - `api_key`: Required in self-host mode to authenticate the MCP server with the RAGFlow server. See [here](../acquire_ragflow_api_key.md) for instructions on acquiring an API key.


### Transports

The RAGFlow MCP server supports two transports: the legacy SSE transport (served at `/sse`), introduced on November 5, 2024 and deprecated on March 26, 2025, and the streamable-HTTP transport (served at `/mcp`). The legacy SSE transport and the streamable HTTP transport with JSON responses are enabled by default. To disable either transport, use the flags `--no-transport-sse-enabled` or `--no-transport-streamable-http-enabled`. To disable JSON responses for the streamable HTTP transport, use the `--no-json-response` flag.

### Launch from Docker ### Launch from Docker


#### 1. Enable MCP server #### 1. Enable MCP server
- --mcp-script-path=/ragflow/mcp/server/server.py - --mcp-script-path=/ragflow/mcp/server/server.py
- --mcp-mode=self-host - --mcp-mode=self-host
- --mcp-host-api-key=ragflow-xxxxxxx - --mcp-host-api-key=ragflow-xxxxxxx
# Optional transport flags for the RAGFlow MCP server.
# If you set `mcp-mode` to `host`, you must add the --no-transport-streamable-http-enabled flag, because the streamable-HTTP transport is not yet supported in host mode.
# The legacy SSE transport and the streamable-HTTP transport with JSON responses are enabled by default.
# To disable a specific transport or JSON responses for the streamable-HTTP transport, use the corresponding flag(s):
# - --no-transport-sse-enabled # Disables the legacy SSE endpoint (/sse)
# - --no-transport-streamable-http-enabled # Disables the streamable-HTTP transport (served at the /mcp endpoint)
# - --no-json-response # Disables JSON responses for the streamable-HTTP transport
``` ```


Where: Where:
- `host`: host mode. - `host`: host mode.
- `mcp-host-api_key`: Required in self-host mode to authenticate the MCP server with the RAGFlow server. See [here](../acquire_ragflow_api_key.md) for instructions on acquiring an API key. - `mcp-host-api_key`: Required in self-host mode to authenticate the MCP server with the RAGFlow server. See [here](../acquire_ragflow_api_key.md) for instructions on acquiring an API key.


:::tip INFO
If you set `mcp-mode` to `host`, you must add the `--no-transport-streamable-http-enabled` flag, because the streamable-HTTP transport is not yet supported in host mode.
:::

#### 2. Launch a RAGFlow server with an MCP server #### 2. Launch a RAGFlow server with an MCP server


Run `docker compose -f docker-compose.yml up` to launch the RAGFlow server together with the MCP server. Run `docker compose -f docker-compose.yml up` to launch the RAGFlow server together with the MCP server.

Loading…
Cancel
Save