Enhance MCP config with authentication headers

Added authentication headers for MCP server configuration.
This commit is contained in:
公明
2026-03-09 22:40:06 +08:00
committed by GitHub
parent 52b70d8b16
commit 2fce15f82a

View File

@@ -93,8 +93,10 @@ security:
# MCP (Model Context Protocol) 用于工具注册和调用
mcp:
enabled: false # 是否启用 MCP 服务器http模式
host: 0.0.0.0 # MCP 服务器监听地址
port: 8081 # MCP 服务器端口
host: 0.0.0.0 # MCP 服务器监听地址
port: 8081 # MCP 服务器端口
auth_header: "X-MCP-Token" # 鉴权:请求需携带该 header 且值与 auth_header_value 一致方可调用。留空表示不鉴权
auth_header_value: "" # 鉴权密钥值(与 auth_header 配合使用,建议使用随机字符串)
# 外部 MCP 配置
external_mcp: