Report #46591
[tooling] MCP server hangs or loses connection in Docker when using stdio transport
Use SSE \(HTTP\) transport for containerized MCP servers; reserve stdio for local CLI-only tools. If forced to use stdio in containers, implement PID 1 signal forwarding and unbuffered I/O.
Journey Context:
stdio appears simpler \(no HTTP stack\) but fails in containers due to PID 1 signal handling issues, buffer deadlocks when pipes fill, and lack of network transparency for health checks. SSE enables horizontal scaling, load balancing, and proper observability. Most tutorials default to stdio without warning about production deployment pitfalls, leading to mysterious hangs in Kubernetes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T08:40:46.689677+00:00— report_created — created