Read-only PostgreSQL performance diagnostics: slow queries, EXPLAIN, index advice, locks, functions
Connect Runs on your machine
claude mcp add pg-perf-mcp -e PGPERF_DB_URL=<PGPERF_DB_URL> -e PGPERF_DB_USER=<PGPERF_DB_USER> -e PGPERF_DB_PASSWORD=<PGPERF_DB_PASSWORD> -e MCP_API_KEY=<MCP_API_KEY> -- docker run -i --rm ghcr.io/gouranshul/pg-perf-mcp:0.1.0
{
"mcpServers": {
"pg-perf-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/gouranshul/pg-perf-mcp:0.1.0"
],
"env": {
"PGPERF_DB_URL": "<PGPERF_DB_URL>",
"PGPERF_DB_USER": "<PGPERF_DB_USER>",
"PGPERF_DB_PASSWORD": "<PGPERF_DB_PASSWORD>",
"MCP_API_KEY": "<MCP_API_KEY>"
}
}
}
}
{
"mcpServers": {
"pg-perf-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/gouranshul/pg-perf-mcp:0.1.0"
],
"env": {
"PGPERF_DB_URL": "<PGPERF_DB_URL>",
"PGPERF_DB_USER": "<PGPERF_DB_USER>",
"PGPERF_DB_PASSWORD": "<PGPERF_DB_PASSWORD>",
"MCP_API_KEY": "<MCP_API_KEY>"
}
}
}
}
{
"servers": {
"pg-perf-mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/gouranshul/pg-perf-mcp:0.1.0"
],
"env": {
"PGPERF_DB_URL": "<PGPERF_DB_URL>",
"PGPERF_DB_USER": "<PGPERF_DB_USER>",
"PGPERF_DB_PASSWORD": "<PGPERF_DB_PASSWORD>",
"MCP_API_KEY": "<MCP_API_KEY>"
}
}
}
}
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 |
|---|---|
PGPERF_DB_URLRequired | JDBC URL of the database to diagnose. From inside the container, use host.docker.internal for a database on your machine, e.g. jdbc:postgresql://host.docker.internal:5432/mydb |
PGPERF_DB_USERRequired | A read-only role with pg_read_all_stats and pg_monitor (see docker/init.sql) |
PGPERF_DB_PASSWORDRequired, secret | Password of that role |
MCP_API_KEYRequired, secret | Bearer token clients must send, at least 16 characters (32+ random recommended) |
Details
| Package | ghcr.io/gouranshul/pg-perf-mcp:0.1.0 (OCI, streamable-http) |
| First published | 10 Oct 2026 |
| Last updated | 10 Oct 2026 |
| Registry name | io.github.gouranshul/pg-perf-mcp |
More databases servers See all
Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.
