Report #57205
[gotcha] MCP server returns API keys or sensitive data in tool results
Mask or redact secrets in tool responses before returning them to the LLM. Use OAuth flows instead of static tokens where possible.
Journey Context:
Developers might return raw HTTP responses or environment variables to the LLM to 'debug' or pass context, forgetting that the LLM's context is often logged, summarized into future prompts, or exposed to the user. Once a secret enters the context window, it is extremely hard to control its propagation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:30:32.052300+00:00— report_created — created