浏览代码

Fix/mcp doc (#7239)

### What problem does this PR solve?

This PR fixes an issue with the MCP server configuration in RAGFlow's
Docker deployment where:
1. Incorrect parameter naming (`--mcp--host-api-key` with double
hyphens) caused server startup failures
2. Port binding conflicts occurred due to unexposed MCP ports in Docker
3. Inconsistent host addressing between `0.0.0.0` and `127.0.0.1` led to
connectivity issues

The changes ensure proper MCP server initialization and reliable
inter-service communication.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [ ] New Feature (non-breaking change which adds functionality)
- [ ] Documentation Update
- [ ] Refactoring
- [ ] Performance Improvement
- [ ] Other (please describe):

### Key Changes

1. **Parameter Correction**:
   - Fixed `--mcp--host-api-key` → `--mcp-host-api-key`
tags/v0.19.0
yxkong 6 个月前
父节点
当前提交
4e31eea55f
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1
    1
      docker/docker-compose.yml
  2. 1
    1
      docs/develop/mcp.md

+ 1
- 1
docker/docker-compose.yml 查看文件

# - --mcp-base-url=http://127.0.0.1:9380 # - --mcp-base-url=http://127.0.0.1:9380
# - --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"
container_name: ragflow-server container_name: ragflow-server
ports: ports:
- ${SVR_HTTP_PORT}:9380 - ${SVR_HTTP_PORT}:9380

+ 1
- 1
docs/develop/mcp.md 查看文件

- --mcp-base-url=http://127.0.0.1:9380 - --mcp-base-url=http://127.0.0.1:9380
- --mcp-script-path=/ragflow/mcp/server/server.py - --mcp-script-path=/ragflow/mcp/server/server.py
- --mcp-mode=self-host # `self-host` or `host` - --mcp-mode=self-host # `self-host` or `host`
- --mcp--host-api-key="ragflow-xxxxxxx" # only need to privide when mode is `self-host`
- --mcp-host-api-key="ragflow-xxxxxxx" # only need to privide when mode is `self-host`
``` ```


Then launch it normally `docker compose -f docker-compose.yml`. Then launch it normally `docker compose -f docker-compose.yml`.

正在加载...
取消
保存