Prototype · Preview: every server in the official registry, synced every 30 minutes. Reviews and accounts come in a later step.
PopNx MCPMCP servers for people who use AI · explained in plain words

pgbrake

by lexangversion 0.3.0i★ –iRuns on your computer
Registry nameio.github.lexang/pgbrake

Install

Overview

Description from the maker (original English)

Postgres brake for AI agents: risky SQL waits for approval, UPDATE/DELETE get one-command undo.

PopNx MCP’s three pillars

These three are never merged into one score: opinions, measurements and popularity are different things.

What you can do with it

We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.

  • Connection: Runs on your computer
  • Transport: stdio
  • Category: Databases & datasets
  • You need to fill in: PGBRAKE_DSN

Install

Pick the AI app you use, then copy the settings.

Before you install

  • Basic checks: 1 of 1 passed
  • Runs on your computer with your user’s permissions (files, network, apps).
  • You fill in yourself: PGBRAKE_DSN

Values marked secret are keys to your account. Never share them or paste them into a chat.

You need

  • PyPIPython’s uv installed (for the uvx command)

Which app do you use?

Pick your app above. We remember it, so next time the button says “Install in …”.

Open Claude Desktop → Settings → Developer → Edit Config, and paste this into claude_desktop_config.json

{
  "mcpServers": {
    "pgbrake": {
      "command": "uvx",
      "args": [
        "pgbrake",
        "serve"
      ],
      "env": {
        "PGBRAKE_DSN": "your-value"
      }
    }
  }
}

Run this in your terminal

claude mcp add pgbrake --env PGBRAKE_DSN=your-value -- uvx pgbrake serve

Fill in the empty values before running it.

Open in Cursor

Or copy the settings yourself

Paste into .cursor/mcp.json in your project, or ~/.cursor/mcp.json

{
  "mcpServers": {
    "pgbrake": {
      "command": "uvx",
      "args": [
        "pgbrake",
        "serve"
      ],
      "env": {
        "PGBRAKE_DSN": "your-value"
      }
    }
  }
}

Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.

Open in VS Code

Or copy the settings yourself

Paste into .vscode/mcp.json in your project

{
  "servers": {
    "pgbrake": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "pgbrake",
        "serve"
      ],
      "env": {
        "PGBRAKE_DSN": "your-value"
      }
    }
  }
}

Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.

This one runs on your computer, and ChatGPT can only connect to servers on the internet. Pick another app.

Your choice stays on this device in a cookie; no account needed.

Values you fill in

  • PGBRAKE_DSN secret required env
    Postgres connection string, e.g. postgresql://me@localhost/app

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 7, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account lexang, which owns the repo

  • … Not checked yet

    Still maintained

    We have not read this repo from GitHub yet

  • … Not checked yet

    Has a licence

    We have not read this repo from GitHub yet

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Compared with others in Databases & datasetsi

  • More stars than 0% of the other 955 servers in this category
  • Published to the registry more recently than 98% of the other 955 servers in this category
  • Basic checks equal to or better than 100% of the other 955 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is pgbrake safe?

It passed 1 of 1 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

You need to fill in: PGBRAKE_DSN

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed –, and the latest version (0.3.0) reached the registry yesterday.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.

What can I use instead?

In the same category: Supabase, MongoDB MCP Server, Elasticsearch MCP Server

Alternatives

Servers in the same category from other makers, sorted by stars.

Reading a card:★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

Supabase

by supabase

Supabase’s official server lets AI create tables, query data and review project settings in your Supabase database.

Computer or cloud★ 2,993Apache-2.0Updated yesterday
Install

MongoDB MCP Server

by mongodb-js

MongoDB Model Context Protocol Server

Runs on your computer★ 1,157Apache-2.0Updated 3 days ago
Install

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

pgbrake

An undo button for your database when an AI agent is driving.

pgbrake is a local MCP server that sits between Claude Code / Codex / Cursor and your Postgres. Every write the agent makes gets a change id you can reverse with one command. Risky SQL waits for a human. Everything is logged. Nothing leaves your machine.

agent> DELETE FROM users WHERE created_at < '2025-01-01'

