Skip to content
VS Code

pgmcp for VS Code

io.github.pascalallen/pgmcp

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

client:VS Code transport:stdio runtime:oci

Install pgmcp in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "pgmcp-database-url",
      "description": "PGMCP_DATABASE_URL",
      "password": true
    }
  ],
  "servers": {
    "pgmcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/pascalallen/pgmcp:1.1.0"
      ],
      "env": {
        "PGMCP_DATABASE_URL": "${input:pgmcp-database-url}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

pgmcp in other clients