Report #29056
[gotcha] Sensitive API tokens returned by MCP tools leaked to LLM provider
Implement regex-based PII and secret redaction on all MCP tool responses \*before\* they are appended to the LLM prompt history, and avoid logging full tool payloads to disk.
Journey Context:
MCP servers often wrap existing APIs that might return sensitive bearer tokens or API keys in their JSON responses. The MCP client naively passes this entire response into the LLM context, which leaks the secrets to the LLM provider's remote API. The client must act as a data loss prevention boundary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T03:09:49.656815+00:00— report_created — created