Developer · Local MCP server

PostgreSQL

MCP server for PostgreSQL: local, Docker, RDS, Neon, Supabase, or behind an SSH bastion.

Visit PostgreSQL's website

What the MCP Registry states

The entry as published to the official MCP Registry (read 2026-10-04), latest version.

Registry name
io.github.antonorlov/mcp-postgres-server
Version
0.3.1
Status
Active
Category
developer
Transport
stdio (local process)
Package
npm
Published
2026-09-14
Updated
2026-09-14
Publisher
antonorlov (GitHub)
Website
github.com/antonorlov/mcp-postgres-server#readme
Repository
github.com/antonorlov/mcp-postgres-server
Source
Registry API entry

Packages

RegistryPackageVersionTransportEnvironment variables
npmruntime: npxmcp-postgres-server0.3.1stdioDATABASE_URL (secret), PG_HOST, PG_PORT, PG_USER, PG_PASSWORD (secret), PG_DATABASE, PG_ALLOW_WRITE, PG_SSLMODE, PG_SSL_CA, PG_ENABLE_RUNTIME_CONNECT, PG_MAX_RESULT_BYTES, PG_STATEMENT_TIMEOUT, PG_CONNECT_TIMEOUT, PG_SSH_HOST, PG_SSH_PORT, PG_SSH_USER, PG_SSH_PRIVATE_KEY, PG_SSH_PASSPHRASE (secret), PG_SSH_AGENT, PG_SSH_PASSWORD (secret)

How to connect PostgreSQL

PostgreSQL runs locally from a Node.js package published to the npm registry: mcp-postgres-server version 0.3.1. It speaks MCP over stdio, so the client starts it as a program and talks to it through standard input and output. It needs Node.js; clients usually start it with npx — the usual command is npx -y mcp-postgres-server@0.3.1. It reads these environment variables: DATABASE_URL (secret), PG_HOST, PG_PORT, PG_USER, PG_PASSWORD (secret), PG_DATABASE, PG_ALLOW_WRITE, PG_SSLMODE, PG_SSL_CA, PG_ENABLE_RUNTIME_CONNECT, PG_MAX_RESULT_BYTES, PG_STATEMENT_TIMEOUT, PG_CONNECT_TIMEOUT, PG_SSH_HOST, PG_SSH_PORT, PG_SSH_USER, PG_SSH_PRIVATE_KEY, PG_SSH_PASSPHRASE (secret), PG_SSH_AGENT and PG_SSH_PASSWORD (secret); set them in the client's configuration for this server.

In the mcpServers JSON format that many desktop and editor MCP clients read, the entry looks like this (placeholders in angle brackets):

{
  "mcpServers": {
    "mcp-postgres-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-postgres-server@0.3.1"
      ],
      "env": {
        "DATABASE_URL": "<secret>",
        "PG_HOST": "<value>",
        "PG_PORT": "<value>",
        "PG_USER": "<value>",
        "PG_PASSWORD": "<secret>",
        "PG_DATABASE": "<value>",
        "PG_ALLOW_WRITE": "<value>",
        "PG_SSLMODE": "<value>",
        "PG_SSL_CA": "<value>",
        "PG_ENABLE_RUNTIME_CONNECT": "<value>",
        "PG_MAX_RESULT_BYTES": "<value>",
        "PG_STATEMENT_TIMEOUT": "<value>",
        "PG_CONNECT_TIMEOUT": "<value>",
        "PG_SSH_HOST": "<value>",
        "PG_SSH_PORT": "<value>",
        "PG_SSH_USER": "<value>",
        "PG_SSH_PRIVATE_KEY": "<value>",
        "PG_SSH_PASSPHRASE": "<secret>",
        "PG_SSH_AGENT": "<value>",
        "PG_SSH_PASSWORD": "<secret>"
      }
    }
  }
}

Derived from the registry entry, not tested here. What the server does, and on what terms, is set by its publisher; check its repository or website before giving it access to your accounts or files. How to add an MCP server to an assistant · Before you connect

More developer servers

All 6,250 →
ServerRunsEndpoint or package
Postgres MCPPostgreSQL MCP wrapper with.env credential mapping, tool selection, and safe read-only defaults.Local · stdionpm: @edelciomolina/postgres-mcp
Postgres MCPEnterprise PostgreSQL MCP server with NL queries, hybrid search (pgvector+BM25), and web UI.Local · stdioOCI image (Docker): ghcr.io/pgedge/postgres-mcp:latest
Postgres MCPPostgreSQL MCP server with 15 tools (SQL, EXPLAIN, health, indexes) plus a Gradio UI with LLM chat.Local · stdioPyPI: postgres-mcp-pro
Postgres Scout MCPScout your PostgreSQL databases with AI - safety features, monitoring, and data quality.Local · stdionpm: postgres-scout-mcp
PostgreSQL (hardened, read-only)Read-only PostgreSQL over MCP. Writes refused at the parsed SQL, plus a READ ONLY transaction.Local · stdio, HTTPnpm: postgres-mcp-hardened
PostgreSQL CVE & Release IntelligencePostgreSQL security for AI agents: CVEs, yanked releases, exploits, and upgrade paths.Local · stdioPyPI: pg-cve-mcp
PostgreSQL MCP ServerPostgreSQL MCP Server — 27 tools for queries, schema, CRUD, DBA, HA & server management.Local · stdionpm: @itunified.io/mcp-postgres
PostgreSQL MCP ServerPostgreSQL MCP server with 203 tools, connection pooling, HTTP/SSE, OAuth 2.1, and tool filtering.Local · stdionpm: @neverinfamous/postgres-mcp