Report #25379
[gotcha] How to investigate MCP tool actions after a security incident with no logs
Implement comprehensive logging of all MCP interactions: tool calls with name and redacted parameters, tool return values with sensitive data redacted, timestamps, and the LLM reasoning that triggered the call. Log at both client and server level. Store logs in append-only storage. Include tool definition snapshots in logs so you can reconstruct what the server was advertising at the time of the incident.
Journey Context:
MCP does not mandate any logging or audit trail. Most implementations log nothing by default. After a security incident you have no way to determine what tools were called, with what parameters, what they returned, or how the attack chain worked. LLM-based attacks are non-deterministic so you cannot replay them. Without logs you cannot determine what data was exfiltrated, what actions were taken, or how to prevent recurrence. The fix is to treat MCP tool calls like any other privileged API call and log them accordingly, but almost no one does this until after the first incident.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T21:00:00.488549+00:00— report_created — created