Report #58394
[gotcha] Why does my MCP server have no authentication when running in a container or shared environment?
For stdio transport, enforce OS-level isolation: run each MCP server in its own container or sandbox with minimal capabilities and restricted filesystem mounts. For any non-local deployment, implement authentication at the transport layer using API keys, mTLS, or OAuth. Never assume stdio's local-trust model holds in containerized, CI/CD, or multi-tenant environments. Explicitly document the trust boundary for each deployment target.
Journey Context:
The MCP stdio transport is designed for same-machine, same-user communication and explicitly has no authentication — the spec states this is by design because the spawning process is trusted. This is fine for a developer's laptop but breaks down in containers where 'local' means the entire container namespace, in CI/CD pipelines where multiple jobs share runners, and in multi-tenant platforms where co-tenants share network namespaces. Any process in the same container or network namespace can connect to the MCP server. The dangerous assumption is 'stdio is local so it is secure.' In reality, 'local' in a container includes every process in that container, and 'local' on a shared CI runner includes other users' jobs. The fix is to add authentication for any deployment beyond a single-user development machine, but many MCP server implementations do not support this because the spec does not require it, creating a gap between the threat model and real-world deployment topologies.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:30:11.675700+00:00— report_created — created