跳转到内容

url is not supported for stdio,Codex

Quick fix

升级到 v4.0.0 或更高版本,并在 MCP 页面重新同步服务器,清除旧的 type 字段。

报错原文
请修复 /Users/caoxincheng/.codex/config.toml:121:1: url is not supported for stdio.保存文件后,重新打开此对话串.

cc-switch 3.20.4 将 Codex 的 HTTP MCP 服务器同步到 config.toml 时,错误地写入 `type = "stdio"` 和空 `command`,同时保留 `url`。Codex 因而无法加载配置。另一种表现是 Codex 提示 `mcp_servers.*.type` 等配置项未识别;两者都与同步 MCP 时写入旧式 `type` 字段有关。

  1. 升级到 v4.0.0 或更高版本。维护者说明,该版本同步到 Codex 时不再写入 MCP 的 `type` 字段。

  2. 在 MCP 页面重新同步相关服务器,以清除旧配置中的 `type` 字段。HTTP MCP 只写 `url` 和请求头;stdio MCP 只写 `command`/`args`。

ToolCodex
Version3.20.4(受影响版本);v4.0.0 已修复
PlatformsmacOSWindows
升级后还需要做什么?
在 MCP 页面重新同步相关服务器,清除旧的 `type` 字段。

这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。