Fix Codex "MCP client for … timed out"
Raise startup_timeout_sec when Codex gives up on an MCP server after 10 seconds, and rule out look-alike mistakes: a misspelled section name or a TOML escape.
MCP client for `playwright` timed out after 10 seconds. Add or adjust `startup_timeout_sec` in your config.toml:This message means Codex got no startup response from the MCP server within 10 seconds. First decide whether the server is slow or the config never loaded at all.
[1] Check that the config is read. The server must appear in the list.
$ codex mcp list$ codex mcp get playwright[2] Run the server command in a terminal and time it. Servers fetched with npx -y are slowest on the first run.
$ time npx -y @playwright/mcp@latest --help[3] Add startup_timeout_sec to that server's table. The unit is seconds and the default is 10. The separate tool-call limit tool_timeout_sec defaults to 60 (docs).
[mcp_servers.playwright]command = "npx"args = ["-y", "@playwright/mcp@latest"]startup_timeout_sec = 60Error: failed to load bootstrap configuration Caused by: invalid type: string "30", expected f64 in `mcp_servers.x.startup_timeout_sec`[4] The section name is mcp_servers. With the singular mcp_server, codex mcp list reports an empty list without any error, which is easy to mistake for a timeout.
[mcp_server.x]command = "a"$ codex mcp listNo MCP servers configured yet. Try `codex mcp add my-tool -- my-command`.--strict-config turns unknown keys into errors. It does not work with codex mcp (Error: --strict-config is not supported for codex mcp`); put it on exec` or an interactive run.
$ codex --strict-config exec "hi"Error loading config.toml:~/.codex/config.toml:1:2: unknown configuration field `mcp_server` |1 | [mcp_server.x][5] A Windows path in a double-quoted TOML string is read as an escape sequence. Use a single-quoted literal string or forward slashes.
[mcp_servers.x]command = "C:\Users\a"Error: failed to load bootstrap configuration Caused by: 0: ~/.codex/config.toml:2:14: too few unicode value digits, expected unicode hexadecimal valuecommand = 'C:\Tools\server.exe'[6] If a longer limit still fails, the server itself is not starting. Run the command from step 2 and read its error. In issue openai/codex#11851, a playwright server timed out at 10 seconds; the reporter's proxy was blocking the server's connections, and adjusting the proxy fixed it. The cause may be the network, not the timeout value.