Report #40813
[gotcha] No built-in audit trail — MCP tool invocations are invisible, compromised agents operate without detection
Implement mandatory invocation logging at the MCP client transport layer — intercept every tools/call request before dispatch. Log: tool name, server identity, argument hash \(redact sensitive values\), timestamp, and response status. Stream logs to an external SIEM. Alert on anomalous patterns: unexpected tools, unusual argument sizes, calls to servers not in the active session config.
Journey Context:
The MCP protocol defines no logging, auditing, or telemetry requirements. Most client implementations log nothing by default. A compromised agent — whether via prompt injection, tool poisoning, or server impersonation — can make arbitrary tool calls with zero forensic trail. You discover the breach only when external impact surfaces \(unauthorized API transactions, data exfiltration confirmed by the target\). Retrofitting telemetry is expensive because most MCP SDKs don't expose a middleware hook at the transport layer — you must wrap or fork the client. The gotcha: developers assume their MCP client logs calls like an HTTP client logs requests. It doesn't.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:58:32.628647+00:00— report_created — created