MCP.Market

pgmcp MCP server

by pascalallen·io.github.pascalallen/pgmcp·v1.1.0

Read-only Postgres ops/DBA diagnostics: slow queries, EXPLAIN, locks, index and table health.

C65/100grade C
What users say
No reviews yet
Be the first
Safety scan
C65/100

full report

Adoption
New

0 stars

Reviews

Write one

Nobody has reviewed pgmcp yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

pgmcp tools

No tool declarations could be read from the package source. They show once the server is installed.

Public scan report

scanner v0.1.10 · 2026-11-02 · same rubric, same numbers if you re-run it

no findings
  • –Code scanpackage could not be scannedn/a
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitystatic API keys via environment variables6/15
  • Maintenancelast push 46 days ago12/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 65/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How pgmcp compares

Against every graded Databases MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
65/100
higher than 15% of 802 Databases servers

Install pgmcp in Claude Code, Cursor or VS Code

claude mcp add pgmcp -- docker run -i --rm ghcr.io/pascalallen/pgmcp:1.1.0
Add to Cursor

What the publisher says

From the pgmcp repository's README, as published. We do not edit it. Read it on GitHub

pgmcp

pgmcp is a read-only PostgreSQL ops/DBA server for the Model Context Protocol, built on the official modelcontextprotocol/go-sdk. It answers the questions a DBA asks during an incident — which statements are slow, why this plan is slow, which indexes are dead weight, which tables autovacuum has fallen behind on, who is blocking whom, how far the standby is lagging — and it is read-only by construction rather than by convention: a dedicated database role that holds no write privilege, a BEGIN READ ONLY transaction with a statement timeout around every single statement, and a SQL parser guard that rejects anything that is not one SELECT/EXPLAIN/SHOW and every function that could mutate state from inside a read-only transaction. Tested against PostgreSQL 16; requires 13 or later.

Installation

Claude Desktop, one click: download pgmcp_.mcpb from Releases and open it. Claude Desktop asks for a Postgres connection string, keeps it in the OS keychain, and launches the bundled binary itself — nothing on PATH, no config file to edit. One bundle covers macOS (universal) and Windows (x64).

Otherwise download a binary for your platform from Releases — darwin, linux and windows, amd64 and arm64, with checksums.

Or build from source with the Go CLI tool go:

go install github.com/pascalallen/pgmcp/cmd/pgmcp@latest

Or run the released image, which is distroless, non-root and multi-arch:

docker run --rm -i -e PGMCP_DATABASE_URL='postgres://…' ghcr.io/pascalallen/pgmcp

pgmcp is listed in the MCP Registry as io.github.pascalallen/pgmcp.

Before you point it at anything, create the read-only role — see Database role. It is the layer that still holds if the other two have a bug.

Usage

One MCP surface, two transports. Which one you run is configuration, not a different build.

Claude Code, stdio — the client launches the binary and talks over stdin/stdout:

claude mcp add pgmcp --transport stdio \
  --env PGMCP_DATABASE_URL='postgres://pgmcp:…@db.internal:5432/app?sslmode=require' \
  -- pgmcp

Claude Desktop, stdio — install the .mcpb bundle from Releases (see Installation), or write the same thing into claudedesktopconfig.json by hand:

{
  "mcpServers": {
    "pgmcp": {
      "command": "pgmcp",
      "env": {
        "PGMCP_DATABASE_URL": "postgres://pgmcp:…@db.internal:5432/app?sslmode=require"
      }
    }
  }
}

HTTP — Streamable HTTP behind a static bearer key, for a shared deployment. pgmcp speaks plain HTTP and never terminates TLS itself; run it on loopback behind a reverse proxy.

PGMCP_DATABASE_URL='postgres://pgmcp:…@db.internal:5432/app?sslmode=require' \
PGMCP_AUTH_MODE=static \
PGMCP_API_KEYS="$(openssl rand -hex 32)" \
  pgmcp --transport http --listen 127.0.0.1:8080
claude mcp add pgmcp --transport http https://pgmcp.example.com/mcp \
  --header "Authorization: Bearer <key>"

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Grade history

  • 2026-11-02downgradeB → Cscore 65

pgmcp: common questions

Is pgmcp MCP server safe?
With care: it is graded C, so read the findings first (65/100). Read the pgmcp safety report
How do I install pgmcp?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does pgmcp need an API key?
Yes. The registry entry asks for PGMCP_DATABASE_URL.
Is pgmcp maintained?
The last commit was 49 days ago (2026-09-16). The latest release is v1.1.0.
What can I use instead of pgmcp?
Servers from other publishers that do the same job: PostgreSQL MCP Server, Midplane MCP server and DB Explorer MCP server.

Alternatives to pgmcp

Same job from other publishers: the closest match first, then the best rated.

  • PostgreSQL MCP Server
    PostgreSQL MCP server - query, schema introspection, explain, and health checks for AI assistants
    B
  • Midplane
    A gateway between AI agents and Postgres: table access, masking at the source, approvals and audit.
    B
  • DB Explorer
    Read-only SQL for PostgreSQL, MySQL and SQLite: schema, safe SELECTs, EXPLAIN, index advice
    B
  • Appwrite
    Build and deploy backends: auth, Postgres/MySQL/vector databases, storage, functions, hosting, CDN
    A
  • Airtable
    Read and write access to Airtable database schemas, tables, and records.
    B