Skip to content
Cursor

pgmcp for Cursor

io.github.pascalallen/pgmcp

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

client:Cursor transport:stdio runtime:oci

Install pgmcp in Cursor

~/.cursor/mcp.json · windows: %USERPROFILE%\.cursor\mcp.json

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "pgmcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/pascalallen/pgmcp:1.1.0"
      ],
      "env": {
        "PGMCP_DATABASE_URL": "<PGMCP_DATABASE_URL>"
      }
    }
  }
}

Use .cursor/mcp.json in a project root instead to scope it to that project. Cursor merges both. Cursor docs

pgmcp in other clients