Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI β†’ MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE β†— (opens in a new tab)
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ—„οΈ Databases
  3. Pgmcp
Pgmcp logo
Health: ActiveRecent health check succeeded.Last checked 9/8/2026, 12:32:38 AM

Pgmcp

User RatingsBe the first to rate and review this MCP server! Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time β€” check back soon.
View RepositoryVisit Website

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

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Not yet automatically verified

We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β€” we're steadily working through the catalog.

Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "pgmcp": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/conformance"
      ]
    }
  }
}

πŸ’‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Directory Badge Claim listing AlternativesπŸ—„οΈ More in Databases

Documentation Overview

pgmcp

Go Reference GitHub go.mod Go version Go Report Card GitHub Workflow Status (with branch) GitHub GitHub code size in bytes

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_<version>.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:

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

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

Terminal
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:

Terminal
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 claude_desktop_config.json by hand:

config.json
{
  "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.

bash
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
Terminal
claude mcp add pgmcp --transport http https://pgmcp.example.com/mcp \
  --header "Authorization: Bearer <key>"

TLS termination, the proxy settings the streaming transport needs, JWT auth against an identity provider, and wiring pgmcp up as a claude.ai custom connector are all in docs/DEPLOYING.md.

Tools

ToolThe question it answers
top_queriesWhich statements are slow or expensive server-wide? Ranks pg_stat_statements by total time, mean time, calls, rows or blocks read.
explainWhy is this statement slow? Plan tree, the nodes burning the most self time, plan warnings, and a stable plan_hash to diff against a later run.
index_healthWhich indexes can I drop, and which are missing their job? Never-scanned, duplicate, invalid and bloated indexes.
table_healthWhere is autovacuum falling behind? Dead-tuple ratio, last vacuum/analyze, sequential versus index scans and estimated bloat, per table.
lock_waitsWhy is this query hanging? The current lock wait graph β€” who is blocked, who blocks them, and any cycle that amounts to a deadlock.
connectionsWhat is the server doing right now, and how close is it to max_connections? Backends grouped by state, wait event, application, user or database, including idle-in-transaction sessions.
replicationHow far behind is the standby, and which slot is retaining WAL? Primary/standby role, per-standby lag in bytes and milliseconds, slots and the current WAL rate.
config_checkIs this server tuned sanely? pg_settings against memory, autovacuum, WAL and connection heuristics, with an ok/review/warn verdict and a note per setting.
queryEverything the other eight do not cover. One read-only SELECT/EXPLAIN/SHOW in a READ ONLY transaction, bounded by a row cap and a statement timeout, with $1..$n bind parameters.

Every tool is annotated readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, and returns a typed output schema.

query is the only tool that carries free-form SQL, and it is optional. --disable-query drops it from the catalogue entirely β€” a deployment that only needs the eight diagnostics tools can run without any ad hoc SQL surface at all. --query-schemas=public,app restricts it to named schemas instead β€” and bounds explain with it, since analyze=true executes the statement; read what that does and does not stop in docs/SECURITY.md.

Resources & prompt

ResourceContents
pgmcp://overviewThe server snapshot to start from: version, uptime, recovery state, installed extensions, per-database sizes, cache hit ratio, and connections against max_connections. Cacheable for 30s.
pgmcp://settingsThe raw pg_settings rows. Cacheable for 5m.
PromptArgumentsPurpose
diagnose_slow_querysql (required)A four-step investigation: explain the statement, check index_health/table_health on every schema in the plan's hot nodes, look for it in top_queries, then summarize root cause, evidence and a recommended index or rewrite β€” written out as text only, never run.

Configuration

Every setting has a --flag and a PGMCP_<KEY> environment variable. Flags win over the environment, which wins over the default. Configuration errors exit 2 with every offending key named in one message; runtime failures exit 1.

FlagEnvDefaultMeaning
--database-urlPGMCP_DATABASE_URLβ€” (required)Postgres connection string
--transportPGMCP_TRANSPORTstdiostdio or http
--listenPGMCP_LISTEN127.0.0.1:8080HTTP listen address
--resource-urlPGMCP_RESOURCE_URLβ€”Public origin this server is reachable at, for OAuth resource metadata
--auth-modePGMCP_AUTH_MODEnonenone, static or jwt (HTTP only)
--api-keysPGMCP_API_KEYSβ€”Comma-separated static API keys, required for static
--jwks-urlPGMCP_JWKS_URLβ€”JWK set URL, required for jwt
--jwt-issuerPGMCP_JWT_ISSUERβ€”Required iss claim, required for jwt
--jwt-audiencePGMCP_JWT_AUDIENCEβ€”Required aud claim, required for jwt
--auth-serversPGMCP_AUTH_SERVERSβ€”Comma-separated OAuth authorization servers to advertise via RFC 9728
--disable-queryPGMCP_DISABLE_QUERYfalseDrop the ad hoc query tool entirely
--query-schemasPGMCP_QUERY_SCHEMASβ€”Comma-separated schemas the query and explain tools may read; unset disables the allowlist
--max-connsPGMCP_MAX_CONNS4Maximum Postgres connections
--call-timeoutPGMCP_CALL_TIMEOUT60sPer-tool-call timeout
--rate-limitPGMCP_RATE_LIMIT60Tool calls per principal per minute (HTTP only)
--max-output-bytesPGMCP_MAX_OUTPUT_BYTES1048576Cap on a tool call's structured content
--log-levelPGMCP_LOG_LEVELinfodebug, info, warn or error
--log-formatPGMCP_LOG_FORMATtexttext or json
--insecure-no-authPGMCP_INSECURE_NO_AUTHfalseAllow auth-mode=none on a non-loopback listen address
--versionβ€”β€”Print the version and exit

The auth block applies to the HTTP transport only. Over stdio the operating system decides who the caller is: the parent process that launched the binary, and nobody else.

Security model

Read the full README β†’View source on GitHub β†’

Related MCP Servers

View all in Databases View all alternatives
  • Mysql MCP Server logoMysql MCP Server

    MySQL database integration with configurable access controls, schema inspection, and comprehensive security guidelines

    πŸ—„οΈ Databases3 views
    Compare vs Mysql MCP Server β†’
  • Genai Toolbox logoGenai Toolbox

    Open source MCP server specializing in easy, fast, and secure tools for Databases.

    πŸ—„οΈ Databases5 views
    Compare vs Genai Toolbox β†’
  • MCP Server Mysql logoMCP Server Mysql

    MySQL database integration in NodeJS with configurable access controls and schema inspection

    πŸ—„οΈ Databases3 views
    Compare vs MCP Server Mysql β†’
  • Postgres MCP logoPostgres MCP

    All-in-one MCP server for Postgres development and operations, with tools for performance analysis, tuning, and health checks

    πŸ—„οΈ Databases1 views
    Compare vs Postgres MCP β†’

Reviews

No reviews yet β€” be the first to share how this listing worked for you.

Frequently Asked Questions about Pgmcp

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "pgmcp": { "command": "npx", "args": ["-y", "pgmcp"] } }

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewPgmcp AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/pgmcp?style=directory)](https://allmcps.com/mcp/pgmcp)
HTML Embed
<a href="https://allmcps.com/mcp/pgmcp"><img src="https://allmcps.com/api/badge/pgmcp?style=directory" alt="Pgmcp on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ—„οΈDatabases
More technical detailsExpand β–Ύ
TransportSTDIO
RuntimeNode.js
Last updatedSep 7, 2026
Views0
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars0
GitHub Star CountTotal stargazers on GitHub representing community popularity (0 stars).
36Quality signal: Fair Β· 36/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools16/30
Adoption & activity1/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge β€” proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it β€” no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ—„οΈ Databases β†’Best MCP servers for Databases β†’Alternatives to Pgmcp β†’Install in Claude DesktopInstall in CursorInstall in VS Code