pgleash for VS Code
io.github.mufasil/pgleash
Postgres proxy for AI agents: read-only by default, blocks DROP and unbounded DELETE, caps rows.
client:VS Code
transport:stdio
runtime:npm
Install pgleash in VS Code
.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "pgleash-upstream",
"description": "PGLEASH_UPSTREAM",
"password": true
}
],
"servers": {
"pgleash": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"pgleash"
],
"env": {
"PGLEASH_UPSTREAM": "${input:pgleash-upstream}"
}
}
}
}
VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs