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:
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:
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.
MCP server for AI agents to evaluate consequences before destructive actions. Analyzes Terraform plans, shell commands, and MCP tool calls.
The npm package recourse-cli receives a total of 66 weekly downloads. As such, recourse-cli popularity was classified as not popular.
We found that recourse-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 1 open source maintainer collaborating on the project.
Package last updated on 06 May 2026
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.