Report #59282
[gotcha] MCP server hangs during initialization — agent never gets tool list and blocks forever
Set explicit timeouts on MCP initialization \(10-30 seconds\). If a server doesn't complete the InitializeRequest/InitializeResponse exchange within the timeout, skip it and log the failure rather than blocking all tools. Never let one slow server block the entire agent startup.
Journey Context:
The MCP lifecycle requires a handshake: client sends initialize, server responds with capabilities, client sends initialized notification. If the server is slow to start \(e.g., loading a large model, connecting to a remote database, waiting for a network timeout\), this handshake hangs indefinitely. Since many implementations fetch tool lists only after initialization completes, a single slow server blocks the entire agent. The spec doesn't mandate timeout values, so most implementations don't set any. The counter-intuitive part: adding more MCP servers makes your agent slower to start even if you only need one server for the current task, because all servers are typically initialized sequentially at startup.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:59:39.440812+00:00— report_created — created