PostgreSQL

io.github.antonorlov/mcp-postgres-server

About PostgreSQL

PostgreSQL is an MCP server published by the GitHub account antonorlov. MCP server for PostgreSQL: local, Docker, RDS, Neon, Supabase, or behind an SSH bastion.

It runs on your own machine: your AI client starts it from the npm package mcp-postgres-server at version 0.3.1.

It asks for 4 secrets: DATABASE_URL, PG_PASSWORD, PG_SSH_PASSPHRASE and PG_SSH_PASSWORD. Give it a key with the least access that still works.

Version 0.3.1 was published on 14 September 2026, and the source code is public, so you can read it before installing.

Written from the registry entry. 9 automated checks on the registry entry and the package code: 6 pass, 2 warn, 0 fail, 1 info. How we check.

What it asks for

VariableRequiredSecretDescription
DATABASE_URLNoYesFull connection string (preferred). Supports sslmode in the URL.
PG_HOSTNoNoDatabase host (fallback when DATABASE_URL is not set).
PG_PORTNoNoDatabase port.
PG_USERNoNoDatabase user.
PG_PASSWORDNoYesDatabase password.
PG_DATABASENoNoDatabase name.
PG_ALLOW_WRITENoNoWhen 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_SSLMODENoNoTLS 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_CANoNoPath to a CA certificate file. Setting it by itself implies verify-full.
PG_ENABLE_RUNTIME_CONNECTNoNoRegister the connect_db tool (runtime credential switching).
PG_MAX_RESULT_BYTESNoNoByte 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_TIMEOUTNoNoStatement timeout in milliseconds, applied to every session.
PG_CONNECT_TIMEOUTNoNoTimeout in milliseconds for a single connect attempt (raise it for slow links or SSH tunnels).
PG_SSH_HOSTNoNoSSH 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_PORTNoNoSSH bastion port.
PG_SSH_USERNoNoSSH username.
PG_SSH_PRIVATE_KEYNoNoPath 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_PASSPHRASENoYesPassphrase for the private key, if encrypted.
PG_SSH_AGENTNoNotrue to use the ambient agent (SSH_AUTH_SOCK), or an explicit socket path / Windows named pipe.
PG_SSH_PASSWORDNoYesSSH login password. Opt-in; a key or agent takes precedence. Prefer keys, a bastion often disables password auth.
PG_SSH_FINGERPRINTNoNoPinned 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_INTERVALNoNoSSH keepalive interval in ms; the tunnel drops after 3 unanswered keepalives, and the next call reconnects.

Checks

CheckResultDetail
Source repository linkedPasshttps://github.com/antonorlov/mcp-postgres-server
Version pinnedPassEvery package has an explicit version
Secrets requestedWarnAsks for 4 secrets: DATABASE_URL, PG_PASSWORD, PG_SSH_PASSPHRASE, PG_SSH_PASSWORD
Known package registryPassAll packages come from npm, PyPI, OCI, NuGet or MCPB
Namespace ownershipInfoName verified via GitHub account antonorlov
Registry text aimed at the AIPassDescription and settings contain no hidden characters or instructions to the AI
Install scriptsPassmcp-postgres-server@0.3.1 runs nothing at install
Code red flagsWarnReads SSH or cloud credentials (build/ssh-connector.js:85: "id_ed25519")
Text aimed at the AIPassNo hidden characters or instructions to the AI in 5 files, including comments and the README

Popularity & health: 57 / 100

Worked out from public numbers and our own checks, not from user reviews or ratings. It says how used and how looked-after a server is, not whether it is safe.

Popularity18 / 40

24 GitHub stars, 1,195 downloads last week, 0 Hacker News posts (0 points). Best two of the three, each on a log scale.

Activity19 / 25

Last push 2026-09-16, last release 2026-09-14, 16 commits in 90 days.

Issue health8 / 15

3 closed of 4 issues, too few to judge. No data, so half marks.

Our checks12 / 20

2 warnings, each costing a fifth.

10 forks, 1 merged pull requests. Sources: GitHub, npm, PyPI (pypistats.org) and Hacker News (Algolia), fetched 2026-10-31.

What people say

No Hacker News threads link to its source code.

Look further: search Reddit, search Hacker News, read its GitHub issues. These are not reviews we checked.

Facts

Registry nameio.github.antonorlov/mcp-postgres-server
PublisherGitHub account antonorlov
How the name is verifiedName verified via GitHub account antonorlov. The registry ties the name prefix to that account or domain; it does not check the code.
TypeLocal: runs on your machine from a package
Packagesnpm mcp-postgres-server 0.3.1 (stdio)
Version0.3.1
Published
Last updated
Source repositoryhttps://github.com/antonorlov/mcp-postgres-server
Websitehttps://github.com/antonorlov/mcp-postgres-server#readme
CategoryDatabases & data (assigned by keyword rule, not by hand)

Related servers in Databases & data