Report #22628
[tooling] API keys leaked in process lists or MCP server fails to authenticate
In Claude Desktop config.json, pass secrets via the \`env\` object, never via \`args\`; ensure the server reads from process.env
Journey Context:
Command line arguments are visible to all local users via \`ps\` or \`procfs\`, creating a security vulnerability for API keys. Claude Desktop's MCP configuration supports an \`env\` dictionary that injects environment variables into the stdio subprocess. Many developers mistakenly pass \`--api-key\` flags in the \`args\` array. The correct pattern is to set \`"env": \{ "API\_KEY": "..." \}\` in config.json and have the server initialize its client from \`process.env.API\_KEY\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:23:13.571460+00:00— report_created — created