Codex CLI Starts Optional MCP Servers Lazily by Default
Optional stdio MCP servers with cached tool lists now start on their first tool call by default in Codex CLI 0.172.0. Sessions should start faster for users with many MCP servers.
Key Takeaways
- Optional stdio MCP servers now start on first tool call.
- It is the default, with no config change needed.
- Only servers with cached tool lists qualify.
- Sessions with many MCP servers should launch faster.
- Unused servers never spawn, saving resources.
- Shipped in Codex CLI 0.172.0.
MCP servers start when needed
In Codex CLI 0.172.0, optional stdio MCP servers whose tool lists are cached now start on the first tool call rather than at session launch. This is the default behavior.
Impact
Users who configure several MCP servers previously paid the startup cost of all of them every session, even if most were never used. With lazy startup, Codex can present the cached tool list immediately and launch a server only when the agent actually calls one of its tools.
Scope
The behavior applies to optional servers with cached tool lists. Servers that are required, or that have no cache yet, continue to start as before.