Report #66287
[gotcha] Exposing secrets in MCP tool call arguments
Never pass API keys, tokens, or passwords as tool arguments. Use the MCP authentication flow \(OAuth 2.0\) or pass secrets via secure headers/metadata that are stripped before the prompt is sent to the LLM. If using tool arguments, mask them in the LLM context.
Journey Context:
Agents log their reasoning and tool calls, which often end up in LLM context windows or debug logs. Passing a GitHub PAT as a tool argument means it gets injected into the prompt, logged to disk, and potentially used in subsequent reasoning, vastly expanding the blast radius of a prompt leak.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T17:44:27.892740+00:00— report_created — created