Skip to content
PluginStats

@yawlabs/postgres-mcp weekly downloads statistics

By yawlabs (2 listings) · npm · Claude Code

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

View on npm Fresh · Oct 17, 2026

@yawlabs/postgres-mcp has 1,177 recorded weekly downloads on npm, a decrease of 71.7% over the past 30 days.

It ranks #1364 of 2,251 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -40.6%.

PluginStats has 543 daily observations since Apr 23, 2025; the latest is from Oct 17, 2026.

Weekly downloads
1,177
Official API · Oct 17, 2026
7-day growth
-29.8%
-499 weekly downloads
30-day growth
-71.7%
-3K weekly downloads
90-day growth
-40.6%
-803 weekly downloads
Rank
#1364
Among tracked npm listings

About @yawlabs/postgres-mcp

@yawlabs/postgres-mcp

One click adds this to your local Yaw MCP config so it's available in every Yaw Terminal session. Or install manually below.

Query a PostgreSQL database from Claude Code, Cursor, and any MCP client. Read-only by default - writes opt in via a single env var - so an agent can't silently drop your tables.

Built and maintained by Yaw Labs.

What's new in 0.12

An index advisor, opt-in audit logging, structured tool output, and support for current-revision MCP clients. Full detail in the CHANGELOG.

• pg_index_advisor recommends indexes for a workload and keeps only the ones that measurably lower estimated cost. Candidates are costed with HypoPG hypothetical indexes, never created on disk, and the search knows that PostgreSQL 18's skip scan changes which multi-column indexes are useful. • Opt-in audit logging of the SQL tools send: one JSON line per audited statement, to stderr or a file. Bound parameter values are never recorded. Off by default, and not a complete record -- see Audit logging. • Structured tool output. Every tool declares an outputSchema and returns structuredContent alongside the unchanged text block, so anything reading the text today keeps working. • Both MCP protocol eras. The server used to speak only the legacy (2025) protocol revisions, which a client on the current 2026-07-28 revision fails against. It now serves both.

On 0.12.0? Upgrade. 0.12.1 closes a stacked-query hole in pg_index_advisor: SQL passed in its statements argument ran on a protocol that accepts several commands in one string, so SELECT 1; COMMIT; DROP SCHEMA public CASCADE; escaped the read-only transaction. The tool is annotated read-only, so hosts often auto-allow it. The same release stops pg_inspect_locks attributing a lock held in another database to whichever local table shares its OID, fixes the advisor's greedy search, and makes audit lines carry the tool field they were missing.

Coming from 0.10.x? 0.11.0 has three breaking changes: pg_seq_scan_tables, pg_unused_indexes and pg_top_queries return an envelope (read data.rows where you used to read data), pg_explain with analyze: true emits BUFFERS (pass buffers: false for the old output), and Node 22 is the floor. Details in the 0.11.0 changelog entry.

Backstory

Anthropic's reference Postgres MCP server, @modelcontextprotocol/server-postgres, was archived in May 2025 and marked deprecated on npm in July 2025. Anthropic has not shipped a replacement. Despite the deprecation, the last published version (v0.6.2) is still pulled ~20,000 times per week - a lot of agents are pointed at an unmaintained package.

That unmaintained package also has a known, publicly documented stacked-query SQL injection (Datadog Security Labs) that bypasses its BEGIN READ ONLY wrapper with input like COMMIT; DROP SCHEMA public CASCADE;. It has never been patched at npm.

A handful of community forks have appeared, but each fills a narrow slice:

• @zeddotdev/postgres-context-server - Zed's fork, primarily a security patch on the original shape. • Postgres MCP Pro (Crystal DBA) - focused on index tuning and hypothetical-index / buffer-cache diagnostics. • AWS Labs Postgres MCP - tied to Aurora / RDS Data API + Secrets Manager.

None of them position themselves as a general-purpose daily driver you'd hand to Claude Code or Cursor against an arbitrary Postgres: modern introspection, perf helpers, role/privilege awareness, and a write-safety posture out of the box. That's the gap @yawlabs/postgres-mcp fills.

Why this one?

