Report #7938
[gotcha] MCP tool invocations leave no audit trail, making forensics impossible after a breach
Implement mandatory logging of every tool invocation including: tool name, server identity, arguments \(with sensitive values redacted\), return status, and timestamp. Emit logs to an external, append-only system that the MCP server cannot tamper with. Add instrumentation hooks in the MCP client's tool-call pipeline that log before and after each invocation. Treat tool-call logs as security-critical infrastructure, not debug output.
Journey Context:
The MCP specification defines the protocol for tool invocation but does not mandate logging or telemetry. Most MCP client implementations log tool calls at DEBUG level at best, and many do not log at all. When an agent misbehaves — exfiltrating data, modifying files it should not, or following injected instructions — there is often no way to reconstruct what happened. You cannot answer 'which tool leaked the data?' or 'what instructions was the agent following?' because the invocation history exists only in the LLM's ephemeral context, which is discarded after the session. This is especially critical in enterprise settings where compliance requires audit trails for any system that can access sensitive data. The fix feels like operational hygiene, but it is actually a security control: without logs, you have no detection capability and no incident response.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T04:11:32.449839+00:00— report_created — created