mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-01 21:37:33 +08:00
docs: modify docs display & add images (#17575)
### Summary modify docs display add some images delete enterprise docs standardize capitalization
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
title: Launch RAGFlow MCP Server
|
||||
sidebar_label: Launch RAGFlow MCP Server
|
||||
slug: /launch_mcp_server
|
||||
sidebar_custom_props: {
|
||||
categoryIcon: LucideTvMinimalPlay
|
||||
}
|
||||
---
|
||||
# Launch RAGFlow MCP server
|
||||
# Launch RAGFlow MCP Server
|
||||
|
||||
Launch an MCP server from source or via Docker.
|
||||
|
||||
@@ -31,11 +33,11 @@ Once a connection is established, an MCP server communicates with its client in
|
||||
If you wish to try out our MCP server without upgrading RAGFlow, community contributor [yiminghub2024](https://github.com/yiminghub2024) 👏 shares their recommended steps [here](#launch-an-mcp-server-without-upgrading-ragflow).
|
||||
:::
|
||||
|
||||
## Launch an MCP server
|
||||
## Launch an MCP Server
|
||||
|
||||
You can start an MCP server either from source code or via Docker.
|
||||
|
||||
### Launch from source code
|
||||
### Launch from Source Code
|
||||
|
||||
1. Ensure that a RAGFlow server v0.18.0+ is properly running.
|
||||
2. Launch the MCP server:
|
||||
@@ -66,7 +68,7 @@ The RAGFlow MCP server supports two transports: the legacy SSE transport (served
|
||||
|
||||
### Launch from Docker
|
||||
|
||||
#### 1. Enable MCP server
|
||||
#### 1. Enable MCP Server
|
||||
|
||||
The MCP server is designed as an optional component that complements the RAGFlow server and disabled by default. To enable MCP server:
|
||||
|
||||
@@ -111,7 +113,7 @@ Where:
|
||||
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.
|
||||
|
||||
@@ -166,7 +168,7 @@ Run `docker compose -f docker-compose.yml up` to launch the RAGFlow server toget
|
||||
...
|
||||
```
|
||||
|
||||
#### Launch an MCP server without upgrading RAGFlow
|
||||
#### Launch an MCP Server Without Upgrading RAGFlow
|
||||
|
||||
:::info KUDOS
|
||||
This section is contributed by our community contributor [yiminghub2024](https://github.com/yiminghub2024). 👏
|
||||
@@ -186,7 +188,7 @@ This section is contributed by our community contributor [yiminghub2024](https:/
|
||||
docker compose -f docker-compose.yml up -d
|
||||
```
|
||||
|
||||
### Check MCP server status
|
||||
### Check MCP Server Status
|
||||
|
||||
Run the following to check the logs the RAGFlow server and the MCP server:
|
||||
|
||||
@@ -194,15 +196,15 @@ Run the following to check the logs the RAGFlow server and the MCP server:
|
||||
docker logs docker-ragflow-cpu-1
|
||||
```
|
||||
|
||||
## Security considerations
|
||||
## Security Considerations
|
||||
|
||||
As MCP technology is still at early stage and no official best practices for authentication or authorization have been established, RAGFlow currently uses [API key](../acquire_ragflow_api_key.md) to validate identity for the operations described earlier. However, in public environments, this makeshift solution could expose your MCP server to potential network attacks. Therefore, when running a local SSE server, it is recommended to bind only to localhost (`127.0.0.1`) rather than to all interfaces (`0.0.0.0`).
|
||||
|
||||
For further guidance, see the [official MCP documentation](https://modelcontextprotocol.io/docs/concepts/transports#security-considerations).
|
||||
|
||||
## Frequently asked questions
|
||||
## Frequently Asked Questions
|
||||
|
||||
### When to use an API key for authentication?
|
||||
### When to Use an API Key for Authentication?
|
||||
|
||||
The use of an API key depends on the operating mode of your MCP server.
|
||||
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
title: RAGFlow MCP Client Examples
|
||||
sidebar_label: RAGFlow MCP Client Examples
|
||||
slug: /mcp_client
|
||||
sidebar_custom_props: {
|
||||
categoryIcon: LucideBookMarked
|
||||
}
|
||||
|
||||
---
|
||||
# RAGFlow MCP client examples
|
||||
# RAGFlow MCP Client Examples
|
||||
|
||||
Python and curl MCP client examples.
|
||||
|
||||
------
|
||||
|
||||
## Example MCP Python client
|
||||
## Example MCP Python Client
|
||||
|
||||
We provide a *prototype* MCP client example for testing [here](https://github.com/infiniflow/ragflow/blob/main/mcp/client/client.py).
|
||||
|
||||
@@ -32,7 +33,7 @@ async with sse_client("http://localhost:9382/sse", headers={"Authorization": "YO
|
||||
```
|
||||
:::
|
||||
|
||||
## Use curl to interact with the RAGFlow MCP server
|
||||
## Use Curl to Interact with the RAGFlow MCP Server
|
||||
|
||||
When interacting with the MCP server via HTTP requests, follow this initialization sequence:
|
||||
|
||||
@@ -47,7 +48,7 @@ For more information about this initialization process, see [here](https://model
|
||||
|
||||
In the following sections, we will walk you through a complete tool calling process.
|
||||
|
||||
### 1. Obtain a session ID
|
||||
### 1. Obtain a Session ID
|
||||
|
||||
Each curl request with the MCP server must include a session ID:
|
||||
|
||||
@@ -70,7 +71,7 @@ event: endpoint
|
||||
data: /messages/?session_id=5c6600ef61b845a788ddf30dceb25c54
|
||||
```
|
||||
|
||||
### 2. Send an `Initialize` request
|
||||
### 2. Send an `Initialize` Request
|
||||
|
||||
The client sends an `initialize` request with protocol version and capabilities:
|
||||
|
||||
@@ -104,7 +105,7 @@ event: message
|
||||
data: {"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2025-03-26","capabilities":{"experimental":{"headers":{"host":"127.0.0.1:9382","user-agent":"curl/8.7.1","accept":"*/*","api_key":"ragflow-xxxxxxxxxxxx","accept-encoding":"gzip"}},"tools":{"listChanged":false}},"serverInfo":{"name":"docker-ragflow-cpu-1","version":"1.9.4"}}}
|
||||
```
|
||||
|
||||
### 3. Acknowledge readiness
|
||||
### 3. Acknowledge Readiness
|
||||
|
||||
The client confirms readiness with an `initialized` notification:
|
||||
|
||||
@@ -121,7 +122,7 @@ curl -X POST "http://127.0.0.1:9382/messages/?session_id=$session_id" \
|
||||
|
||||
_The connection is established between the client and the server, and further operations (such as tool listing) may proceed._
|
||||
|
||||
### 4. Tool listing
|
||||
### 4. Tool Listing
|
||||
|
||||
```bash
|
||||
curl -X POST "http://127.0.0.1:9382/messages/?session_id=$session_id" \
|
||||
@@ -143,7 +144,7 @@ data: {"jsonrpc":"2.0","id":3,"result":{"tools":[{"name":"ragflow_retrieval","de
|
||||
|
||||
```
|
||||
|
||||
### 5. Tool calling
|
||||
### 5. Tool Calling
|
||||
|
||||
```bash
|
||||
curl -X POST "http://127.0.0.1:9382/messages/?session_id=$session_id" \
|
||||
@@ -172,7 +173,7 @@ data: {"jsonrpc":"2.0","id":4,"result":{...}}
|
||||
|
||||
```
|
||||
|
||||
### A complete curl example
|
||||
### A Complete Curl Example
|
||||
|
||||
```bash
|
||||
session_id="YOUR_SESSION_ID" && \
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
title: RAGFlow MCP Tools
|
||||
sidebar_label: RAGFlow MCP Tools
|
||||
slug: /mcp_tools
|
||||
sidebar_custom_props: {
|
||||
categoryIcon: LucideToolCase
|
||||
}
|
||||
---
|
||||
# RAGFlow MCP tools
|
||||
# RAGFlow MCP Tools
|
||||
|
||||
The MCP server currently offers a specialized tool to assist users in searching for relevant information powered by RAGFlow DeepDoc technology:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user