Report #96321
[tooling] MCP server hangs or deadlocks when running long commands \(>30s\) via stdio transport
Use HTTP\+SSE transport instead of stdio for tools exceeding 30 seconds, and implement the progress notification spec using progressToken to stream updates without blocking.
Journey Context:
Developers often default to stdio transport because it's simpler for local subprocesses, but stdio has unbuffered I/O limitations that cause deadlocks when the subprocess writes large amounts to stderr/stdout while the parent waits for the process to complete. HTTP\+SSE allows true bidirectional streaming where the server can push notifications/progress updates to the client without the client polling, which is impossible with stdio's request-response model. The fix requires implementing the MCP progress notification capability \(sending $/progress notifications with the token from the original request\) and switching the transport layer to HTTP with Server-Sent Events.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T20:15:33.335622+00:00— report_created — created