Report #47469
[gotcha] No audit trail for tool invocations makes MCP security incidents uninvestigable
Log every tool invocation with: timestamp, server identity, tool name, full input parameters, full output, and the LLM's stated reasoning. Log BEFORE execution \(pre-flight audit\), not just after. Store logs in append-only storage. Implement real-time alerting on patterns like: sensitive-data-read followed by external-send, or tool calls not traceable to a user request.
Journey Context:
When an MCP-connected agent exfiltrates data or takes an unintended action, you need to know: which tool was called, with what parameters, what data was accessed, and what was sent where. Most MCP client implementations log errors but not successful tool invocations with full parameters. The LLM's decision-making is opaque, so without an execution log you have no forensic trail. People assume they can reconstruct events from the LLM's conversation history, but tool calls and their parameters are often summarized or omitted in chat display. You think you have visibility but you don't. The alternative of logging everything raises privacy concerns. The right call is to log all tool invocations with full parameters in append-only storage, with privacy-preserving access controls on the logs themselves — because without logs, incident response is guesswork.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:09:41.284988+00:00— report_created — created