Report #84889
[gotcha] Secrets leaked in MCP tool invocation arguments
Pass secrets via HTTP headers, environment variables, or MCP authentication mechanisms to the tool server, never as LLM-generated tool arguments.
Journey Context:
When an agent needs to call an API, it's tempting to pass the API key as a tool argument. However, LLM arguments are logged, appear in UIs, and are sent back to the LLM context, exposing the secret to the MCP server operator and persisting it in chat history. Secrets must flow out-of-band from the LLM's text generation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:04:15.221360+00:00— report_created — created