viberevert
This server exposes VibeRevert's project safety and session tooling: run risk checks, inspect reports, and manage checkpoints/sessions.
check_repo: Run safety checks against the working tree or staged diff and persist the resulting ReportFile, optionally scoped by task, since a session, or threshold.
explain_diff: Render a CommonMark explanation of an existing check report alongside its metadata.
classify_risk: Get per-severity counts (critical, high, medium, low) for a check report.
list_risky_files: Get a per-file risky-files list sorted by max severity, finding count, and path (capped at 500 entries).
get_policy: Return the project's resolved policy from
.viberevert.yml, including risk thresholds, check toggles, frameworks, and rollback exclude patterns.start_session: Start a new VibeRevert session by creating an inner checkpoint, capturing pre-session git status, and acquiring the session lock.
create_checkpoint: Create a standalone checkpoint of the current working tree state.
generate_fix_prompt: Generate and persist a fix prompt from a check report, with truncation handling on the wire while keeping the full text on disk.
VibeRevert is the project-integrity layer for AI coding. It records the real working state before an agent starts, flags risky changes with deterministic rules, and lets you remove the agent work you don't want without giving up the rest.
An agent changed 80 files. 75 are useful. Remove the 5 you don't.
No AI judges the AI: risk findings are reproducible, explainable, and based on rules you can inspect.
The working state you already had is part of the project. Staged work, unstaged edits and pre-existing untracked files are recorded before the session starts and preserved through recovery. You don't have to package your work into commits before letting an agent help with it.
Keep using your coding agent. VibeRevert works alongside Claude Code, Cursor, and other coding-agent workflows. Git worktrees give an agent an isolated checkout; VibeRevert protects and selectively recovers the working state an agent actually changes. They solve different problems and can be used together.
AI broke your project? Undo the session, not your week. Whole-session rollback is still one command.
See it work
The actual CLI, condensed from a real beta payment run — check flags it, and rollback previews what it will change before you --apply:
$ viberevert check
risk: CRITICAL · payments
app/api/checkout/route.ts payments (critical)
app/api/webhooks/stripe/route.ts payments (critical)
$ viberevert rollback <session> # preview — nothing changed yet
package.json tracked_restored
app/page.tsx tracked_restored
app/api/checkout/route.ts untracked_deleted
app/api/webhooks/stripe/route.ts untracked_deleted
lib/stripe.ts untracked_deleted
.gitignore README.md (your uncommitted work) skipped_unchangedRelated MCP server: uacos
Proof, not promises
3 real AI coding sessions. 3 exact project-file restorations. Payments, database migrations, and deployment infrastructure — all with pre-existing uncommitted work preserved. Read the beta report →
Quickstart
Works inside a Git repository and requires Node.js 22+. VibeRevert keeps its records on your machine and requires no VibeRevert account or hosted service.
npm install -g viberevert@betaviberevert init # one-time setup in your project
viberevert run <your-agent> # records the session and saves your files' starting state
viberevert check # see what changed and what looks risky
viberevert rollback <session> # preview putting your files back; add --apply to restoreRestoring only part of a session works the same way, with a selector:
viberevert rollback <session> --only 'app/api/**' # preview just that part
viberevert rollback <session> --only 'app/api/**' --apply # restore just that partWhat it protects you from
You let an AI agent work across your project, and it touched more than you expected — maybe payment code, a database migration, a deploy file — while your own half-finished work was sitting right there uncommitted. VibeRevert captures your project's starting file state first, so a session you don't like doesn't cost you your afternoon.
What VibeRevert does
Around each AI coding session, VibeRevert:
Checkpoints your project first — working tree, staged changes, and untracked files, including work you haven't committed.
Records the session and the project files that changed while it ran.
Flags risky edits — changes touching auth, payments, databases, secrets, dependencies, or infrastructure (risk taxonomy).
Writes an agent-ready fix prompt from those findings, to paste into your next iteration.
Restores your files to the checkpoint when you need it.
It warns you; it does not silently block your work. An optional pre-commit hook can reject a commit above your configured risk threshold — opt-in, tunable, and bypassable like any local Git hook.
Rules decide. Agents fix.
VibeRevert does not ask another language model whether your agent's changes look risky. Its checks are deterministic: the same inputs and configuration produce the same findings, with an inspectable reason for every flag.
When something needs attention, VibeRevert can turn those findings into an agent-ready fix prompt. The rules decide what to flag; you decide what happens next.
Roll back all of it, or only the part that went wrong
viberevert rollback restores your local project files — tracked, staged, and untracked, including uncommitted work — to how they were when the session started. It previews by default; --apply writes the change, and every apply first saves an emergency checkpoint you can recover from.
Since 0.8.0 you can also restore part of a session. Say the agent's payments change was wrong but its test additions were fine: put back only the payments work and keep everything else.
$ viberevert rollback <session> --only 'app/api/**' # preview — nothing changed yet
[RESTORED] app/api/checkout/route.ts
[RESTORED] app/api/webhooks/stripe/route.ts
Eligibility: eligible
$ viberevert rollback <session> --only 'app/api/**' --applyFour ways to choose, and any one of them switches rollback into selective mode:
Selector | Picks |
| changes matching a path pattern |
| everything but those, subtracted last |
| changes a finding rated at or above that level touches |
| the changes one specific finding applies to |
Positive selectors combine by intersection, so --only 'payments/**' --risk critical means critical changes inside payments/, not payments plus every unrelated critical file. Path selectors follow a renamed file, so a file moved out of payments/ still matches. Nothing is restored unless everything you selected can be: if any selected path drifted since the session ended, the whole operation refuses rather than half-applying, and --force does not override that. If a selective apply is interrupted, the next one fails closed and points you at the emergency checkpoint rather than layering a second partial restore on top.
Two current limitations worth knowing before you rely on it:
Sessions ended before 0.8.0 cannot be selectively rolled back. They have no record of what they contributed and it cannot be reconstructed. Whole-session rollback still works on them, unchanged. See MIGRATIONS.md.
--findingneeds the full finding id, as printed byviberevert check --since <session> --json. Short prefixes are not accepted yet.
It does not reverse effects outside your project files. Deployments, database writes, third-party API calls, payments, and sent emails need their own recovery. Rollback is state-based rather than atomic, and it's a safety net around AI sessions, not a replacement for tests or review. Read what rollback can and can't restore before you rely on it.
One recovery layer across your coding agents
Keep using the coding tools you prefer. VibeRevert can wrap command-line agent sessions (viberevert run <your-agent>) and integrates with tools such as Claude Code and Cursor through its installers.
Built-in checkpoints live inside the agent's workflow. VibeRevert stays with the project.
It captures your project's starting state — including uncommitted work — then records the session, flags risky changes, previews the rollback, and keeps that recovery path outside the agent itself.
Use Claude Code today, Cursor tomorrow, or wrap another terminal agent: the safety layer stays with your project.
Wire it into your tools
VibeRevert installs non-destructively and can be removed cleanly. It integrates with Claude Code and Cursor (MCP server and hooks); every install previews its changes and keeps a recovery journal. See getting started.
An experimental terminal bridge (--pty) can intercept commands inside an interactive agent shell; it's best-effort and documented as such in the PTY contract.
Platforms
Linux, macOS, and Windows, on Node.js 22+. CI runs the suite across all three on Node 22 and 24; see compatibility for exactly what each platform is tested to do.
Learn more
Support VibeRevert
VibeRevert is Apache-2.0 open source. Sponsoring funds continued cross-platform testing, security work, rollback and recovery testing, and helping pay for independent review. Sponsorship does not influence risk findings or release decisions. → Sponsor VibeRevert · what your support funds
License
Apache-2.0. See NOTICE and the license audit.
Available Tools
8 toolscheck_repoB
Run safety checks against the working tree or staged diff and return the resulting ReportFile (or summary when large). Side-effecting (class B per D99.V): always persists the ReportFile under .viberevert/.
Inputs: task, since, staged, threshold.
classify_riskA
Project a check report's findings into per-severity counts (critical, high, medium, low). Read-only (class A per D99.V); no threshold input -- returns the full per-level histogram.
Inputs: report, session.
create_checkpointA
Create a standalone VibeRevert checkpoint capturing the current working tree state. Returns the new checkpoint id and creation timestamp. Side-effecting (class B per D99.V); writes a checkpoint directory under .viberevert/checkpoints/. When name is supplied, uses the D22 name-uniqueness lock; nameless checkpoints skip the lock entirely.
Inputs: name.
explain_diffA
Render a CommonMark explanation of a check report alongside the report's metadata. Reads an existing ReportFile (read-only, class A per D99.V); does not run new checks.
Inputs: report, session, threshold.
generate_fix_promptA
Render a fix-prompt from a VibeRevert check report. Returns the rendered prompt text, the absolute path to the persisted sibling fix-prompt.txt, and the source report id. Side-effecting (class B per D99.V); writes the sibling fix-prompt.txt via atomic temp+rename. The on-disk sibling is always the full untruncated text (D81); the MCP wire response's prompt_text is capped at 262144 bytes (D99.U) -- when truncated, the response carries truncated:true + bytes_omitted.
Inputs: report, session.
get_policyA
Return the project's resolved policy slice from .viberevert.yml: block/warn risk thresholds, check toggles, frameworks, and rollback exclude patterns. Applies M C defaults (D57) before returning. Read-only (class A per D99.V); does not run checks or mutate state.
Inputs: no named parameters.
list_risky_filesA
Project a check report into a per-file risky-files list (path, max_severity, finding_count) sorted by [max_severity DESC, finding_count DESC, path ASC]. Read-only (class A per D99.V). Capped at 500 entries per D99.U.
Inputs: report, session.
start_sessionA
Start a new VibeRevert session: create the inner checkpoint, capture pre-session git status, and acquire the active-session lock. Returns the new session id, checkpoint id, and start timestamp. Side-effecting (class B per D99.V); writes session state and uses the D22 start lock during execution.
Inputs: task.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have clearly distinct roles (create checkpoint, run checks, configure policy, start session), and the report-consuming tools produce different outputs. However, create_checkpoint and start_session overlap in checkpoint creation, and explain_diff, classify_risk, and list_risky_files all operate on check reports, requiring careful reading to choose the right one.
All tool names follow a consistent verb_noun snake_case pattern: create_checkpoint, check_repo, explain_diff, classify_risk, list_risky_files, get_policy, start_session, generate_fix_prompt. There is no mixed casing, vague single-word verbs, or inconsistent naming style.
Eight tools is a well-scoped surface for a checkpoint and safety-reporting server. Each tool covers a recognizable stage of the workflow, and none feel like duplicates or padding.
The server can create checkpoints, start sessions, run checks, and analyze reports, but there is no end/abort session tool, no revert or rollback operation despite the server being named VibeRevert, and no way to manage checkpoints beyond creating them. These are significant gaps that leave core workflows incomplete.
Maintenance
Related MCP Connectors
Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.
Audit your MCP servers for poisoned tools and leaked secrets, and check AI-generated code for flaws.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceOpen-source AI code review MCP server for local git diff auditing with deterministic security rules and AI-powered analysis using any OpenAI-compatible model.4MIT
- AlicenseNot gradedqualityBmaintenanceLocal-first code intelligence and safety layer for AI coding agents. MCP server exposes dependency graph, impact analysis, and AST-compressed repo context, backed by typed local memory, patch-scope safety gates, and git-independent transaction rollback.1MIT
- AlicenseCqualityDmaintenanceSecurity scanner and MCP server that catches dangerous patterns in MCP servers and AI agent projects, such as leaked secrets, shell execution, and prompt-injection text. Runs as both a CLI and MCP server with CI-friendly severity gates.21MIT
- AlicenseNot gradedqualityCmaintenanceAI code reviews and git activity digests with machine-readable risk scoring, available as an MCP server for use within an agent session.1MIT