PostgreSQL Performance (read-only) MCP server
io.github.gouranshul/pg-perf-mcp·v0.1.0Read-only PostgreSQL performance diagnostics: slow queries, EXPLAIN, index advice, locks, functions
0 stars
Reviews
Write oneNobody has reviewed PostgreSQL Performance (read-only) yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
PostgreSQL Performance (read-only) tools
No tool declarations could be read from the package source. They show once the server is installed.
Public scan report
scanner v0.1.10 · 2026-10-13 · same rubric, same numbers if you re-run it
- –Code scanpackage could not be scannedn/a
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 1 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How PostgreSQL Performance (read-only) compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 73/100
- higher than 39% of 48,255 servers
Install PostgreSQL Performance (read-only) in Claude Code, Cursor or VS Code
claude mcp add pg-perf-mcp -- docker run -i --rm ghcr.io/gouranshul/pg-perf-mcp:0.1.0
What the publisher says
From the PostgreSQL Performance (read-only) repository's README, as published. We do not edit it. Read it on GitHub
pg-perf-mcp
An MCP server that lets AI assistants diagnose PostgreSQL performance problems safely: slow queries, EXPLAIN plans, index suggestions, table health and lock contention. It is read-only by design.
A real Claude Code session against the demo shop, sped up. First it finds which database functions are slow and why. Then it explains a slow catalog query and estimates the fix with a hypothetical index. Asked to create the index, it says it can't: every tool is read-only.
Why
When a page is slow, developers paste a query into a chat and ask "why is this slow?". The assistant then guesses, because it cannot see the plan, the table sizes, the existing indexes or which queries actually dominate the load.
pg-perf-mcp gives the assistant real numbers from pgstatstatements, EXPLAIN and the catalogs, through a narrow, audited, read-only interface. It cannot change data, cannot run DDL, and never creates the indexes it recommends.
Demo
A condensed, illustrative session against the demo shop (docker compose up, then ./demo/workload.sh). Exact numbers vary from run to run:
You: The shop database feels slow. What's going on?
Claude: [top_slow_queries orderBy=total_time]
The top statement by total time is
SELECT id, status, total, created_at FROM shop.orders WHERE customer_id = $1 ORDER BY created_at DESC
(thousands of calls, the largest share of total execution time).
[explain_query sql="... WHERE customer_id = 42 ORDER BY created_at DESC"]
HIGH SEQ_SCAN_ON_LARGE_TABLE Seq Scan on shop.orders
reads all ~1.0M rows of shop.orders to apply filter (customer_id = 42); only a handful match.
[suggest_indexes]
CREATE INDEX CONCURRENTLY idx_orders_customer_id ON shop.orders (customer_id);
hypopg: the planner would use it; estimated cost drops by well over 90%.
Not executed. Review it and run it yourself, ideally off-peak.
[table_health table=shop.orders]
Autovacuum is disabled on shop.orders and ~20% of rows are dead. Re-enable autovacuum and VACUUM.
Prioritized actions: 1) add the index above (orders.customer_id is a foreign key with no index),
2) re-enable autovacuum on shop.orders, 3) ...Architecture
flowchart LR
A["AI assistant<br/>(Claude Code, Claude Desktop, ...)"] -- "MCP over streamable HTTP<br/>Authorization: Bearer key" --> F["API key filter<br/>(constant-time)"]
F --> M["MCP tools / resources / prompt<br/>Spring AI 2.0 annotations"]
M --> R["ToolRunner<br/>audit log · metrics · safe errors"]
R --> G["SqlGuard<br/>PG lexer + JSqlParser"]
G --> E["ReadOnlyExecutor<br/>READ ONLY tx · always rollback<br/>statement/lock timeout · row cap"]
R --> AN["analysis<br/>PlanAnalyzer · IndexAdvisor<br/>(pure functions)"]
E --> P[("PostgreSQL 18<br/>role mcp_readonly<br/>pg_stat_statements · hypopg")]Tools
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
PostgreSQL Performance (read-only): common questions
- Is PostgreSQL Performance (read-only) MCP server safe?
- Mostly: it is graded B (73/100). Read the PostgreSQL Performance (read-only) safety report
- How do I install PostgreSQL Performance (read-only)?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does PostgreSQL Performance (read-only) need an API key?
- Yes. The registry entry asks for
PGPERF_DB_PASSWORD,MCP_API_KEY. - Is PostgreSQL Performance (read-only) maintained?
- The last commit was 23 days ago (2026-10-12). The latest release is v0.1.0.
- What can I use instead of PostgreSQL Performance (read-only)?
- Servers from other publishers that do the same job: CPU Performance Engineering MCP server.
Alternatives to PostgreSQL Performance (read-only)
Same job from other publishers: the closest match first, then the best rated.
- CPU Performance EngineeringA CPU performance engineering brain: a vetted reading list, benchmarks and cited source passagesnot reviewedEstablishedA