An undo button for Postgres when an AI agent is driving

pgbrake is a local MCP server that sits between Claude Code, Codex or Cursor and your Postgres database. Risky SQL waits for a human. Every UPDATE and DELETE made through it can be reversed with one command. Everything runs on your machine; nothing is sent to us.

pgbrake holding a 365-row DELETE, then undoing a single-row delete

pip install pgbrake
claude mcp add pgbrake --env PGBRAKE_DSN="postgresql://me@localhost/app" -- uvx pgbrake serve

What it does

Pricing

Free

$0

Open source (MIT), forever

pip install pgbrake

Pro

$29 one-time

Launch price for the first 100 licenses, then $39. One-time payment, no subscription, no auto-renewal. Includes all 0.x and 1.x updates.

Buy Pro — $29

14-day refund, no questions asked. See the refund policy.

Limits

Undo covers only changes made through pgbrake. TRUNCATE and DDL can be held but not undone. pgbrake does not replace backups. Tested on PostgreSQL 17.