Isolated by default
Every task gets its own database and scoped role, instead of touching a shared dev database.
Disposable Postgres for autonomous coding loops
PGSandbox MCP gives agents a private Postgres playground for migrations, bug repros, seeded demos, and SQL validation — with TTLs and cleanup built in.
npm install -g pgsandbox-mcp
pgsandbox-mcp setup \
--client codex \
--admin-url "$PGSANDBOX_ADMIN_DATABASE_URL"
pgsandbox-mcp doctorWhy it exists
Every task gets its own database and scoped role, instead of touching a shared dev database.
Point it at any reachable Postgres admin connection: local, Docker, VPS, or private dev host.
Expose database creation, SQL execution, schema inspection, and cleanup through MCP tools.
Start in minutes
Use an admin connection for a Postgres instance you control. PGSandbox creates task databases and limited roles under a predictable prefix.
export PGSANDBOX_ADMIN_DATABASE_URL="postgres://postgres:postgres@localhost:5432/postgres"
npm install -g pgsandbox-mcp
pgsandbox-mcp setup --client codex --admin-url "$PGSANDBOX_ADMIN_DATABASE_URL"
pgsandbox-mcp doctorMCP tool surface
Built for local-first validation
Start with npm or Homebrew, then wire it into Codex, Cursor, VS Code, or Claude Desktop.