Skip to content
VS Code

pgops for VS Code

io.github.arzharch/pgops-mcp

Safe, audited PostgreSQL operations for AI agents: queries, migrations, EXPLAIN, containers

client:VS Code transport:stdio runtime:pypi

Install pgops in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "pgops-dsn",
      "description": "PGOPS_DSN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pgops-readonly-dsn",
      "description": "PGOPS_READONLY_DSN",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pgops-read-only",
      "description": "PGOPS_READ_ONLY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pgops-approval-mode",
      "description": "PGOPS_APPROVAL_MODE",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pgops-audit-log",
      "description": "PGOPS_AUDIT_LOG",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pgops-default-timeout-ms",
      "description": "PGOPS_DEFAULT_TIMEOUT_MS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pgops-max-timeout-ms",
      "description": "PGOPS_MAX_TIMEOUT_MS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "pgops-default-row-limit",
      "description": "PGOPS_DEFAULT_ROW_LIMIT",
      "password": true
    }
  ],
  "servers": {
    "pgops-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "pgops-mcp"
      ],
      "env": {
        "PGOPS_DSN": "${input:pgops-dsn}",
        "PGOPS_READONLY_DSN": "${input:pgops-readonly-dsn}",
        "PGOPS_READ_ONLY": "${input:pgops-read-only}",
        "PGOPS_APPROVAL_MODE": "${input:pgops-approval-mode}",
        "PGOPS_AUDIT_LOG": "${input:pgops-audit-log}",
        "PGOPS_DEFAULT_TIMEOUT_MS": "${input:pgops-default-timeout-ms}",
        "PGOPS_MAX_TIMEOUT_MS": "${input:pgops-max-timeout-ms}",
        "PGOPS_DEFAULT_ROW_LIMIT": "${input:pgops-default-row-limit}"
      }
    }
  }
}

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

pgops in other clients