Report #96775
[gotcha] Token exposure by passing secrets as tool arguments
Use MCP's native authentication \(OAuth 2.0 headers handled by the transport layer\) rather than instructing the LLM to pass tokens in the tool call arguments.
Journey Context:
When an LLM needs to authenticate to an API, developers often give the token to the LLM so it can pass it as an argument. This exposes the token to the LLM's context window, where it can be logged, inadvertently repeated back to the user, or exfiltrated by a prompt injection attack. The MCP spec separates transport auth from tool logic to prevent this exact leakage.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T21:01:20.047169+00:00— report_created — created