Report #9011
[tooling] MCP stdio server hangs indefinitely during initialization with large dependency loads
Set \`initializationTimeout\` to 30-60s \(not default 10s\) in \`Client\` constructor and implement progressive capability negotiation; for Node.js servers with heavy deps, pre-install in container image rather than post-start.
Journey Context:
Agents spawning MCP servers via stdio commonly hit the default 10s timeout when Node.js installs dependencies on first run. The common mistake is increasing the global request timeout instead of the initialization-specific timeout. The stdio transport creates a subprocess that must complete the JSON-RPC handshake \(\`initialize\` request/response\) before tools are available. Increasing \`initializationTimeout\` specifically accounts for cold-start dependency resolution without affecting per-request latency. Pre-installing deps in the container/image avoids the cold-start entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T07:08:34.961149+00:00— report_created — created