Give AI assistants access to Postgres with per-user permissions and human approval for writes.
Is this your server? Claim it to get a Verified maintainer mark, your own note here, and an email when it goes down or its tools change. Free.
MCP Score How we grade
This server runs on your own machine, so there is no public endpoint to check and grade.
Connect Runs on your machine
claude mcp add pgwarden -e PGWARDEN_CONFIG=<PGWARDEN_CONFIG> -e PGWARDEN_TARGET_DSN=<PGWARDEN_TARGET_DSN> -e PGWARDEN_STATE_DSN=<PGWARDEN_STATE_DSN> -e PGWARDEN_ROLE_SECRET_FILE=<PGWARDEN_ROLE_SECRET_FILE> -e PGWARDEN_SIGNING_KEY_FILE=<PGWARDEN_SIGNING_KEY_FILE> -e PGWARDEN_SESSION_SECRET_FILE=<PGWARDEN_SESSION_SECRET_FILE> -e PGWARDEN_OIDC_CLIENT_SECRET_FILE=<PGWARDEN_OIDC_CLIENT_SECRET_FILE> -- docker run -i --rm ghcr.io/b0yko/pgwarden:0.1.1
{
"mcpServers": {
"pgwarden": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/b0yko/pgwarden:0.1.1"
],
"env": {
"PGWARDEN_CONFIG": "<PGWARDEN_CONFIG>",
"PGWARDEN_TARGET_DSN": "<PGWARDEN_TARGET_DSN>",
"PGWARDEN_STATE_DSN": "<PGWARDEN_STATE_DSN>",
"PGWARDEN_ROLE_SECRET_FILE": "<PGWARDEN_ROLE_SECRET_FILE>",
"PGWARDEN_SIGNING_KEY_FILE": "<PGWARDEN_SIGNING_KEY_FILE>",
"PGWARDEN_SESSION_SECRET_FILE": "<PGWARDEN_SESSION_SECRET_FILE>",
"PGWARDEN_OIDC_CLIENT_SECRET_FILE": "<PGWARDEN_OIDC_CLIENT_SECRET_FILE>"
}
}
}
}
{
"mcpServers": {
"pgwarden": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/b0yko/pgwarden:0.1.1"
],
"env": {
"PGWARDEN_CONFIG": "<PGWARDEN_CONFIG>",
"PGWARDEN_TARGET_DSN": "<PGWARDEN_TARGET_DSN>",
"PGWARDEN_STATE_DSN": "<PGWARDEN_STATE_DSN>",
"PGWARDEN_ROLE_SECRET_FILE": "<PGWARDEN_ROLE_SECRET_FILE>",
"PGWARDEN_SIGNING_KEY_FILE": "<PGWARDEN_SIGNING_KEY_FILE>",
"PGWARDEN_SESSION_SECRET_FILE": "<PGWARDEN_SESSION_SECRET_FILE>",
"PGWARDEN_OIDC_CLIENT_SECRET_FILE": "<PGWARDEN_OIDC_CLIENT_SECRET_FILE>"
}
}
}
}
{
"servers": {
"pgwarden": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/b0yko/pgwarden:0.1.1"
],
"env": {
"PGWARDEN_CONFIG": "<PGWARDEN_CONFIG>",
"PGWARDEN_TARGET_DSN": "<PGWARDEN_TARGET_DSN>",
"PGWARDEN_STATE_DSN": "<PGWARDEN_STATE_DSN>",
"PGWARDEN_ROLE_SECRET_FILE": "<PGWARDEN_ROLE_SECRET_FILE>",
"PGWARDEN_SIGNING_KEY_FILE": "<PGWARDEN_SIGNING_KEY_FILE>",
"PGWARDEN_SESSION_SECRET_FILE": "<PGWARDEN_SESSION_SECRET_FILE>",
"PGWARDEN_OIDC_CLIENT_SECRET_FILE": "<PGWARDEN_OIDC_CLIENT_SECRET_FILE>"
}
}
}
}
Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.
Tools
This server runs locally, so its tools are listed by your MCP client once it starts.
Environment variables
| Name | Description |
|---|---|
PGWARDEN_CONFIGRequired | Path to pgwarden.yaml inside the container. |
PGWARDEN_TARGET_DSNRequired | Target Postgres 16+ DSN: host, port and database, no user or password. |
PGWARDEN_STATE_DSNRequired, secret | State database DSN, connecting as the pgwarden_app role that `pgwarden db init` creates. |
PGWARDEN_ROLE_SECRET_FILERequired | File with the secret that derives each login role's SCRAM password. |
PGWARDEN_SIGNING_KEY_FILERequired | File with the Ed25519 key that signs access tokens. |
PGWARDEN_SESSION_SECRET_FILERequired | File with the browser session secret. |
PGWARDEN_OIDC_CLIENT_SECRET_FILERequired | File with the client secret your identity provider issued for pgwarden. |
Details
| Package | ghcr.io/b0yko/pgwarden:0.1.1 (OCI, streamable-http) |
| First published | 21 Nov 2026 |
| Last updated | 21 Nov 2026 |
| Registry name | io.github.B0yko/pgwarden |
More databases servers See all
Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.
