{
  "slug": "io-github-antonorlov-mcp-postgres-server",
  "name": "io.github.antonorlov/mcp-postgres-server",
  "title": "PostgreSQL",
  "description": "MCP server for PostgreSQL: local, Docker, RDS, Neon, Supabase, or behind an SSH bastion.",
  "version": "0.3.1",
  "publishedAt": "2026-09-14T20:23:00.55789Z",
  "updatedAt": "2026-09-14T20:23:00.55789Z",
  "repoUrl": "https://github.com/antonorlov/mcp-postgres-server",
  "websiteUrl": "https://github.com/antonorlov/mcp-postgres-server#readme",
  "namespace": {
    "type": "github",
    "owner": "antonorlov"
  },
  "kind": "local",
  "packages": [
    {
      "registryType": "npm",
      "identifier": "mcp-postgres-server",
      "version": "0.3.1",
      "transport": "stdio",
      "runtimeHint": "npx"
    }
  ],
  "remotes": [],
  "envVars": [
    {
      "name": "DATABASE_URL",
      "isSecret": true,
      "isRequired": false,
      "description": "Full connection string (preferred). Supports sslmode in the URL."
    },
    {
      "name": "PG_HOST",
      "isSecret": false,
      "isRequired": false,
      "description": "Database host (fallback when DATABASE_URL is not set)."
    },
    {
      "name": "PG_PORT",
      "isSecret": false,
      "isRequired": false,
      "description": "Database port."
    },
    {
      "name": "PG_USER",
      "isSecret": false,
      "isRequired": false,
      "description": "Database user."
    },
    {
      "name": "PG_PASSWORD",
      "isSecret": true,
      "isRequired": false,
      "description": "Database password."
    },
    {
      "name": "PG_DATABASE",
      "isSecret": false,
      "isRequired": false,
      "description": "Database name."
    },
    {
      "name": "PG_ALLOW_WRITE",
      "isSecret": false,
      "isRequired": false,
      "description": "When 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."
    },
    {
      "name": "PG_SSLMODE",
      "isSecret": false,
      "isRequired": false,
      "description": "TLS 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."
    },
    {
      "name": "PG_SSL_CA",
      "isSecret": false,
      "isRequired": false,
      "description": "Path to a CA certificate file. Setting it by itself implies verify-full."
    },
    {
      "name": "PG_ENABLE_RUNTIME_CONNECT",
      "isSecret": false,
      "isRequired": false,
      "description": "Register the connect_db tool (runtime credential switching)."
    },
    {
      "name": "PG_MAX_RESULT_BYTES",
      "isSecret": false,
      "isRequired": false,
      "description": "Byte 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."
    },
    {
      "name": "PG_STATEMENT_TIMEOUT",
      "isSecret": false,
      "isRequired": false,
      "description": "Statement timeout in milliseconds, applied to every session."
    },
    {
      "name": "PG_CONNECT_TIMEOUT",
      "isSecret": false,
      "isRequired": false,
      "description": "Timeout in milliseconds for a single connect attempt (raise it for slow links or SSH tunnels)."
    },
    {
      "name": "PG_SSH_HOST",
      "isSecret": false,
      "isRequired": false,
      "description": "SSH bastion host. Setting it enables tunneling: the server reaches the database only through an SSH tunnel to this host. Needs the ssh2 optional dependency."
    },
    {
      "name": "PG_SSH_PORT",
      "isSecret": false,
      "isRequired": false,
      "description": "SSH bastion port."
    },
    {
      "name": "PG_SSH_USER",
      "isSecret": false,
      "isRequired": false,
      "description": "SSH username."
    },
    {
      "name": "PG_SSH_PRIVATE_KEY",
      "isSecret": false,
      "isRequired": false,
      "description": "Path 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)."
    },
    {
      "name": "PG_SSH_PASSPHRASE",
      "isSecret": true,
      "isRequired": false,
      "description": "Passphrase for the private key, if encrypted."
    },
    {
      "name": "PG_SSH_AGENT",
      "isSecret": false,
      "isRequired": false,
      "description": "true to use the ambient agent (SSH_AUTH_SOCK), or an explicit socket path / Windows named pipe."
    },
    {
      "name": "PG_SSH_PASSWORD",
      "isSecret": true,
      "isRequired": false,
      "description": "SSH login password. Opt-in; a key or agent takes precedence. Prefer keys, a bastion often disables password auth."
    },
    {
      "name": "PG_SSH_FINGERPRINT",
      "isSecret": false,
      "isRequired": false,
      "description": "Pinned 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."
    },
    {
      "name": "PG_SSH_KEEPALIVE_INTERVAL",
      "isSecret": false,
      "isRequired": false,
      "description": "SSH keepalive interval in ms; the tunnel drops after 3 unanswered keepalives, and the next call reconnects."
    }
  ],
  "category": "databases",
  "subcategory": "sql",
  "company": "",
  "categoryAuto": true,
  "checks": [
    {
      "id": "source-linked",
      "label": "Source repository linked",
      "result": "pass",
      "detail": "https://github.com/antonorlov/mcp-postgres-server"
    },
    {
      "id": "version-pinned",
      "label": "Version pinned",
      "result": "pass",
      "detail": "Every package has an explicit version"
    },
    {
      "id": "secrets-requested",
      "label": "Secrets requested",
      "result": "warn",
      "detail": "Asks for 4 secrets: DATABASE_URL, PG_PASSWORD, PG_SSH_PASSPHRASE, PG_SSH_PASSWORD"
    },
    {
      "id": "known-registry",
      "label": "Known package registry",
      "result": "pass",
      "detail": "All packages come from npm, PyPI, OCI, NuGet or MCPB"
    },
    {
      "id": "namespace",
      "label": "Namespace ownership",
      "result": "info",
      "detail": "Name verified via GitHub account antonorlov"
    },
    {
      "id": "meta-text",
      "label": "Registry text aimed at the AI",
      "result": "pass",
      "detail": "Description and settings contain no hidden characters or instructions to the AI"
    },
    {
      "id": "install-scripts",
      "label": "Install scripts",
      "result": "pass",
      "detail": "mcp-postgres-server@0.3.1 runs nothing at install"
    },
    {
      "id": "code-flags",
      "label": "Code red flags",
      "result": "warn",
      "detail": "Reads SSH or cloud credentials (build/ssh-connector.js:85: \"id_ed25519\")"
    },
    {
      "id": "ai-text",
      "label": "Text aimed at the AI",
      "result": "pass",
      "detail": "No hidden characters or instructions to the AI in 5 files, including comments and the README"
    }
  ],
  "scannedAt": "2026-10-29",
  "level": "Scanned",
  "install": [
    {
      "label": "Claude Desktop (npm)",
      "kind": "claude_desktop_json",
      "text": "{\n  \"mcpServers\": {\n    \"mcp-postgres-server\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"mcp-postgres-server@0.3.1\"\n      ]\n    }\n  }\n}"
    }
  ],
  "curated": true,
  "stars": 24,
  "archived": false,
  "pushedAt": "2026-09-16T14:01:16Z",
  "health": {
    "score": 57,
    "parts": {
      "popularity": 0.4528068796279783,
      "activity": 0.7556799101765648,
      "issues": null,
      "security": 0.6
    },
    "fail": 0,
    "warn": 2,
    "raw": {
      "stars": 24,
      "forks": 10,
      "downloads": 1195,
      "hn": {
        "n": 0,
        "pts": 0,
        "t": []
      },
      "issuesOpen": 1,
      "issuesClosed": 3,
      "prsMerged": 1,
      "commits90": 16,
      "release": "2026-09-14T20:24:08Z",
      "pushed": "2026-09-16T14:01:16Z",
      "growth": null,
      "growthDays": null,
      "archived": false
    },
    "at": "2026-10-31T07:42:38.200Z"
  }
}
