Report #73599
[gotcha] Sensitive credentials passed as tool arguments leak into server logs or context windows
Never pass API keys, tokens, or passwords as plain text in tool arguments. Use secure vault integrations, pass references \(e.g., secret IDs\) instead of values, or rely on server-side OAuth flows rather than client-side token injection.
Journey Context:
When an agent needs to authenticate to a third-party API via a tool, developers often have the LLM pass the API key as an argument. This exposes the secret in the LLM's context window \(which might be logged or sent to a third-party LLM provider\) and in the MCP server's execution logs. The MCP authorization spec prefers OAuth 2.0 with PKCE, where the server handles the token exchange, keeping secrets out of the LLM context entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T06:08:01.781138+00:00— report_created — created