Forgeprint

Catalog entries are written once, in English. Your browser can translate them.

← all integrations

integrations/postgres-mcp

Postgres MCP Pro mcp

Schemas, query plans, index advice and health checks on a PostgreSQL database, in the read-only restricted mode.

Third-party software. Forgeprint hosts none of this code: it is an installation recipe for a project somebody else publishes and maintains. Review the permissions below before installing.

Upstream

Projectcrystaldba/postgres-mcp
Pinned at0.3.0
Verified on2026-09-24

What it can reach

Reads every schema, table and statistics view the connection string's user can read, and runs SQL only inside read-only transactions with a 30-second limit; without --access-mode=restricted it can write.

It needs DATABASE_URI. Create it at the upstream with the narrowest scope that works and put it in your environment — an agent never enters a secret for you.

Install

Claude Code

claude mcp add-json postgres '{"command":"uvx","args":["--with","mcp<2","postgres-mcp==0.3.0","--access-mode=restricted"],"env":{"DATABASE_URI":"${DATABASE_URI}"}}'

Codex CLI

codex mcp add postgres --env "DATABASE_URI=$DATABASE_URI" -- uvx --with "mcp<2" postgres-mcp==0.3.0 --access-mode=restricted

Gemini CLI

gemini mcp add postgres -e 'DATABASE_URI=$DATABASE_URI' uvx --with 'mcp<2' postgres-mcp==0.3.0 --access-mode=restricted

Only agents whose command syntax has been verified are listed. A missing agent is one nobody has confirmed, not one that does not work.

Read it

README.md