- Symptom
- Tools from an MCP server are missing on the first prompt but appear laterAn MCP server launched through npx or docker times out on first start
- Cause
- When building the initial tool catalog, Codex waits only mcp_optional_startup_grace_ms, 1000 ms by default, for optional servers, and each server gets startup_timeout_sec, 10 seconds by default.
- Fix
- Raise startup_timeout_sec for slow servers, mark servers the task depends on as required, or set the grace to 0 to wait for each server's own timeout.
- Apply
# ~/.codex/config.toml mcp_optional_startup_grace_ms = 0 [mcp_servers.docs] command = "npx" args = ["-y", "docs-mcp"] startup_timeout_sec = 30 required = true- Affected
- Codex CLI, IDE extension, and ChatGPT desktop app, as of 2026-10
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders