Skip to content
MCP server

PostgreSQL Performance (read-only)

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

Install
Pricing
Open source
Runs
Remotely
Version
0.1.0
Listing updated
4 days ago

About PostgreSQL Performance (read-only)

PostgreSQL Performance (read-only) is an open-source MCP server for databases. It runs as a hosted remote server, so there is nothing to install locally.

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

Install

Run in a terminal

claude mcp add pg-perf-mcp --env PGPERF_DB_URL='<PGPERF_DB_URL>' --env PGPERF_DB_USER='<PGPERF_DB_USER>' --env PGPERF_DB_PASSWORD='<PGPERF_DB_PASSWORD>' --env MCP_API_KEY='<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

Add to claude_desktop_config.json

{
  "mcpServers": {
    "pg-perf-mcp": {
      "command": "docker",
      "args": [
        "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"
      ],
      "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>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "pg-perf-mcp": {
      "command": "docker",
      "args": [
        "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"
      ],
      "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>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "pg-perf-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "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"
      ],
      "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>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "pg-perf-mcp": {
      "command": "docker",
      "args": [
        "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"
      ],
      "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>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "pg-perf-mcp": {
      "command": "docker",
      "args": [
        "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"
      ],
      "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>"
      }
    }
  }
}

Configuration

  • PGPERF_DB_URLJDBC 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/mydbRequired
  • PGPERF_DB_USERA read-only role with pg_read_all_stats and pg_monitor (see docker/init.sql)Required
  • PGPERF_DB_PASSWORDPassword of that roleRequired
  • MCP_API_KEYBearer token clients must send, at least 16 characters (32+ random recommended)Required

Pricing

Open source

PostgreSQL Performance (read-only) FAQ

Is PostgreSQL Performance (read-only) free?

Yes. PostgreSQL Performance (read-only) is open source, so you can use and self-host it for free.

How do I add PostgreSQL Performance (read-only) to Claude Code?

Run this command in your terminal: claude mcp add pg-perf-mcp --env PGPERF_DB_URL='<PGPERF_DB_URL>' --env PGPERF_DB_USER='<PGPERF_DB_USER>' --env PGPERF_DB_PASSWORD='<PGPERF_DB_PASSWORD>' --env MCP_API_KEY='<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

What are the best alternatives to PostgreSQL Performance (read-only)?

The closest alternatives to PostgreSQL Performance (read-only) are Midplane, PlatypusDB, Lorebase, Sovaria and model2data studio.

Alternatives to PostgreSQL Performance (read-only)

  1. Midplane

    MCP server

    Postgres gateway for AI agents with table grants, column masking and approval for writes

    Runs locally
    • Open source
    • 5 GitHub stars
    • Databases
  2. PlatypusDB

    MCP server

    Gives MCP clients access to your PlatypusDB database connections, scoped per agent

    Runs locally
    • Open source
    • Databases
  3. Lorebase

    MCP server

    Lets agents read and change a governed, versioned Postgres knowledge graph

    Runs locally
    • Open source
    • Knowledge and memory
  4. Sovaria

    MCP server

    Manage a Sovaria backend (Postgres, auth, storage, functions) from an AI assistant

    Not checked yet
    • 4 tools
    • Remote
    • Freemium
    • Databases
  5. Generate realistic connected test data, dbt projects and dashboards from a schema

    • Remote
    • Freemium
    • Databases
  6. semlayer

    MCP server

    Infers a semantic layer from your data warehouse and serves it to agents

    Runs locally
    • Free
    • Databases