Local integrations have to respond before Codex can discover their tools. When a local Model Context Protocol (MCP) server needs more time to initialize, a longer startup timeout can clear its warning and make its tools available in Codex.
Some stdio servers load an index or start a dependency before answering the initialization request. A launcher that fails because its executable is missing or its process exits immediately needs a correction to the command, arguments, or server itself.
The Codex prompt can appear while an optional MCP server is still starting. The timeout warning names the affected server once its startup deadline passes.
Steps to fix an MCP server startup timeout in Codex:
- Open the warning viewer with F2 if the footer shows f2 to view and the timeout message is hidden.
- Move through the warning panes with Right Arrow if the viewer opens on a different warning.
- Note the server name and the number of seconds in its MCP startup timeout warning.
- Press Escape to return to the composer if the warning viewer is open.
- Exit the current Codex session with /exit.
- Open the config.toml that defines the affected server in your text editor.
The usual user file is ~/.codex/config.toml or $CODEX_HOME/config.toml when CODEX_HOME is set. A server defined by a trusted project can use that project's .codex/config.toml.
Related: How to get Codex MCP server details - Set a longer startup_timeout_sec in the affected server's existing [mcp_servers.<name>] table.
- config.toml
startup_timeout_sec = 60
The value must exceed the current effective limit. Codex drops any fractional part from the seconds in the warning, so a whole-second value strictly above the reported number increases the limit. For a 30-second warning, 60 seconds gives the server more time to respond. If the key already exists, replace its value. Otherwise, place the line alongside the server's command entry in the same table. tool_timeout_sec controls how long an individual call can run after the server connects.
- Save config.toml.
- Start a fresh Codex session from the same project directory.
codex
- Check the affected server's connection in the new session with /mcp.
A starting status means initialization is still in progress. If it appears, wait a little longer before running /mcp again. The server should show connected with its tool count. If it fails at the longer limit, its startup logs can help distinguish slow initialization from a process that never answers.
- Check the tool names under the connected server with /mcp verbose.
The expected tools should appear on the Tools line under that server's name.
- Open the fresh session's warning viewer with F2 if the footer still shows f2 to view.
- Move through the remaining warning panes with Right Arrow if the viewer shows more than one.
- Confirm that the original startup timeout warning is gone for the affected server.
Unrelated startup warnings can still appear. Escape closes the viewer if it is open.