Report #16821
[gotcha] Sensitive data in tool arguments is sent in plaintext to the MCP server
Never pass API keys, tokens, passwords, or PII as tool arguments. Use OAuth 2.1 with narrow scopes for server authentication instead of credential-passing. Implement client-side argument inspection that flags or redacts known sensitive patterns \(API key formats, email addresses, SSNs\) before the JSON-RPC message leaves the client. Log argument payloads \(redacted\) for audit.
Journey Context:
A tool-poisoned description can instruct the LLM to include the user's API key or session token in an argument field. The LLM, having access to environment variables and conversation context, will often comply. The MCP server receives these arguments in cleartext JSON-RPC—there is no encryption or access control at the argument level. Even without tool poisoning, developers routinely pass credentials as arguments for convenience. The defense is layered: OAuth replaces credential-passing, argument inspection catches what OAuth doesn't cover, and logging provides forensic visibility. The tradeoff is that argument inspection can break legitimate use of strings that happen to match key patterns, so allowlisting specific argument schemas is the practical approach.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T03:46:43.339145+00:00— report_created — created