• Read-only by default, with an unconditional read-only tool too - pg_query runs user SQL in a BEGIN READ ONLY transaction, so postgres itself (not string parsing) blocks writes; opt in to writes with ALLOW_WRITES=1. pg_readonly is a separate tool that stays read-only regardless of ALLOW_WRITES, so hosts that gate tools individually (Claude Code permissions, mcp.hosting) can auto-allow it -- paired with a least-privileged role, since READ ONLY bounds writes to the database rather than every side effect (details). • Role-based access as the primary control - the recommended posture is to use a least-privileged postgres role in DATABASE_URL (e.g. one with GRANT pg_read_all_data); postgres itself then enforces the boundary, no env var needed. See Configuring access. • Extended query protocol for all user SQL - pg_query sends user input with queryMode: 'extended', which restricts each request to a single statement. This closes the stacked-query injection class (COMMIT; DROP SCHEMA x CASCADE;) that defeated the reference server's BEGIN READ ONLY wrapper. Integration test asserts the rejection. • Parameterized queries - pg_query takes a params array for $1, $2, etc. No string-interpolated SQL in our code path. • Written from scratch, actively maintained - not a fork of the deprecated code. Unit + integration tests (npm test, npm run test:integration) run against a real Postgres; releases cut via release.sh. • Schema introspection built in - pg_list_schemas, pg_list_tables, pg_describe_table return columns, primary keys, foreign keys, and indexes without the agent having to remember pg_catalog joins. • EXPLAIN as a first-class tool - text or JSON format, with optional ANALYZE. ANALYZE for non-SELECT statements requires ALLOW_WRITES=1 and always rolls back, so the plan is real but the written rows don't persist. (What Postgres never rolls back still sticks: a sequence the statement advanced stays advanced.) • Perf diagnostics the deprecated server never had - pg_top_queries (from pg_stat_statements), pg_seq_scan_tables, pg_unused_indexes, pg_table_bloat, pg_inspect_locks, pg_replication_status. Answer "why is this slow?" in one tool call. • Health snapshot - pg_health returns version, db size, connection counts, and the 10 longest-running active queries in one call. • Role and privilege awareness - pg_list_roles and pg_table_privileges for the common "who can touch what?" questions. • Instant startup - ships as a single bundled…

Description from the npm listing.

  • postgres
  • postgresql
  • database
  • mcp
  • mcp-server
  • model-context-protocol
  • ai
  • agent
  • claude
  • claude-code
  • cursor
  • llm
  • sql
  • schema
  • explain
  • dba
  • index-advisor
  • query-optimization
  • ai-agents

Where @yawlabs/postgres-mcp sits in the listing

Each band is one page of 20. Weekly downloads on a log scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

All npm2,248 listings · 113 pages · page 69, #5 (overall #1365)
All npm: every listing in weekly downloads order
PNG SVG
Claude Code233 listings · 12 pages · page 8, #18 (overall #158)
Claude Code: every listing in weekly downloads order
PNG SVG

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@yawlabs/postgres-mcp weekly downloads on npm, last 90 days: 1,177 weekly downloads as of Oct 17, 2026, -40.6% over 90 days.@yawlabs/postgres-mcpWeekly downloads on npm · Last 90 days1,177downloads / week-40.6% over 90 days05K10K15K20K25K30KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
@yawlabs/postgres-mcp weekly downloads on npm, last 90 days: 1,177 weekly downloads as of Oct 17, 2026, -40.6% over 90 days.
PNG SVG

7/30/90-day growth

@yawlabs/postgres-mcp weekly downloads growth on npm: -29.8% over 7 days, -71.7% over 30 days, -40.6% over 90 days.@yawlabs/postgres-mcpWeekly downloads growth on npm1,177downloads / week now7-day growth-499 weekly downloads-29.8%30-day growth-2,985 weekly downloads-71.7%90-day growth-803 weekly downloads-40.6%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@yawlabs/postgres-mcp weekly downloads growth on npm: -29.8% over 7 days, -71.7% over 30 days, -40.6% over 90 days.
PNG SVG

Ranking history

@yawlabs/postgres-mcp npm ranking history: currently #1364 (by weekly downloads).@yawlabs/postgres-mcpnpm ranking · by weekly downloads · Last 90 days#1364current rank#400#600#800#1000#1200#1400Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 17, 2026 – Oct 18, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
@yawlabs/postgres-mcp npm ranking history: currently #1364 (by weekly downloads).
PNG SVG

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Recent observations

Full history (543)
Recent weekly downloads observations for @yawlabs/postgres-mcp
Date (UTC)Weekly downloadsChange vs. previous
1,177-142
1,319+45
1,274-309
1,583-685
2,2680
2,268+266
2,002+326
1,676-83
1,759-198
1,957-146
2,103-199
2,302-888
3,190-845
4,035—

Similar npm Claude Code plugins

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@yawlabs/postgres-mcp. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.