MCP client times out when launching Docker MCP Toolkit gateway (full catalog, Windows)
Summary
Codex CLI (0.47.0) fails to attach to Docker’s MCP Toolkit when the gateway
is launched with the full Docker catalog. Codex spawns docker mcp gateway run
via stdio, but the MCP handshake never completes: the CLI waits for a JSON-
RPC response that never arrives and exits after ~1 s with “MCP client for
MCP_DOCKER failed to start: request timed out”. The gateway itself finishes
initialisation (~1.7 s) and prints “Start stdio server”, so the process is
healthy—the timeout happens on Codex’s side.
Environment
- Codex CLI: codex --version → 0.47.0 (on Windows 11, PowerShell)
- Docker Desktop: (include your version if you have it handy)
- Docker MCP Toolkit CLI (bundled with Docker Desktop)
- Codex config entry:
[mcp_servers.MCP_DOCKER]
command = "docker"
args = ["mcp", "gateway", "run"]
Steps to reproduce
- Ensure Docker Desktop’s MCP catalog is fresh (default registry.yaml with
all servers enabled).
- Open one PowerShell terminal and run:
tools.
Actual behaviour
Codex tears the connection down after roughly one second:
■ MCP client for MCP_DOCKER failed to start: request timed out
Relevant log excerpt from C:\Users\<user>\.codex\log\codex-tui.log:
2025-10-21T09:53:10.916906Z INFO aggregated 0 tools from 0 servers
2025-10-21T09:53:10.916945Z ERROR MCP client for MCP_DOCKER failed to
start: request timed out
Meanwhile the gateway that Codex launched reports:
- Watching for configuration updates...
> Initialized in 1.7119549s
> Start stdio server
Additional notes
- If I manually run docker mcp gateway run beforehand, it reaches “Start
stdio server” in ~1.7 s (with images cached). Codex still times out when it
launches another instance itself.
- Trying the HTTP/SSE transport (codex mcp add --url http://127.0.0.1:5000)
fails earlier with 405 Method Not Allowed because the Docker gateway only
allows GET on /sse; the Codex client POSTs the handshake payload. So the
stdio path is the only available option.
- Reducing the enabled servers (e.g. only time, memory, SQLite) makes the
handshake succeed—suggesting Codex’s timeout is simply too aggressive for
the full catalog initialisation.
Please let me know if you need the entire log file or a recording; happy to
provide any extra diagnostics.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