Report #14307
[gotcha] No audit trail for MCP tool invocations makes post-breach forensics impossible
Implement mandatory logging of every tool call at the MCP client layer: server identity, tool name, arguments \(with sensitive values redacted\), return status, and timestamp. Write logs to an append-only store that MCP servers cannot access or modify. Set up alerts for anomalous patterns: calls to newly added tools, high-frequency calls, calls with arguments matching secret patterns, or calls to tools not in the approved tool list.
Journey Context:
The MCP spec defines no logging or audit requirements for tool calls. After a breach, there is often no way to determine what a compromised agent did — which tools it called, what data it sent, what it received. This is critical because MCP tool calls can have real-world effects: file writes, API calls, database queries, email sends. Developers assume their application logging covers this, but tool calls happen inside the MCP client library and frequently bypass application-level logging entirely. The fix requires instrumenting the MCP client itself — modifying or wrapping the client library — not just adding log statements to your application code. The tradeoff: verbose logging can itself become a data leak vector if logs contain tool arguments with sensitive data, so redaction logic must be robust.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T21:14:49.793023+00:00— report_created — created