LocalFree

pgmcp MCP server

pascalallen/pgmcp

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

0 GitHub stars

Install pgmcp in Claude Code

Docker

Claude Code
claude mcp add pascalallen-pgmcp -e PGMCP_DATABASE_URL=... -- docker run -i --rm -e PGMCP_DATABASE_URL ghcr.io/pascalallen/pgmcp:1.1.0
mcp.json (Claude Desktop, Cursor, VS Code, Windsurf)
{
  "mcpServers": {
    "pascalallen-pgmcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "PGMCP_DATABASE_URL",
        "ghcr.io/pascalallen/pgmcp:1.1.0"
      ],
      "env": {
        "PGMCP_DATABASE_URL": "..."
      }
    }
  }
}

MCP Bundle (.mcpb)

Claude Code
curl -LO https://github.com/pascalallen/pgmcp/releases/download/v1.1.0/pgmcp_1.1.0.mcpb
mcp.json (Claude Desktop, Cursor, VS Code, Windsurf)
Download pgmcp_1.1.0.mcpb and double-click it to install in Claude Desktop.

MCP Bundles install in one click in Claude Desktop. Download the file, then open it.

Replace each ... with your own value.

Frequently asked questions

What does the pgmcp MCP server do?

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

Is the pgmcp MCP server free?

Yes, most likely. Open source and no paid account or API key is mentioned in the listing. Check the provider for current pricing.

Does pgmcp run locally or remotely?

Local. Runs on your machine (stdio). You install it with npx, uvx, Docker or from source.

How do I add pgmcp to Claude Code?

Run: claude mcp add pascalallen-pgmcp -e PGMCP_DATABASE_URL=... -- docker run -i --rm -e PGMCP_DATABASE_URL ghcr.io/pascalallen/pgmcp:1.1.0

More databases MCP servers

View all