Postgres DBA MCP
v0.4.3Bounded, read-only PostgreSQL access for AI assistants: ten DBA tools, compact CSV output
Values you need
| Variable | What it is | |
|---|---|---|
DATABASE_URI | required secret | PostgreSQL connection URI of the database to serve |
Docker
Requires Docker
Run in a terminal
claude mcp add postgres-dba-mcp -e 'DATABASE_URI=<DATABASE_URI>' -- docker run -i --rm -e DATABASE_URI ghcr.io/a-lafon/postgres-dba-mcp:0.4.3Add to
claude_desktop_config.json{
"mcpServers": {
"postgres-dba-mcp": {
"args": [
"run",
"-i",
"--rm",
"-e",
"DATABASE_URI",
"ghcr.io/a-lafon/postgres-dba-mcp:0.4.3"
],
"command": "docker",
"env": {
"DATABASE_URI": "<DATABASE_URI>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"postgres-dba-mcp": {
"args": [
"run",
"-i",
"--rm",
"-e",
"DATABASE_URI",
"ghcr.io/a-lafon/postgres-dba-mcp:0.4.3"
],
"command": "docker",
"env": {
"DATABASE_URI": "<DATABASE_URI>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "DATABASE_URI",
"id": "database-uri",
"password": true,
"type": "promptString"
}
],
"servers": {
"postgres-dba-mcp": {
"args": [
"run",
"-i",
"--rm",
"-e",
"DATABASE_URI",
"ghcr.io/a-lafon/postgres-dba-mcp:0.4.3"
],
"command": "docker",
"env": {
"DATABASE_URI": "${input:database-uri}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.postgres-dba-mcp]
command = "docker"
args = ["run", "-i", "--rm", "-e", "DATABASE_URI", "ghcr.io/a-lafon/postgres-dba-mcp:0.4.3"]
env = { "DATABASE_URI" = "<DATABASE_URI>" }For AI agents
- Ask the user for: DATABASE_URI. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- If it fails, check that the required runtime is installed (Docker) and that the values above are set.
Machine-readable: install.md · manifest.json