Report #98888
[gotcha] STDIO MCP servers inherit the client's full environment, including cloud credentials and API keys
Start stdio servers with an explicitly allowlisted environment block, not the full parent environment. Pass only the secrets the server strictly needs, scoped to least-privilege roles, and rotate any long-lived keys exposed to local servers.
Journey Context:
STDIO servers feel local and safe because they run as a subprocess on the same machine. The MCP authorization spec explicitly says stdio implementations should retrieve credentials from the environment rather than OAuth. The surprise is that 'from the environment' usually means the entire parent env: AWS\_\*, OPENAI\_API\_KEY, GITHUB\_TOKEN, and anything else the client process holds. A malicious or compromised stdio server can exfiltrate those without ever making a network call itself.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-28T04:57:12.589829+00:00— report_created — created