ensure_postgres
Install missing local Postgres server binaries with a supported package manager when available, then start a managed local profile.
How to use it
Project documentation lists ensure_postgres for the Pgsandbox MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), then check which tools your installed version makes available. Tool availability can depend on configuration and credentials. A server handshake does not verify this tool’s behavior. See the full listing for setup details.
Install Pgsandbox
cargo install --path . --forceOther tools in Pgsandbox (26)
Delete expired metadata-owned sandboxes, or dry-run the selection.
Clone an existing source database into a new sandbox with pgdump/pgrestore, optionally installing target extensions and skipping source-only extension entries.
Create one isolated sandbox database and role, optionally installing requested extensions.
Restore a template into a new tracked sandbox.
Store a named local schema checkpoint.
Export a sandbox to a reusable local template artifact.
Delete a metadata-owned sandbox database and role.
Delete a local schema snapshot artifact.
Delete a template dump and metadata.
Return relation, column, constraint, index, view, materialized view, foreign table, and extension metadata.
Compare a stored snapshot with the current schema.
Return MCP-safe diagnostics and profile health.
Return EXPLAIN (FORMAT JSON) for one safe plannable statement.
Return redacted direct/container connection variants by default, or raw credentials when explicitly requested.
List active metadata-owned sandboxes.
List available extensions for a profile and installed extensions for an existing sandbox.
List configured profiles and discovered local Postgres versions.
List named schema checkpoints for a sandbox.
List local template artifacts for a profile.
Write secret-free repo workflow metadata to .pgsandbox/project.json.
Run an explicit repo command with sandbox DB env vars.
Run SQL against a sandbox with bounded result rows.
Compare a previous digest with the current schema.
Return a compact checksummed schema summary.
Run an explicit seed command against a sandbox.
Capture before/after schema digests around a repo command.