### What problem does this PR solve? ### Type of change - [x] Documentation Updatetags/v0.19.0
| @@ -0,0 +1,8 @@ | |||
| { | |||
| "label": "MCP", | |||
| "position": 4, | |||
| "link": { | |||
| "type": "generated-index", | |||
| "description": "Guides and references on accessing RAGFlow's knowledge bases via MCP." | |||
| } | |||
| } | |||
| @@ -1,5 +1,5 @@ | |||
| --- | |||
| sidebar_position: 4 | |||
| sidebar_position: 1 | |||
| slug: /launch_mcp_server | |||
| --- | |||
| @@ -177,24 +177,6 @@ Run the following to check the logs the RAGFlow server and the MCP server: | |||
| docker logs ragflow-server | |||
| ``` | |||
| ## MCP client example | |||
| We provide a *prototype* MCP client example for testing [here](https://github.com/infiniflow/ragflow/blob/main/mcp/client/client.py). | |||
| :::danger IMPORTANT | |||
| If your MCP server is running in host mode, include your acquired API key in your client's `headers` as shown below: | |||
| ```python | |||
| async with sse_client("http://localhost:9382/sse", headers={"api_key": "YOUR_KEY_HERE"}) as streams: | |||
| # Rest of your code... | |||
| ``` | |||
| ::: | |||
| ## Tools | |||
| The MCP server currently offers a specialized tool to assist users in searching for relevant information powered by RAGFlow DeepDoc technology: | |||
| - **retrieve**: Fetches relevant chunks from specified `dataset_ids` and optional `document_ids` using the RAGFlow retrieve interface, based on a given question. Details of all available datasets, namely, `id` and `description`, are provided within the tool description for each individual dataset. | |||
| ## 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`). | |||
| @@ -0,0 +1,16 @@ | |||
| --- | |||
| sidebar_position: 3 | |||
| slug: /mcp_client | |||
| --- | |||
| # RAGFlow MCP client example | |||
| We provide a *prototype* MCP client example for testing [here](https://github.com/infiniflow/ragflow/blob/main/mcp/client/client.py). | |||
| :::danger IMPORTANT | |||
| If your MCP server is running in host mode, include your acquired API key in your client's `headers` as shown below: | |||
| ```python | |||
| async with sse_client("http://localhost:9382/sse", headers={"api_key": "YOUR_KEY_HERE"}) as streams: | |||
| # Rest of your code... | |||
| ``` | |||
| ::: | |||
| @@ -0,0 +1,12 @@ | |||
| --- | |||
| sidebar_position: 2 | |||
| slug: /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: | |||
| - **retrieve**: Fetches relevant chunks from specified `dataset_ids` and optional `document_ids` using the RAGFlow retrieve interface, based on a given question. Details of all available datasets, namely, `id` and `description`, are provided within the tool description for each individual dataset. | |||
| For more information, see our Python implementation of the [MCP server](https://github.com/infiniflow/ragflow/blob/main/mcp/server/server.py). | |||
| @@ -85,7 +85,7 @@ Yes, you can. Just one graph is generated per knowledge base. The smaller graphs | |||
| ### Does the knowledge graph automatically update when I remove a related file? | |||
| Nope. The knowledge graph does *not* automatically update *until* a newly uploaded graph is parsed. | |||
| Nope. The knowledge graph does *not* automatically update *until* a newly uploaded document is parsed. | |||
| ### How to remove a generated knowledge graph? | |||
| @@ -44,7 +44,7 @@ From this release onwards, built-in rerank models have been removed because they | |||
| - [Set page rank](./guides/dataset/set_page_rank.md) | |||
| - [Enable RAPTOR](./guides/dataset/enable_raptor.md) | |||
| - [Set variables for your chat assistant](./guides/chat/set_chat_variables.md) | |||
| - [RAGFlow MCP server overview](./develop/launch_mcp_server.md) | |||
| - [Launch RAGFlow MCP server](./develop/mcp/launch_mcp_server.md) | |||
| ## v0.17.2 | |||