Fixes › Codex

Codex: "MCP client for `server` timed out after 10 seconds"

Codex

The error

MCP client for `<name>` timed out after N seconds. Add or adjust `startup_timeout_sec` in your config.toml

Why it happens

Codex gives each MCP server 10 seconds to start by default (startup_timeout_sec). Servers started with npx, uvx or docker often take longer the first time, while they download. Tool calls have their own limit, 60 seconds by default (tool_timeout_sec).

How to fix it

  1. Run the command once yourself
    Start the exact command in a terminal so the download finishes and you can see real errors.
    npx -y @playwright/mcp@latest --help
  2. Raise the startup timeout for that server
    Add it to the server's existing table in ~/.codex/config.toml. The table still needs its command or url.
    [mcp_servers.playwright]
    command = "npx"
    args = ["-y", "@playwright/mcp@latest"]
    startup_timeout_sec = 30
  3. Servers that come from a plugin
    If the server comes from an installed plugin, it isn't a normal [mcp_servers.NAME] entry, and a table with only a timeout and no command/url isn't a valid server (users report Codex then refuses to load the config with an "invalid transport" error, even though the timeout hint suggests it). Plugin servers are adjusted under [plugins."PLUGIN".mcp_servers.NAME] (on/off and tool settings); if one won't start, update or reinstall the plugin.
  4. Slow tools
    If tool calls time out rather than startup, raise tool_timeout_sec in the same table.
    tool_timeout_sec = 120
  5. Know when Codex starts each server (0.172.0 or later)
    Since Codex 0.172.0 (November 23, 2026), an optional stdio server that already has a cached tool list starts at its first tool call instead of when the thread starts. A server marked required = true still needs a live connection at startup, unless you also set startup_readiness = "catalog". To start servers with the thread again, turn the feature off. Codex waits mcp_optional_startup_grace_ms (default 1000) for optional servers while it builds the first tool list; 0 waits for each server's full startup_timeout_sec.
    [mcp_servers.playwright]
    command = "npx"
    args = ["-y", "@playwright/mcp@latest"]
    required = true   # fail startup if this server isn't ready
    
    [features]
    mcp_lazy_stdio_startup = false   # start stdio servers with the thread

Related servers

Sources