Incident response for LLM agents and MCP servers
Record which tool ran, whose permissions it used and which systems or data were affected. Use the playbook to organize triage, containment, evidence collection and recovery.
NIST SP 800-61 Rev. 3 places incident response within CSF 2.0 risk management. Use your established response channels during an incident and adapt the templates to your approved plan for tabletop exercises.
Updated
Download response templates
Incident response checklist
| Step | Decision | Evidence to keep |
|---|---|---|
| Detect | Is there a credible deviation from intended authority? | Signal, UTC time, affected principal and run |
| Triage | What is confirmed, what is unknown, who owns the response? | Severity decision, scope and assumptions |
| Contain | Which enforced controls stop the harmful path? | Approver, action, verified effect and rollback |
| Eradicate | Which input, permission, code or dependency enabled it? | Root-cause evidence and corrective changes |
| Recover | Which tests and approvals permit a limited restoration? | Pass/fail evidence, recovery owner and residual risks |
| Improve | Which repeatable check will catch the scenario next time? | Action owner, due date and verification plan |
Download the editable checklist and timeline above. Store completed records in your own access-controlled incident system, not in this website's contact form.
Detection signals to investigate
Compare activity with the intended task and the principal's normal scope. Useful signals include a new high-impact tool invocation, bulk reads followed by an outbound action, access to another tenant, a changed tool definition, repeated authorization denials and unexpected destinations. Context matters: a volume spike alone does not prove compromise.
Keep enough telemetry to connect the principal, agent run, tool call, policy decision and downstream result. Avoid logging raw secrets or unnecessary personal data. References or redacted records can support the investigation while originals remain in a controlled evidence store.
Review MCP audit logging and the MCP threat matrix when deciding which signals and evidence your deployment needs.
Verify containment
Choose controls your team is authorized to use and record their expected effects. Depending on the architecture, the response may pause agent runs, deny affected tools or principals, restrict outbound destinations, disable a backend integration or revoke credentials. Use the narrowest effective scope, and expand it when evidence warrants it.
Credentials
Follow the identity provider's documented revocation and disablement procedures. Rotating a secret, revoking a refresh token or ending a connection does not by itself establish that every previously issued access token or delegated credential is rejected. Verify rejection at the resource boundary. Where appropriate under your plan, use a resource-side deny while revocation propagates.
Agent runs and backend jobs
Pausing an agent prevents future decisions but may leave an already queued or in-flight backend job running. Identify and cancel that work separately where supported. Record which actions were stopped and which had already completed.
Protocol version and application state
The current MCP security guidance describes stateless protocol behavior and application-managed state handles. Older protocol deployments may use server-assigned sessions. Identify the deployed version; do not assume that a generic session command exists or that ending a transport invalidates application authorization.
Preserve evidence before rebuilding
Capture the relevant tool definitions and versions, policy decisions, principal and agent-run references, affected backend requests and containment actions. Record UTC timestamps and clock differences. Preserve originals and work from copies; document who collected each artifact, where it is held and who can access it.
Follow your organization's retention, privacy and investigation requirements. Record the absence of evidence as an unknown rather than filling gaps with inferred actions. The incident timeline template separates observations, expected effects, verified effects and recovery decisions.
Test eradication and recovery
Trace the path that made the action possible: an untrusted tool result, altered metadata, an overly broad backend role, missing tenant authorization or a changed dependency. Correct the underlying authority boundary as well as the triggering input. A prompt change alone does not prove that the server will reject a prohibited action.
- Review other systems reachable by the affected identity, including persistent jobs and delegated credentials.
- In an authorized test environment, verify that permitted operations still succeed and prohibited reads, writes or outbound actions fail.
- Define the restoration criteria and recovery owner before re-enabling capabilities.
- Restore a limited set of functions, confirm telemetry and retain a rollback path.
- Record residual restrictions and assign owners for unresolved risks.
See the security controls checklist and illustrative assessment report for ways to document controls and verification evidence.
Update the response plan and tabletop exercise
Reconstruct the timeline, compare expected and verified effects, and identify where the response depended on an assumption. Give corrective actions an owner, due date and verification step.
Use the downloadable 45-minute tabletop to rehearse an agent reading an untrusted ticket and proposing an external action. Its injects test queued backend work, credential revocation and restoration criteria using fictional data. It is designed for discussion or a synthetic lab, not a production attack.
If you need help preparing logging, decision paths and response procedures, discuss an IR readiness review. Testing depth, access, deliverables and availability are agreed before work begins.
Primary references
- NIST SP 800-61 Rev. 3 — incident response and CSF 2.0 risk management
- MCP specification — current security best practices
- RFC 7009 — OAuth token revocation
Deployment behavior depends on the protocol version, identity provider and backend implementation. Use the documentation for the systems you actually run.
Common questions
Can I download the checklist without giving an email address?
Does revoking a refresh token stop all active access?
Is every MCP deployment controlled through a protocol session?
Can the free Permission Checker confirm that containment works?
Related reading
Rehearse your response plan
Discuss the logs, alert owners and handoffs your team wants to review.