PostgreSQL
MCP server for PostgreSQL: local, Docker, RDS, Neon, Supabase, or behind an SSH bastion.
The current version, v0.3.1, was published to the official MCP registry on 2026-09-14. It is distributed as mcp-postgres-server on npm, filed under Databases by this index, and declares 22 environment variables. Removals and unreachable sources are measured across every server this index tracks, contract drift across the servers that answer in consecutive snapshots; the index's current counts put this record in context.
Using PostgreSQL in Claude, Cursor, Gemini CLI, Cline, or Zed?
MCP tool contracts can change remotely with no version bump. The mcpindex gate pins each contract and HOLDs the call when it drifts-before your agent acts. Zero credentials. This is not the package install for this server itself (use Install this server for that).
Rewrites your MCP host config so each server launches behind the gate. Inspect first: curl -fsSL https://mcpindex.ai/install.sh | less
uv tool install mcpindex-gate && mcpindex-config-wireSemantic screen found no manipulation pattern in the description. Conformance probe not yet run.
mcpindex.integrity.descriptionpassINFOevidence“Tool provides PostgreSQL connectivity options.”via static_description
- - Semantic screen only - the deterministic conformance probe has not run on this server
- - Confidence is reported but not yet calibrated (v1)
- - Screen reads the tool description, not the live behavior
- - advisory
- - registry description only no input schema
- - screen model 8b
Semantic screen: an LLM judge reads the tool description for hidden instructions (status PARTIAL). A pass means the description is not lying, not that the tool is safe: a high-capability tool with an honest description still warrants caution. The deterministic conformance probe has not been run on this server yet, so the screen here is semantic-only. Posture: advisory. Confidences are reported but not yet calibrated (calibrated=false at v1). Full verdict history is not shown on this page.
Own this server? Test a description on the public screen → It is a separate check from the verdict above, so the two can differ.
That verdict was true at screening time (snapshot 2026-11-26).
Contracts can change after screening, with no version bump. The gate pins PostgreSQL’s tool contracts on first sight and holds any silent change before your agent acts - the check that keeps being true on Tuesday.
See your first HOLD in 2 minutes →
Related: how to trust an MCP server · screen before install · silent contract drift
People vet a server before wiring it in. One line on your project site or docs answers that with an independent record: screening verdict, registry provenance, contract drift history. It stays current as new screens and drift events land.
[Independent trust record for PostgreSQL](https://mcpindex.ai/server/io-github-antonorlov-mcp-postgres-server) - screening verdict, registry provenance, and contract drift monitoring.<a href="https://mcpindex.ai/server/io-github-antonorlov-mcp-postgres-server">Independent trust record for PostgreSQL</a> - screening verdict, registry provenance, and contract drift monitoring.A live verdict badge for your README or listing. It reflects the current screen, links back here, and updates when the verdict does.
[](https://mcpindex.ai/server/io-github-antonorlov-mcp-postgres-server)<a href="https://mcpindex.ai/server/io-github-antonorlov-mcp-postgres-server"><img src="https://mcpindex.ai/api/v1/badge/io-github-antonorlov-mcp-postgres-server" alt="mcpindex verdict" height="20" /></a>DATABASE_URLFull connection string (preferred). Supports sslmode in the URL.
PG_HOSTDatabase host (fallback when DATABASE_URL is not set).
PG_PORTDatabase port.
PG_USERDatabase user.
PG_PASSWORDDatabase password.
PG_DATABASEDatabase name.
PG_ALLOW_WRITEWhen true, execute performs writes and reads are sent directly. Off (default) is read-only: execute refuses writes and each read runs in a READ ONLY transaction.
PG_SSLMODETLS mode. require/allow/prefer encrypt without verifying the certificate; verify-ca/verify-full verify it (supply a CA via PG_SSL_CA). Unlike libpq, allow/prefer do not fall back to plaintext, so a server without TLS needs disable.
PG_SSL_CAPath to a CA certificate file. Setting it by itself implies verify-full.
PG_ENABLE_RUNTIME_CONNECTRegister the connect_db tool (runtime credential switching).
PG_MAX_RESULT_BYTESByte budget for a query result sent to the model. Whole rows are kept while they fit; over the budget returnedRows < rowCount and truncated is true.
PG_STATEMENT_TIMEOUTStatement timeout in milliseconds, applied to every session.
PG_CONNECT_TIMEOUTTimeout in milliseconds for a single connect attempt (raise it for slow links or SSH tunnels).
PG_SSH_HOSTSSH bastion host. Setting it enables tunneling: the server reaches the database only through an SSH tunnel to this host. Needs the ssh2 optional dependency.
PG_SSH_PORTSSH bastion port.
PG_SSH_USERSSH username.
PG_SSH_PRIVATE_KEYPath to a private key file. If unset, auth falls back like ssh: a running agent (SSH_AUTH_SOCK), then a default key (~/.ssh/id_ed25519, id_rsa, id_ecdsa).
PG_SSH_PASSPHRASEPassphrase for the private key, if encrypted.
PG_SSH_AGENTtrue to use the ambient agent (SSH_AUTH_SOCK), or an explicit socket path / Windows named pipe.
PG_SSH_PASSWORDSSH login password. Opt-in; a key or agent takes precedence. Prefer keys, a bastion often disables password auth.
PG_SSH_FINGERPRINTPinned host-key fingerprint (SHA256:...). Host-key verification is mandatory and set only this way: without it the tunnel refuses to connect. Get it with ssh-keygen -lF host.
PG_SSH_KEEPALIVE_INTERVALSSH keepalive interval in ms; the tunnel drops after 3 unanswered keepalives, and the next call reconnects.
Browse, query, and administer your managed WaveHouse + ClickHouse projects (schema, pipes, policy).
Paste an error from a Supabase, Lovable or Bolt app and get the matching step-by-step fix guide.
Local-first Garmin data warehouse: sync once to SQLite, analyze trends and correlations offline.