fix(mcp): update MCP wizard to support http type and improve args input

- Replace deprecated 'sse' type with 'http' (as per Claude Code official docs)
- Add HTTP-specific fields: url (required) and headers (optional)
- Implement dynamic UI: show different fields based on selected type
- Improve args input: support multi-line input (one argument per line)
- Add headers parsing supporting both 'KEY: VALUE' and 'KEY=VALUE' formats
- Update backend validation to enforce type-specific required fields
- Update i18n translations (zh/en) with new HTTP-related labels
This commit is contained in:
Jason
2025-10-09 12:04:37 +08:00
parent d0fe9d7533
commit 9471cb0d19
5 changed files with 216 additions and 91 deletions

View File

@@ -280,12 +280,17 @@
"type": "Type",
"command": "Command",
"commandPlaceholder": "uvx",
"args": "Arguments",
"argsPlaceholder": "mcp-server-fetch",
"args": "Arguments (one per line)",
"argsPlaceholder": "mcp-server-fetch\n--config config.json",
"cwd": "Working Directory",
"cwdPlaceholder": "/path/to/project",
"env": "Environment Variables",
"envPlaceholder": "KEY=VALUE\n(one per line)",
"url": "URL",
"urlPlaceholder": "https://api.example.com/mcp",
"urlRequired": "Please enter URL",
"headers": "Headers (optional)",
"headersPlaceholder": "Authorization: Bearer token\nContent-Type: application/json",
"preview": "Configuration Preview",
"apply": "Apply Configuration"
},

View File

@@ -280,12 +280,17 @@
"type": "类型",
"command": "命令",
"commandPlaceholder": "uvx",
"args": "参数",
"argsPlaceholder": "mcp-server-fetch",
"args": "参数(每行一个)",
"argsPlaceholder": "mcp-server-fetch\n--config config.json",
"cwd": "工作目录",
"cwdPlaceholder": "/path/to/project",
"env": "环境变量",
"envPlaceholder": "KEY=VALUE\n(一行一个)",
"url": "URL",
"urlPlaceholder": "https://api.example.com/mcp",
"urlRequired": "请输入 URL",
"headers": "请求头(可选)",
"headersPlaceholder": "Authorization: Bearer token\nContent-Type: application/json",
"preview": "配置预览",
"apply": "应用配置"
},