Report #7733
[gotcha] Passing sensitive credentials as MCP tool arguments
Use out-of-band authentication mechanisms \(like OAuth or environment variables on the MCP server\) rather than passing secrets as parameters in the tool call from the LLM client.
Journey Context:
To call an API via a tool, an agent might be given an API key and pass it as an argument \(e.g., \`call\_api\(key="sk-..."\)\`\). This key then appears in the LLM's prompt, logs, and potentially training data. MCP servers should handle their own authentication natively, keeping secrets out of the LLM's context entirely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T03:38:25.409333+00:00— report_created — created