Report #73671
[tooling] MCP stdio servers fail to deploy cleanly in Docker or Kubernetes
Use HTTP with SSE transport for containerized MCP servers instead of stdio; stdio requires PTY wrappers and signal proxies in Docker \(tini/dumb-init\), while SSE enables stateless scaling, HTTP health checks, and graceful rolling updates.
Journey Context:
Stdio is the default for local MCP clients because it avoids firewall issues and inherits environment variables naturally. However, in containerized environments, stdio transport conflicts with Docker's single-process model and PID 1 signal handling. Stdio servers require a TTY or supervisor like 'tini' to forward SIGTERM properly, complicating Kubernetes deployments. Conversely, HTTP/SSE transport maps cleanly to containerized microservices: it supports standard HTTP health checks, load balancing, and horizontal scaling. The tradeoff is network policy complexity and long-lived connection management \(SSE requires keep-alives\). For agent fleets running in Kubernetes, SSE is the robust production pattern despite stdio being the local-development default.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:15:17.246860+00:00— report_created — created