MCP server for PostgreSQL analytics — schema discovery, data exploration, relationships, performance, data quality, multi-env support
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"pg-analytics-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# pg-analytics-mcp An [MCP](https://modelcontextprotocol.io/) server for **PostgreSQL analytics** — a general-purpose "DBA-lite" toolkit that gives any MCP client (Claude Code, Cursor, etc.) instant visibility into schema structure, data quality, relationships, performance, and multi-environment comparison. ## What it does Exposes **20 read-only tools** (+ 4 optional) organised in 6 categories: ### Schema Discovery - **`database_summary`** — high-level overview: schema/table/view/FK/index counts, total size, extensions - **`scan_schemas`** — row counts for every table, grouped by schema - **`describe_table`** — column details: name, type, nullable, default, position - **`table_sizes`** — disk usage (data + indexes + toast) per table, ordered by size - **`find_tables`** — search tables by name pattern (ILIKE) - **`find_columns`** — find tables that have a column matching a pattern - **`list_empty_tables`** — quickly find tables with 0 rows - **`list_environments`** — list configured environments ### Data Exploration - **`recent_rows`** — peek at the most recent rows (auto-detects timestamp/PK ordering) - **`column_value_counts`** — distinct values and frequencies for a column - **`column_stats`** — min, max, avg, null count, distinct count for a column ### Relationships - **`list_constraints`** — all constraints (PK, unique, check, FK) for a table - **`foreign_keys`** — bidirectional FK relationships (incoming + outgoing) - **`compare_envs`** — compare row counts across DEV / STG / PROD ### Performance - **`index_usage`** — index scan stats and unused index detection - **`slow_query_candidates`** — tables with high sequential scan counts (missing index candidates) - **`bloat_estimate`** — tables with dead tuples that may need VACUUM ### Data Quality - **`table_health`** — row count + last inserted_at/updated_at for a table - **`null_report`** — null percentage for every column in a table - **`duplicate_check`** — find duplicate rows based on a set of columns…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.