GrepBoard/Manuals
605 manuals ·

Fix Codex "MCP client for … timed out"

·Tested on Codex CLI 0.163.0 · Ubuntu 24.04 · Node 24 (config errors reproduced; timeout behavior per official docs)·Test scope ↓·6 steps

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.

output
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.

console
$ 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.

console
$ 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).

~/.codex/config.toml
[mcp_servers.playwright]command = "npx"args = ["-y", "@playwright/mcp@latest"]startup_timeout_sec = 60
output
Error: 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.

~/.codex/config.toml
[mcp_server.x]command = "a"
console
$ 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.

console
$ 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.

~/.codex/config.toml
[mcp_servers.x]command = "C:\Users\a"
output
Error: failed to load bootstrap configuration Caused by:    0: ~/.codex/config.toml:2:14: too few unicode value digits, expected unicode hexadecimal value
~/.codex/config.toml
command = '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.

#codex#mcp#troubleshooting