pgbrake> held: DELETE would touch 4,812 rows (limit 100) — approval apv_3f9c21aa

agent> DELETE FROM users WHERE id = 42 pgbrake> 1 row affected; undo with change id chg_8e01b7d2

you$ pgbrake undo chg_8e01b7d2 undid delete on "users": 1 row(s) restored

Why

Claude Code checkpoints rewind files, not databases. Client-side permission prompts and hooks can be skipped or misfire for MCP calls, and a tool's own "destructive" label is just a hint. pgbrake enforces its rules inside the server, so they hold no matter which agent or client calls it.

What it does (free, MIT)

  • Real SQL parsing (the Postgres parser via pglast), not regex.
  • Held for approval: DDL (DROP, ALTER, TRUNCATE...), UPDATE/DELETE without WHERE, any write over the row limit (default 100), upserts and MERGE.
  • Never allowed: ALTER SYSTEM, role/database creation and drops, COPY ... PROGRAM, DO blocks.
  • One-command undo: before each UPDATE/DELETE, the affected rows are saved locally; inserts are tracked by primary key. Undo refuses if the rows changed since, unless you --force.
  • Approval only by a human: in the client's own prompt (MCP elicitation) or pgbrake approve in an interactive terminal. Approvals are one-shot, expire in 15 minutes, and are bound to the exact SQL.
  • Audit log of every statement, decision and row count, in ~/.pgbrake/journal.db.
  • Multi-statement calls run in one transaction: all or nothing.

Install

pip install pgbrake      # or: uvx pgbrake serve

Claude Code:

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

Codex (~/.codex/config.toml):

[mcp_servers.pgbrake]

command = "uvx" args = ["pgbrake", "serve"] env = { PGBRAKE_DSN = "postgresql://me@localhost/app" }

Then remove any other database MCP / psql access from the agent, so pgbrake is the only way in. In Claude Code, add "Bash(psql:*)" and "Bash(pgbrake approve:*)" to permissions.deny.

Commands

pgbrake pending            # SQL waiting for you

pgbrake approve # approve (interactive terminal only) pgbrake deny pgbrake changes # undoable changes pgbrake undo # reverse one pgbrake log # audit log

Settings (env)

VariableDefault
PGBRAKE_DSN—connection string (falls back to DATABASE_URL)
PGBRAKE_MAX_ROWS100writes touching more rows need approval
PGBRAKE_ALLOW_DDL0set 1 to let schema changes through (still logged)
PGBRAKE_READ_ONLY0set 1 to refuse every write
PGBRAKE_STATEMENT_TIMEOUT_MS15000
PGBRAKE_JOURNAL~/.pgbrake/journal.db

Limits

  • Undo covers rows changed through pgbrake. It is not a backup: keep real backups.
  • TRUNCATE, DDL, upserts and MERGE are held for approval but cannot be undone.
  • Updating a table with no primary key needs approval and cannot be undone.
  • The free version keeps the last 20 undoable changes.

Pro

$29 one-time for the first 100 licenses (then $39). No subscription. 14-day refund. [Buy pgbrake Pro](https://lexang.github.io/#pricing)

  • Migration guard for agent terminal commands. A Claude Code PreToolUse hook catches prisma migrate reset --force, drizzle-kit push --force, alembic downgrade base and friends, takes a pg_dump snapshot first (when PGBRAKE_DSN is set), checks pg_restore can read it, then asks you. If the snapshot fails, the command is blocked instead (override with PGBRAKE_ALLOW_NO_SNAPSHOT=1). Set PGBRAKE_VERIFY_RESTORE=1 to also restore the snapshot into a throwaway database and compare table counts before you're asked; if that restore fails, the command is blocked. The drill needs CREATEDB rights (or PGBRAKE_DRILL_DSN pointing at a server where it has them) and takes about as long as a restore. Install with pgbrake install-hook.
  • Unlimited undo history (free keeps the last 20).
  • Audit export: pgbrake log --export csv|json.

After paying you land on a page that shows your key. Activate it once:

pgbrake license <your-key>     # or set PGBRAKE_LICENSE

Keys are verified offline; pgbrake never phones home.

Ask PopNx