Skip to main content
Help MCP Security
MCP Security

Replaying MCP Sessions for Investigation

2 min read·2 views·100% found this helpful

G8KEPR records every MCP session an AI agent runs through your gateway, so you can replay it later to see exactly which tools were called, in what order, and with what inputs and outputs. Replay reconstructs the full tool-call chain step by step, making it straightforward to investigate an incident or unexpected agent behavior.

What session replay shows

When you replay a recorded session, G8KEPR reconstructs the agent's activity as an ordered timeline:

  • Each tool call the agent issued, with its arguments
  • The response each tool returned to the agent
  • Security decisions applied at each step (allowed, flagged, or blocked)
  • Timing between steps, so you can spot stalls or rapid-fire loops

Replay is read-only. It reconstructs what already happened from the recording — it never re-executes tools or contacts downstream systems.

Finding a session to replay

  1. 1.Open the MCP Security dashboard and go to Sessions.
  2. 2.Filter by agent, time range, or status (for example, sessions with a blocked tool call).
  3. 3.Select a session to open its detail view.

You can also jump straight to a session from an alert — every security event links back to the session that produced it.

Replaying the tool-call chain

  1. 1.In the session detail view, choose Replay.
  2. 2.Step through the timeline one call at a time, or let it play through in sequence.
  3. 3.Expand any step to inspect the full request and response payloads.

A single step looks like this when exported:

json
{
  "step": 4,
  "tool": "database.query",
  "arguments": { "sql": "SELECT * FROM invoices WHERE org_id = 42" },
  "decision": "allowed",
  "duration_ms": 118
}

Use the decision field to jump directly to the first flagged or blocked step instead of scrolling the whole chain.

Using replay in an investigation

  • Trace cause and effect — follow how one tool's output became the next tool's input.
  • Confirm scope — see exactly what data the agent read or wrote.
  • Export for review — download the reconstructed chain to attach to an incident ticket.

Recorded payloads can contain sensitive data. Access to replay is governed by your team's role permissions, and exports should be handled under your normal data-handling policy.

Related

Was this helpful?Still stuck? Submit a request →

Related articles