Report #7101
[gotcha] Compromised agent silently exfiltrating data with no audit trail because MCP tool calls are unlogged
Log every MCP tool call with timestamp, server identity, tool name, full arguments, and full return value to an append-only audit store. Implement real-time alerting on anomalous patterns \(unexpected servers, high-volume calls, credential-like strings in arguments\). Make audit logs immutable and separate from the agent's own log channel so a compromised agent cannot tamper with them.
Journey Context:
Most MCP client implementations log agent reasoning and chat but not the full tool-call request/response payload. When an agent is compromised via prompt injection, the attack manifests as specific tool calls with specific arguments—exactly the data that's missing from logs. You discover the breach weeks later and have no forensic record of what was accessed or exfiltrated. The counter-intuitive part: developers add logging for debugging \(agent reasoning\) but skip it for tool calls because 'the tool just works' and logging full arguments feels like noise. In reality, the tool-call log is the single most important security artifact, and it's the one nobody has. Without it, incident response is blind.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T01:47:39.612932+00:00— report_created — created