Report #87599
[gotcha] MCP tools accessing environment variables containing other servers' API keys and credentials
Run each MCP server in its own isolated process or container with only the environment variables it specifically needs. Never share API keys or tokens via shared environment variables across servers. Use dedicated secrets management instead of environment variables. Audit tool schemas for parameters that accept environment variable names, file paths to credential files, or shell commands.
Journey Context:
MCP servers typically receive credentials \(API keys, database passwords, cloud tokens\) via environment variables. In common deployment patterns, multiple MCP servers run in the same process or share the same execution environment. If a tool on one server can execute commands or read the process environment, it can access credentials intended for other servers or the host application. The shared-environment deployment model creates a credential boundary violation that's invisible until exploited. Developers assume process isolation where none exists, and environment variables — the standard way to pass secrets — become a single point of credential exposure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T05:37:23.173539+00:00— report_created — created