PGSandbox

Disposable Postgres for coding agents.

A local MCP server that lets agents create, query, inspect, and delete isolated Postgres databases without touching shared development state.

Read docs View GitHub

Paste the prompt into Codex, Cursor, VS Code, or Claude Desktop.

Use it when an agent needs database proof.

PGSandbox turns real Postgres into a disposable task resource: one database, one scoped role, one TTL, and metadata-backed cleanup.

Validate migrations

Give an agent a fresh database before it edits schema files, then let it apply migrations and inspect the result.

Reproduce backend bugs

Create a disposable Postgres target, load the failing state, run the repro query, and delete the database after the task.

Clone realistic state

Restore an existing Postgres source into a tracked sandbox when migrations or bug repros need production-shaped data.

Review generated SQL

Let an agent run bounded queries against real Postgres behavior instead of guessing from ORM code or static types.

Prepare demo data

Seed temporary product states for screenshots, tests, or local demos without polluting a shared development database.

Testimonials

Engineers want agents to prove database work without shared credentials, stale task state, or cleanup guesswork.

PGSandbox gives our agents a place to prove database work before a human reviews it. The important part is that cleanup is tracked.
Maya, staff engineer
The setup prompt is exactly the kind of handoff I want. It tells the agent how to install, configure, verify, and avoid leaking credentials.
Omar, platform lead
We stopped asking agents to use the shared dev database for migration checks. A short-lived sandbox is easier to reason about.
Lena, founding engineer
The tool surface is small enough that I can audit it quickly: create, run SQL, inspect schema, list, delete, clean up.
Theo, backend engineer
It fits how we want agents to work. Start the managed local runtime, register the MCP server, and let the agent create isolated task state.
Priya, engineering manager
The value is not another hosted database. It is giving local agents a safe default when a task needs real Postgres.
Sam, AI enablement lead

Start with the prompt, then inspect the details.

Copy the setup instructions for your agent, or read the docs if you want the MCP tool contract and install paths first.

Read docs View GitHub

Paste the prompt into your agent.