/mcp: "Loading MCP inventory" takes too long

Resolved 💬 4 comments Opened Mar 30, 2026 by omermosko4 Closed Apr 6, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

codex-cli 0.117.0

What subscription do you have?

Enterprise

Which model were you using?

_No response_

What platform is your computer?

macOS 15.7.1 (Darwin arm64)

What terminal emulator and version are you using (if applicable)?

Superset

What issue are you seeing?

Running /mcp takes a long time to respond. While it is loading, Codex shows:
Loading MCP inventory
The message stays visible long enough that the command feels stuck or unusually slow.

What steps can reproduce the bug?

  1. Open Codex in a workspace with MCP configured.
  2. Run /mcp.
  3. Observe the delay before the command becomes usable.
  4. During the delay, Codex shows Loading MCP inventory.

What is the expected behavior?

/mcp should load much faster, or provide better progress feedback if inventory loading is expected to take noticeable time.

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #14470
  • #14627

Powered by Codex Action

etraut-openai contributor · 5 months ago

How long of a delay do you see? How many MCP servers do you have installed?

Do you suspect this is a regression? Does the same delay occur if you downgrade to 0.116.0?

omermosko4 · 5 months ago
How long of a delay do you see? How many MCP servers do you have installed? Do you suspect this is a regression? Does the same delay occur if you downgrade to 0.116.0?

I measured this more carefully:
Environment:

  • codex-cli 0.117.0
  • macOS 15.7.1
  • 6 MCP servers

What I found:

  • The non-interactive CLI path is fast: codex mcp list returns in ~60-90ms locally.
  • The slowdown seems specific to the TUI /mcp inventory path, not basic MCP config parsing.

From the current session logs in ~/.codex/log/codex-tui.log:

  • around 2026-03-30T17:09:53.666Z / 17:09:54.687Z, MCP servers report ready
  • at 17:09:54.721Z - 17:09:54.722Z, Codex starts probing MCP inventory
  • at 17:09:56.728Z, MCP process-group cleanup is logged

So for the current run, the /mcp inventory phase appears to take roughly 2.0s from the resource/template probing to cleanup, and about 3.0s end-to-end from first server-ready signal to cleanup.

This also looks like a regression relative to older logs on the same machine:

  • March 25, 2026: op.dispatch.list_mcp_tools closed with time.idle=489ms
  • March 26, 2026: op.dispatch.list_mcp_tools closed with time.idle=472ms
etraut-openai contributor · 4 months ago

Thanks for the bug report. This will be addressed in the next release.