pgwarden for VS Code
io.github.b0yko/pgwarden
Give AI assistants access to Postgres with per-user permissions and human approval for writes.
client:VS Code
transport:stdio
runtime:oci
Install pgwarden in VS Code
.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "pgwarden-config",
"description": "PGWARDEN_CONFIG",
"password": true
},
{
"type": "promptString",
"id": "pgwarden-target-dsn",
"description": "PGWARDEN_TARGET_DSN",
"password": true
},
{
"type": "promptString",
"id": "pgwarden-state-dsn",
"description": "PGWARDEN_STATE_DSN",
"password": true
},
{
"type": "promptString",
"id": "pgwarden-role-secret-file",
"description": "PGWARDEN_ROLE_SECRET_FILE",
"password": true
},
{
"type": "promptString",
"id": "pgwarden-signing-key-file",
"description": "PGWARDEN_SIGNING_KEY_FILE",
"password": true
},
{
"type": "promptString",
"id": "pgwarden-session-secret-file",
"description": "PGWARDEN_SESSION_SECRET_FILE",
"password": true
},
{
"type": "promptString",
"id": "pgwarden-oidc-client-secret-file",
"description": "PGWARDEN_OIDC_CLIENT_SECRET_FILE",
"password": true
}
],
"servers": {
"pgwarden": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/b0yko/pgwarden:0.1.1"
],
"env": {
"PGWARDEN_CONFIG": "${input:pgwarden-config}",
"PGWARDEN_TARGET_DSN": "${input:pgwarden-target-dsn}",
"PGWARDEN_STATE_DSN": "${input:pgwarden-state-dsn}",
"PGWARDEN_ROLE_SECRET_FILE": "${input:pgwarden-role-secret-file}",
"PGWARDEN_SIGNING_KEY_FILE": "${input:pgwarden-signing-key-file}",
"PGWARDEN_SESSION_SECRET_FILE": "${input:pgwarden-session-secret-file}",
"PGWARDEN_OIDC_CLIENT_SECRET_FILE": "${input:pgwarden-oidc-client-secret-file}"
}
}
}
}
VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs