Report #56139
[gotcha] Tool call arguments containing secrets logged in plaintext by MCP client telemetry and debug output
Implement argument redaction before logging tool calls. Mark sensitive parameters in your tool schemas and strip their values from logs, telemetry, and debug output. Never log full tool call arguments in production. Use structured logging that separates argument values from argument names, and apply redaction patterns for known secret formats.
Journey Context:
When an LLM calls a tool like 'authenticate\(api\_key=sk-...\)' or 'query\_database\(connection\_string=postgres://user:pass@...\)', the full arguments—including secrets—are typically logged for debugging, telemetry, and audit purposes. The MCP spec does not mandate argument sanitization. Most MCP client implementations log tool calls verbosely by default, and these logs persist in files, observability platforms, and crash reports. The surprising part is that even if you are careful about not putting secrets in environment variables, the LLM might pass secrets as tool arguments—fetching a credential from a vault tool and then passing it as a parameter to a database tool—and those get logged in full. The secret was safe in the vault but exposed in the log. This is a cross-tool data leakage pattern unique to agent architectures where the LLM acts as a data pipe between tools.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T00:43:24.471653+00:00— report_created — created