Skip to content
MCP server
Registry

PostgreSQL MCP Server

PostgreSQL MCP server - query, schema introspection, explain, and health checks for AI assistants

PostgreSQL MCP Server scores 53 (Fair), licensed MIT and written in TypeScript. It installs as a local process. It declares 23 tools. Filed under Databases, AI and memory. GitHub shows 12 stars. Package registries report about 4,082 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by yawlabsMITTypeScript12 stars
Trust score
53Fair
Trust score 53 of 100, Fair

Fair trust

53 of 100 from six public signals. Nobody can buy a point.

  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 53 comes from

0 + 20 + 10 + 10 + 10 + 3 = 53. Each factor is capped, so no single signal can carry a listing.

Registry0 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 0 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity10 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 10 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security10 / 10

Not archived, a secure install path, a pinned version.

Security: 10 of 10 points.
Docs3 / 10

A real summary, a README with depth, listed tools.

Docs: 3 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "yawlabs-postgres-mcp": {      "command": "npx",      "args": [        "-y",        "@yawlabs/postgres-mcp@0.14.3"      ]    }  }}

Environment variables

This server does not declare environment variables.

Tools23Tool docs quality grade C

All capabilities
  • Rolled-up DBA lints in one call: sequence-exhaustion candidates (each sequence, ascending or descending, against the bound it is heading for, narrowed to the owning column's range when a smallint or integer column owns it -- the pre-PG10 SE

  • Kind, columns, PK, outgoing FKs, incoming FKs (referencedby), CHECK / UNIQUE / EXCLUDE constraints, indexes, and partition parent/children for a relation. Generated and identity columns are flagged (generated, identity, generationexpression

  • EXPLAIN or EXPLAIN ANALYZE for a SQL statement. Text or JSON output. Planner options: buffers (on by default with analyze), settings, verbose, wal, costs, timing, plus genericplan (PG16+, plan a parameterized query with no values) and memor

  • Server version, database size, connections against maxconnections, active queries with wait events and transaction age, pgstatdatabase rollup (deadlocks, temp files, cache hit ratio), table count.

  • Recommend indexes for a workload and prove each one pays for itself first. Takes statements you pass or the top N from pgstatstatements, harvests candidate columns from what the planner reports as filters / join keys / sort keys (no SQL par

  • Who is blocking whom right now (blocked PID, blocker PID, lock type, queries).

  • I/O observability: pgstatio read/write/extend/fsync counts, bytes and times per backend type and context (PG16+), plus in-flight async I/O handles from pgaios and the active iomethod (PG18+).

  • Cancel a running query or terminate a backend connection. Requires ALLOWWRITES=1.

  • List installed extensions (pgvector, postgis, pgstatstatements, etc.) with versions.

  • List functions, procedures, and aggregates in a schema with signatures and return types.

  • Database roles with login/superuser/createdb flags and group memberships.

  • List non-system schemas.

About

PostgreSQL MCP server, read-only by default: query, schema introspection, EXPLAIN plans, index advisor, and DBA health checks.

Frequently asked questions

What is PostgreSQL MCP Server?

PostgreSQL MCP server - query, schema introspection, explain, and health checks for AI assistants

How do I install PostgreSQL MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. PostgreSQL MCP Server runs locally from the npm package @yawlabs/postgres-mcp with the command npx -y @yawlabs/postgres-mcp@0.14.3.

Is PostgreSQL MCP Server free and open source?

Yes. PostgreSQL MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does PostgreSQL MCP Server support remote (HTTP) connections?

No remote endpoint is listed for PostgreSQL MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does PostgreSQL MCP Server provide?

PostgreSQL MCP Server provides 23 tools, including pg_advisor, pg_describe_table, pg_explain, and pg_health. See the full tool list for descriptions and parameters.

How is PostgreSQL MCP Server's trust score calculated?

PostgreSQL MCP Server scores 53 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server