Codex CLI starts MCP servers on demand
If Codex has a browser, documentation, and internal team tools connected, many sessions will use only a few of them. A one-line README edit might only need the shell. In version 0.172.0, released on November 24, some local MCP servers began starting on the first tool call. OpenAI release notes.
How Codex knows about tools before the server starts
When a local server first connects to Codex over stdio, the client receives its list of tools and their schemas. With a cached catalog, Codex can make those tools available in a new session before the server process starts. On the first call, Codex starts the process and connects to it. This release enables that behavior by default for eligible optional servers. Change in the Codex repository.
When startup time shows up
Consider two sessions in the same project. In the first, you ask Codex to explain a recent commit. If Git has everything it needs, an optional browser MCP server with a cached catalog may never start. In the second, you ask Codex to check a page in the browser. Startup time is added to the first browser call, so it is worth measuring time to the first response as well as time to the first tool result.
A new server has no cached catalog, so Codex needs to fetch one first. In this release, a server marked required = true establishes a live connection at startup. That is useful for a batch check that needs an internal MCP on every run. The release describes this change for stdio connections. Startup conditions in the OpenAI pull request.
What to check in your project
Identify the servers you need in every session and those you only use occasionally. Try the optional servers in a new session after their catalogs have been cached. If the session is ready sooner and the first tool call takes longer, the delay has moved from startup to first use.