Skip to main content

PostgreSQL Performance (read-only)

io.github.gouranshul/pg-perf-mcp

v0.1.0Updated Oct 10, 2026local · Docker

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

Install

Needs 2 secrets. Replace 3 placeholders with your own values.

Run in your terminal. Replace 3 placeholders.

claude mcp add pg-perf-mcp -e 'PGPERF_DB_URL=<your-pgperf-db-url>' -e PGPERF_DB_USER=mcp_readonly -e 'PGPERF_DB_PASSWORD=<your-pgperf-db-password>' -e 'MCP_API_KEY=<your-mcp-api-key>' -- docker run -i --rm -e PGPERF_DB_URL -e PGPERF_DB_USER -e PGPERF_DB_PASSWORD -e MCP_API_KEY ghcr.io/gouranshul/pg-perf-mcp:0.1.0

The registry lists extra launch arguments or environment variables for this server that could change what runs. They are left out here; check its repository before adding any.

Configuration

5 settings, 2 required secrets. Snippets use placeholders; keep real values out of shared config.

  • PGPERF_DB_PASSWORD
    Env var· required· secret
    Password of that role
  • MCP_API_KEY
    Env var· required· secret
    Bearer token clients must send, at least 16 characters (32+ random recommended)
  • PGPERF_DB_URL
    Env var· required
    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_USER
    Env var· required
    A read-only role with pg_read_all_stats and pg_monitor (see docker/init.sql)Default: mcp_readonly
  • -p
    Argument· optional
    Publish the MCP endpoint on localhost only

Listed in the official MCP Registry since Oct 10, 2026. Mirrored daily; last checked Nov 26, 2026.