Read-only Postgres ops/DBA diagnostics: slow queries, EXPLAIN, locks, index and table health.
Connect Runs on your machine
claude mcp add pgmcp -e PGMCP_DATABASE_URL=<PGMCP_DATABASE_URL> -- docker run -i --rm ghcr.io/pascalallen/pgmcp:1.1.0
{
"mcpServers": {
"pgmcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/pascalallen/pgmcp:1.1.0"
],
"env": {
"PGMCP_DATABASE_URL": "<PGMCP_DATABASE_URL>"
}
}
}
}
{
"mcpServers": {
"pgmcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/pascalallen/pgmcp:1.1.0"
],
"env": {
"PGMCP_DATABASE_URL": "<PGMCP_DATABASE_URL>"
}
}
}
}
{
"servers": {
"pgmcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/pascalallen/pgmcp:1.1.0"
],
"env": {
"PGMCP_DATABASE_URL": "<PGMCP_DATABASE_URL>"
}
}
}
}
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 |
|---|---|
PGMCP_DATABASE_URLRequired, secret | Postgres connection string (read-only role recommended) |
Details
| Package | ghcr.io/pascalallen/pgmcp:1.1.0 (OCI, stdio) |
| Package | https://github.com/pascalallen/pgmcp/releases/download/v1.1.0/pgmcp_1.1.0.mcpb (MCPB, stdio) |
| First published | 20 Aug 2026 |
| Last updated | 20 Aug 2026 |
| Registry name | io.github.pascalallen/pgmcp |
More databases servers See all
Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.
