Consequence evaluation for AI agents. Check recoverability before destructive actions.
io.github.recourseOS/recourse MCP Server
This MCP server provides a “consequence” evaluation layer for AI agents. It focuses on checking recoverability before destructive actions, aiming to support safer decision-making in agent workflows.
🛠️ Key Features
Consequence evaluation for AI agents
Recoverability checks prior to destructive actions
🚀 Use Cases
AI-agent guardrails that validate whether outcomes can be recovered
Pre-checks before performing destructive operations in automated systems
⚡ Developer Benefits
Clear integration point for recoverability assessment in agent action logic
Aligns with operational practices across AI safety, SRE, and infrastructure automation topics
⚠️ Limitations
Scope described as consequence evaluation and recoverability checks; no additional tools or capabilities are specified in the available data
Recourse is an MCP server that evaluates Terraform plans, shell commands, and tool calls before execution. It returns structured facts — recoverability tier, evidence assessment, and risk level — so callers can make context-aware decisions. Agents call Recourse before they act; humans see what the agent checked.
Add to Your Agent
One config block. Works with Claude Desktop, Claude Code, Cursor, and any MCP-compatible client.
Safety protocol — when to call, how to interpret results
Each tool returns:
riskAssessment: engine's summary read — allow, warn, escalate, or block
recoverability: tier and reasoning for each mutation
evidence: what was found, what's missing, what's needed for confident classification
crossActionRisks: dangerous patterns where individual actions are safe but their combination is unrecoverable (e.g., deleting a backup + the database it backs up)
The engine emits facts. Callers interpret them in context — a block assessment in staging might be acceptable; in production it might require approval.
The agent can interpret these facts: "Recourse assessed this as block-level risk — deletes the database with no backup. Should I proceed?"
That's different from "I deleted your production database."
Agent Instructions
Agents can read the built-in safety protocol from recourse://instructions. Or use this prompt:
code
Before executing destructive operations, call RecourseOS:
- Shell commands → recourse_evaluate_shell
- Terraform plans → recourse_evaluate_terraform
- Other MCP tools → recourse_evaluate_mcp_call
Interpret the riskAssessment:
- allow: proceed
- warn: proceed with caution, inform user
- escalate: stop and ask user for approval
- block: do not proceed without human review
If escalate/block includes verificationSuggestions, run those commands
and call recourse_evaluate_with_evidence to potentially upgrade the assessment.
BLAST RADIUS REPORT
===================
DIRECT CHANGES
X DELETE aws_db_instance.main
Recoverability: unrecoverable
skip_final_snapshot=true, no backup retention; data will be lost
X DELETE google_storage_bucket.audit
Recoverability: recoverable-from-backup
GCS bucket versioning is enabled; object generations may be recoverable
~ DELETE azurerm_role_assignment.reader
Recoverability: reversible
Azure role assignment/definition is config-only and can be reapplied
SUMMARY
Unrecoverable: 1 resource
Recoverable (backup): 1 resource
Reversible: 1 resource
Recoverability Tiers
Tier
Label
Meaning
1
reversible
Can be undone with another apply or API call.
2
recoverable-with-effort
Can be recreated, but requires coordinated work.
3
recoverable-from-backup
Requires a backup, snapshot, version, or retention window.
4
unrecoverable
Data, identity, key material, or recovery points may be permanently lost.
5
needs-review
Evidence is insufficient to classify safely.
Multi-Cloud Coverage
Known resources use hand-written deterministic rules and remain authoritative.
npm install
npm run build
npm test
npm run test:all
Regenerate docs after changing resource handlers:
bash
npm run docs:all
Limitations
Recourse analyzes the plan, state, command, and evidence you provide. It cannot:
Prove that out-of-band backups exist unless evidence is supplied.
Inspect every object, row, secret, or dependency behind a resource.
Guarantee cross-account or cross-region recovery.
Predict races between planning and applying.
Replace human review for opaque destructive resources.
The safety posture is conservative: when evidence is incomplete, Recourse returns higher-risk assessments (escalate or block) rather than understating risk.