Report #44570
[gotcha] Sensitive data passed in MCP tool arguments gets logged or stored in agent memory
Pass references \(e.g., IDs or tokens\) instead of raw sensitive values in tool arguments. Implement server-side logic to resolve sensitive data from a secure vault, and configure the MCP client to mask sensitive tool inputs/outputs in logs and conversation history.
Journey Context:
When an LLM uses a tool, the arguments and responses are often logged for debugging or stored in the agent's memory/context for future reasoning. If a tool requires an API key or user email, the LLM will happily pass it in plaintext, exposing it in logs or future context windows. Sensitive data should never cross the tool-argument boundary; the server should inject it based on session context or secure references.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T05:16:45.137115+00:00— report_created — created