PO

PostgreSQL Performance (read-only) MCP

Read-only PostgreSQL performance diagnostics: slow queries, EXPLAIN, index advice, locks, functions

not scanned Local · Streamable HTTP API key tools not listed v0.1.0
No reviews yet by gouranshulGitHub Runs on your machine, nothing hosted
—
trust score
—
calls last 7d
local
runs on your machine
—
p95 latency

What it does

Read-only PostgreSQL performance diagnosis for AI assistants. It finds the slowest queries in pg_stat_statements, summarizes EXPLAIN plans, suggests indexes and checks them with hypothetical indexes (hypopg), reports table health and lock contention, and shows the plans of the queries running inside database functions.
Read-only by design: every query is checked against a single-SELECT allowlist and runs in a read-only transaction that is always rolled back, under a read-only role, with timeouts and a row cap. Index suggestions are returned as text and never executed.
Quickstart (Docker):docker run --rm -p 127.0.0.1:8080:8080 -e PGPERF_DB_URL=jdbc:postgresql://host.docker.internal:5432/mydb -e PGPERF_DB_USER=mcp_readonly -e PGPERF_DB_PASSWORD=<role password> -e MCP_API_KEY=<32+ random characters> ghcr.io/gouranshul/pg-perf-mcp:0.1.0
Then connect your client to http://localhost:8080/mcp (Streamable HTTP) with the header Authorization: Bearer <MCP_API_KEY>.
Claude Code: claude mcp add --transport http pg-perf http://localhost:8080/mcp --header "Authorization: Bearer <MCP_API_KEY>"or install the plugin: /plugin install pg-perf --marketplace gouranshul/pg-perf-mcp
Database setup (read-only role, pg_stat_statements) and Cursor / VS Code configs: https://github.com/gouranshul/pg-perf-mcp#quickstartReport a vulnerability: https://github.com/gouranshul/pg-perf-mcp/security

Quickstart

This image runs as a local HTTP server (Streamable HTTP), not over stdio, and the port it listens on is not recorded here, so there is no line to print: start it the way its own source says, publishing that port with -p, then add its address to your client as a remote server.

Publisher
GO
gouranshul1 server
1 category
All 1 server
More in this category

See also

See all