loading…
Search for a command to run...
loading…
Read-only PostgreSQL analytics MCP server — query plans, slow queries, index usage, table bloat, vacuum status. No DDL/DML/writes. Curated by Archimedes Market
Read-only PostgreSQL analytics MCP server — query plans, slow queries, index usage, table bloat, vacuum status. No DDL/DML/writes. Curated by Archimedes Market with a verified Trust Report.
Archimedes Trust Report — VERIFIED 92/100
Verified asset on Archimedes Market. View the full 4-dimension Trust Report (security · quality · license · complexity) and the curated catalog on the asset page.
Read-only PostgreSQL analytics agent exposed as an MCP server. Designed to drop into a production database safely — no DDL, no DML, no writes ever.
Eight tools cover the observability surface most teams reach for during incident response and capacity planning:
query_plan — EXPLAIN (ANALYZE, BUFFERS, VERBOSE) against a query string, with annotated cost hot spotsslow_queries — top N queries by mean time / total time / call count from pg_stat_statementsindex_usage — index hit ratio, dead indexes, missing-index hints from pg_stat_user_indexestable_bloat — bloat estimation per table using the pgstattuple-equivalent heuristicvacuum_status — last vacuum / autovacuum / analyze per table, with wraparound risk flaggedconnection_stats — active sessions, idle-in-transaction, longest-running transactionslock_waits — blocked queries with the blocker chain resolvedsize_summary — database/schema/table/index size, sortedThe MCP server connects as a role with pg_read_all_stats and CONNECT only. The connection string in MCP_POSTGRES_DSN is validated at startup to refuse any role that has CREATE, INSERT, UPDATE, DELETE, TRUNCATE, ALTER, or DROP privileges on any schema. Refusal exits with a clear error rather than running with elevated rights.
query_plan accepts a query string but executes it inside EXPLAIN (...) only — the query itself is never run.
pip install mcp-postgres-analytics
export MCP_POSTGRES_DSN="postgresql://reader@host:5432/db"
mcp-postgres-analytics serve
Claude Desktop config:
{
"mcpServers": {
"postgres-analytics": {
"command": "mcp-postgres-analytics",
"args": ["serve"],
"env": {
"MCP_POSTGRES_DSN": "postgresql://reader@host:5432/db"
}
}
}
}
Agent: "Why is our /api/checkout endpoint slow this week?"
↓
1. slow_queries → top 5 queries by mean time
2. query_plan on the worst → spots a sequential scan
3. index_usage → confirms missing index hint
4. size_summary → confirms the table is 14GB
5. Output: "Index on orders(status, created_at) missing. ~150ms saved per call. Run during low-traffic window."
If you need write access for an agent workflow, use a separate MCP server with explicit gates. Mixing read-only analytics with write operations is exactly the kind of conflated tooling that this server was built to avoid.
MIT.
Run in your terminal:
claude mcp add mcp-postgres-analytics -- npx Yes, Postgres Analytics MCP is free — one-click install via Unyly at no cost.
No, Postgres Analytics runs without API keys or environment variables.
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
Open Postgres Analytics on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Query your database in natural language
by AnthropicA universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
by wenb1n-devThis server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
by madhurprashRead-only database access with schema inspection.
by modelcontextprotocolNot sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All data MCPs