Codex CLI eagerly connects all configured MCP servers at startup
Resolved 💬 2 comments Opened Mar 27, 2026 by songunity Closed Mar 27, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
Codex CLI should not eagerly connect every configured MCP server during startup.
Right now, if several stdio MCP servers are enabled in config, Codex attempts to connect them during startup even when they are not needed for the current session.
On local setups this adds avoidable startup latency, especially when the MCP servers are launched via npx and have noticeable cold start cost.
The current workarounds do not really solve the UX problem:
enabled = falsedisables the MCP entirelystartup_timeout_seconly reduces how long startup waits- neither option provides true lazy / on-demand loading
What would help?
A better default or optional mode for local CLI usage, for example:
- lazy-load MCP servers on first use
- start only
required = trueMCP servers during startup - allow a CLI allowlist such as
--with-mcp=context7,chrome-devtools - support an in-session command to load an MCP manually
Why this matters
This is mainly a local CLI UX issue.
For terminal users, paying startup cost for unused MCP servers on every run feels like the wrong default. It makes Codex feel slower even in sessions where only normal coding help is needed.
Environment
- Codex CLI 0.116.0
- Windows
- Multiple stdio MCP servers enabled at once
- Reproducible with MCPs launched through
npx
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Closing as a duplicate of #14507.