pgbrake
v0.3.0Postgres brake for AI agents: risky SQL waits for approval, UPDATE/DELETE get one-command undo.
Values you need
| Variable | What it is | |
|---|---|---|
PGBRAKE_DSN | required secret | Postgres connection string, e.g. postgresql://me@localhost/app |
PyPI (uvx) discovery passed
Requires uv (https://docs.astral.sh/uv/)
Run in a terminal
claude mcp add pgbrake -e 'PGBRAKE_DSN=<PGBRAKE_DSN>' -- uvx pgbrake==0.3.0 serveAdd to
claude_desktop_config.json{
"mcpServers": {
"pgbrake": {
"args": [
"pgbrake==0.3.0",
"serve"
],
"command": "uvx",
"env": {
"PGBRAKE_DSN": "<PGBRAKE_DSN>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"pgbrake": {
"args": [
"pgbrake==0.3.0",
"serve"
],
"command": "uvx",
"env": {
"PGBRAKE_DSN": "<PGBRAKE_DSN>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "PGBRAKE_DSN",
"id": "pgbrake-dsn",
"password": true,
"type": "promptString"
}
],
"servers": {
"pgbrake": {
"args": [
"pgbrake==0.3.0",
"serve"
],
"command": "uvx",
"env": {
"PGBRAKE_DSN": "${input:pgbrake-dsn}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.pgbrake]
command = "uvx"
args = ["pgbrake==0.3.0", "serve"]
env = { "PGBRAKE_DSN" = "<PGBRAKE_DSN>" }For AI agents
- Ask the user for: PGBRAKE_DSN. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: query, execute, undo, list_changes, approval_status.
- If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.
Machine-readable: install.md · manifest.json