feat: add MCP server headers support #22718 (#24760)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: Novice <novice12185727@gmail.com>
This commit is contained in:
Cluas 2025-09-08 14:10:55 +08:00 • committed by GitHub
commit f891c67eca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 441 additions and 32 deletions

View file

@ -81,7 +81,7 @@ const translation = {
type: '鉴权类型',
keyTooltip: 'HTTP 头部名称,如果你不知道是什么,可以将其保留为 Authorization 或设置为自定义值',
queryParam: '查询参数',
queryParamTooltip: '用于传递 API 密钥查询参数的名称, 如 "https://example.com/test?key=API_KEY" 中的 "key"参数',
queryParamTooltip: '用于传递 API 密钥查询参数的名称,如 "https://example.com/test?key=API_KEY" 中的 "key"参数',
types: {
none: '无',
api_key_header: '请求头',
@ -188,11 +188,21 @@ const translation = {
serverIdentifierTip: '工作空间内服务器的唯一标识。支持小写字母、数字、下划线和连字符,最多 24 个字符。',
serverIdentifierPlaceholder: '服务器唯一标识,例如 my-mcp-server',
serverIdentifierWarning: '更改服务器标识符后,现有应用将无法识别此服务器',
headers: '请求头',
headersTip: '发送到 MCP 服务器的额外 HTTP 请求头',
headerKey: '请求头名称',
headerValue: '请求头值',
headerKeyPlaceholder: '例如:Authorization',
headerValuePlaceholder: '例如:Bearer token123',
addHeader: '添加请求头',
noHeaders: '未配置自定义请求头',
maskedHeadersTip: '为了安全,请求头值已被掩码处理。修改将更新实际值。',
cancel: '取消',
save: '保存',
confirm: '添加并授权',
timeout: '超时时间',
sseReadTimeout: 'SSE 读取超时时间',
timeoutPlaceholder: '30',
},
delete: '删除 MCP 服务',
deleteConfirmTitle: '你想要删除 {{mcp}} 吗?',