Skip to main content
Glama

20 Best PostgreSQL MCP Servers, Compared (September 2026)

Updated 20 of 1,109 PostgreSQL servers in the Glama registryRebuilt weekly

The short answer

Postgres MCP (crystaldba/postgres-mcp) is the server most readers should install: it is built to support PostgreSQL work across development, testing, deployment, and production, and it combines explain plans, index recommendations, and health checks in one server. It exposes 9 tools, its tool descriptions are graded A, it is labelled a community favourite, and its last commit was 15 days ago. If your only job this afternoon is to let Claude Code or Cursor query and explore a PostgreSQL schema, DBHub is the better answer because it accepts a Postgres DSN and had 84 commits in the last 12 weeks.

Whichever you choose, give it the narrowest access that still works (a read-only credential, a replica, a scratch account), and widen it only once you have watched what your agent actually asks for.

Glama operates the MCP registry these numbers are measured from, and sells MCP hosting and a gateway. No position on this page is paid for. How the registry is built.

Quick picks

  • 1Postgres MCP : Production PostgreSQL tuning and maintenance: this server combines explain plans, index recommendations, and health checks in one MCP server.
  • 2pg-aiguide : For an AI coding assistant writing PostgreSQL code that needs current, version-aware documentation: pg-aiguide provides semantic search across the PostgreSQL, TimescaleDB, and PostGIS manuals.
  • 3pgEdge Postgres MCP Server : Internal developer workflows on PostgreSQL 14 and higher: its natural language agent converts natural language into SQL.
  • 4PostgreSQL MCP Server : Teams that need controlled PostgreSQL administration through an AI assistant: it exposes schema, RLS, and user tools behind a readonly-by-default security mode.
  • 5DBHub : PostgreSQL users who want to query and explore schema through Claude Code or Cursor: DBHub exposes execute_sql and search_objects and accepts a Postgres DSN.

Which one, for your situation

Your situationWhat to use
I need production tuning, explain plans, index recommendations, and health checks.Postgres MCP (crystaldba/postgres-mcp) combines explain plans, index recommendations, and health checks in one server built for production PostgreSQL tuning and maintenance.
Query and explore schema from Claude Code or Cursor.DBHub is built for PostgreSQL users who want to query and explore schema through Claude Code or Cursor and accepts a Postgres DSN.
I want read-only database analysis with a quick npx setup.Postgres MCP Server (ericzakariasson/pg-mcp-server) installs with npx, requires only DATABASE_URL, and is for read-only database analysis.
I'm a DBA monitoring locks, vacuum, bloat, replication, and WAL.MCP PostgreSQL Operations provides read-only monitoring tools covering locks, vacuum, bloat, replication, WAL, and query analysis.
Is my PostgreSQL version safe, and where should I upgrade?pg-cve-mcp exposes CVE lists, version comparisons, yanked releases, exploits, and upgrade paths for any PostgreSQL version.
I need governed, auditable database access for AI agents.GraphJin provides schema discovery, query validation, and an execution ledger for governed, auditable database access.

Top MCP servers for PostgreSQL

Best forProfile
1Production PostgreSQL tuning and maintenance: this server combines explain plans, index recommendations, and health checks in one MCP server.Community favourite3,207+10315 days ago81.4
2For an AI coding assistant writing PostgreSQL code that needs current, version-aware documentation: pg-aiguide provides semantic search across the PostgreSQL, TimescaleDB, and PostGIS manuals.Community favourite1,814+2365 days ago78.2
3Internal developer workflows on PostgreSQL 14 and higher: its natural language agent converts natural language into SQL.Steady219+114 days ago73.6
4Teams that need controlled PostgreSQL administration through an AI assistant: it exposes schema, RLS, and user tools behind a readonly-by-default security mode.Community favourite198+368 days ago73.3
5PostgreSQL users who want to query and explore schema through Claude Code or Cursor: DBHub exposes execute_sql and search_objects and accepts a Postgres DSN.Community favourite3,388+18310 days ago70.3
6Self-hosting a full backend with Postgres and AI agents: the MCP server exposes tools for RLS, auth, storage, functions, realtime, KV, AI gateway, and RAG.Community favourite3,322+524today70.0
7Production PostgreSQL monitoring for DBAs: read-only tools cover locks, vacuum, bloat, replication, WAL, and query analysis.Steady161+531 days ago69.5
8A developer starting a new Prisma Next project on PostgreSQL: the scaffolder wires in Prisma Next and registers AI agent skills.Community favourite47,566+272 days ago66.0
9Teams already using DBCode for PostgreSQL in VS Code: its built-in MCP server gives AI agents access to existing connections, schemas, and query execution.Community favourite340+213 days ago60.3
10For adding PostgreSQL indexes from an AI coding assistant: it exposes postgres_index_suggestions, which generates CREATE INDEX CONCURRENTLY SQL with partial and ANALYZE variants.Community favourite20+12 days ago57.9
11An afternoon PostgreSQL MCP setup for read-only database analysis: it installs with npx, requires only DATABASE_URL, and documents a query tool plus table/schema resources.Abandoned but popular181+2300 days ago57.5
12Teams already using DBX who need MCP access for natural language queries and database management.Community favourite17,423+5,035today57.5
13Teams standardizing on one natural-language MCP data access layer for PostgreSQL alongside other databases; it connects via MCP and HTTP and defaults to read-only.Abandoned but popular908+33166 days ago55.3
14Teams that need to connect AI agents and IDEs to PostgreSQL: this server's prebuilt generic tools provide schema discovery and SQL execution without custom code.Community favourite16,272+1962 days ago54.4
15AI agents running multi-step PostgreSQL administration tasks: Code Mode executes operations in a V8 isolate to reduce token overhead.Steady12+1today54.0
16Exploring an unfamiliar PostgreSQL database before writing SQL: it exposes schema, table, column, ERD, and starter-query tools.Community favourite5,017+31today53.3
17AI agents working against PostgreSQL that need governed, auditable database access: GraphJin provides schema discovery, query validation, and an execution ledger.Community favourite3,152+23today53.0
18Multiple PostgreSQL databases in one AI session: it can connect to several at once and exposes read-only query, explain, and schema discovery resources.Abandoned but popular5400354 days ago52.7
19Deciding whether a PostgreSQL version is safe or where to upgrade: it exposes CVE lists, version comparisons, yanked releases, exploits, and upgrade paths.Steady0013 days ago50.7
20Teams running a self-hosted wiki that want agents to search, read, and write it: the built-in MCP server exposes page, search, backlink, and research tools.Emerging55+133 days ago48.5

The ranking, with the evidence

Each position is a weighted mean of adoption (40%), maintenance (24%), momentum (14%), tool description quality (13%) and trust (9%), multiplied by three attenuators: how directly the server is about PostgreSQL (named for it, declaring it, tagged with it, or merely mentioning it), whether its repository is still moving, and how much independent evidence of adoption it has. Open the score on any entry to see every number, including the ones marked ≈, which were imputed from the median of the other candidates rather than measured. The maintenance grade on each entry is mostly issue responsiveness, release recency and open security alerts rather than commits, so a recent commit beside a low grade is two different measurements rather than a contradiction.

  • Abandoned but popular: People use it, but its default branch has stopped moving. Fine to keep running, risky to adopt.
  • Community favourite: Widely adopted and still actively maintained.
  • Dormant: Neither changing nor widely adopted. Here because it still matches the search.
  • Emerging: Small audience, growing quickly, maintained. The bet with the most upside.
  • Steady: Maintained, modest audience, no surprises in either direction.
  • 1

    Postgres MCP

    Community favouriteNo change
    crystaldba/postgres-mcp ↗

    Best for: Production PostgreSQL tuning and maintenance: this server combines explain plans, index recommendations, and health checks in one MCP server.

    It exposes nine tools for schema inspection, query planning, index analysis, database health checks, top query reporting, and SQL execution. A requirement to weigh: it must be configured with a DATABASE_URI and run under Docker or Python 3.12 or higher.

    GitHub stars
    3,207
    Stars / 30 days
    +103
    npm / typical week
    Ships no npm package
    Tools exposed
    9
    Last commit
    15 days ago
    Commits / 12 weeks
    1
    Maintenance grade
    D
    Tool descriptions
    A
    Score 81.4: show every number behind it
    • Adoption88 / 100 · weight 40%
      • GitHub stars88
      • npm downloadsnot measured
        no npm package
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance71 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade30
      • Commit cadence40
    • Momentum76 / 100 · weight 14%
      • Stars gained, relative to size72
      • Stars gained, absolute81
      • npm download trendnot measured
        no npm download history
    • Tool quality76 / 100 · weight 13%
      • Tool description quality68
      • Built and inspected by Glama100
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    81.4
    × relevance: the keyword is dedicated here
    1.00
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    81.4
  • 2

    pg-aiguide

    Community favouriteNo change
    timescale/pg-aiguide ↗

    Best for: For an AI coding assistant writing PostgreSQL code that needs current, version-aware documentation: pg-aiguide provides semantic search across the PostgreSQL, TimescaleDB, and PostGIS manuals.

    pg-aiguide is an HTTP MCP server that gives AI coding assistants semantic search over PostgreSQL, TimescaleDB, and PostGIS documentation through the public endpoint at mcp.tigerdata.com/docs. The dependency to know before choosing it is TigerData's hosted endpoint, which assumes network access to that URL and not a locally run server.

    GitHub stars
    1,814
    Stars / 30 days
    +23
    npm / typical week
    49
    Tools exposed
    never inspected
    Last commit
    65 days ago
    Commits / 12 weeks
    6
    Maintenance grade
    C
    Tool descriptions
    Not graded
    Score 78.2: show every number behind it
    • Adoption84 / 100 · weight 40%
      • GitHub stars81
      • npm downloads18
        downloads show none of the weekday rhythm human traffic has; halved
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance75 / 100 · weight 24%
      • Last commit touching this server88
        dated from the last commit on the default branch, re-read from GitHub at publication; github.com shows a push 3 days ago, which counts every ref
      • Repository maintenance grade55
      • Commit cadence65
    • Momentum62 / 100 · weight 14%
      • Stars gained, relative to size45
      • Stars gained, absolute56
      • npm download trend100
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integrates100
    Weighted mean of the five
    78.2
    × relevance: the keyword is dedicated here
    1.00
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    78.2
  • Best for: Internal developer workflows on PostgreSQL 14 and higher: its natural language agent converts natural language into SQL.

    The server enables SQL queries against PostgreSQL through MCP-compatible clients and provides a natural language agent that forms SQL from natural language. It is not intended for public-facing applications: it gives LLMs read access to the entire database schema and data, so it fits internal tools, developer workflows, or trusted environments.

    GitHub stars
    219
    Stars / 30 days
    +11
    npm / typical week
    Ships no npm package
    Tools exposed
    never inspected
    Last commit
    4 days ago
    Commits / 12 weeks
    142
    Maintenance grade
    A
    Tool descriptions
    Not graded
    Score 73.6: show every number behind it
    • Adoption59 / 100 · weight 40%
      • GitHub stars59
      • npm downloadsnot measured
        no npm package
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance100 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade100
      • Commit cadence100
    • Momentum60 / 100 · weight 14%
      • Stars gained, relative to size71
      • Stars gained, absolute43
      • npm download trendnot measured
        no npm download history
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integrates100
    Weighted mean of the five
    73.6
    × relevance: the keyword is dedicated here
    1.00
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    73.6
  • Best for: Teams that need controlled PostgreSQL administration through an AI assistant: it exposes schema, RLS, and user tools behind a readonly-by-default security mode.

    The server exposes 18 tools covering schema, functions, triggers, indexes, constraints, RLS, users, queries, SQL, comments, import/export, and monitoring. It is read-only by default, so operators must pass --security-mode (and --allow-destructive for drops) to enable writes, DDL, admin actions, or arbitrary SQL.

    GitHub stars
    198
    Stars / 30 days
    +3
    npm / typical week
    2.3K
    Tools exposed
    18
    Last commit
    68 days ago
    Commits / 12 weeks
    12
    Maintenance grade
    B
    Tool descriptions
    B
    Score 73.3: show every number behind it
    • Adoption80 / 100 · weight 40%
      • GitHub stars57
      • npm downloads71
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance85 / 100 · weight 24%
      • Last commit touching this server88
      • Repository maintenance grade80
      • Commit cadence85
    • Momentum26 / 100 · weight 14%
      • Stars gained, relative to size36
      • Stars gained, absolute23
      • npm download trend9
    • Tool quality63 / 100 · weight 13%
      • Tool description quality55
      • Built and inspected by Glama100
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    73.3
    × relevance: the keyword is dedicated here
    1.00
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    73.3
  • 5

    DBHub

    Community favourite▲ 1
    bytebase/dbhub ↗

    Best for: PostgreSQL users who want to query and explore schema through Claude Code or Cursor: DBHub exposes execute_sql and search_objects and accepts a Postgres DSN.

    DBHub is an MCP server that connects clients such as Claude Code, Cursor, VS Code, and Copilot CLI to PostgreSQL and other databases, exposing execute_sql, search_objects, and optional explain_sql and health_check tools. Before choosing it, note that the npm distribution requires Node.js 22.5.0 or newer.

    GitHub stars
    3,388
    Stars / 30 days
    +183
    npm / typical week
    downloads not counted
    Tools exposed
    never inspected
    Last commit
    10 days ago
    Commits / 12 weeks
    84
    Maintenance grade
    A
    Tool descriptions
    Not graded
    Score 70.3: show every number behind it
    • Adoption88 / 100 · weight 40%
      • GitHub stars88
      • npm downloadsnot measured
        npm names no repository for dbhub, so its downloads cannot be attributed
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance100 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade100
      • Commit cadence100
    • Momentum93 / 100 · weight 14%
      • Stars gained, relative to size95
      • Stars gained, absolute91
      • npm download trendnot measured
        no npm download history
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    90.1
    × relevance: the keyword is declared here
    0.78
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    70.3
  • Best for: Self-hosting a full backend with Postgres and AI agents: the MCP server exposes tools for RLS, auth, storage, functions, realtime, KV, AI gateway, and RAG.

    Butterbase is a self-hosted Postgres runtime whose MCP server exposes tools for data, RLS, auth, file storage, serverless TypeScript functions, durable objects, realtime, KV, AI gateway, and RAG over HTTP at /mcp or stdio via npx @butterbase/mcp. Before choosing it, know that no npm package is published, so the advertised stdio entry point was not installable at publication, and self-hosting requires Docker, Node 22+, and npm.

    GitHub stars
    3,322
    Stars / 30 days
    +524
    npm / typical week
    Ships no npm package
    Tools exposed
    never inspected
    Last commit
    today
    Commits / 12 weeks
    292
    Maintenance grade
    B
    Tool descriptions
    Not graded
    Score 70.0: show every number behind it
    • Adoption88 / 100 · weight 40%
      • GitHub stars88
      • npm downloadsnot measured
        no npm package
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance95 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade80
      • Commit cadence100
    • Momentum100 / 100 · weight 14%
      • Stars gained, relative to size100
      • Stars gained, absolute100
      • npm download trendnot measured
        no npm download history
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integrates100
    Weighted mean of the five
    89.7
    × relevance: the keyword is declared here
    0.78
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    70.0
  • Best for: Production PostgreSQL monitoring for DBAs: read-only tools cover locks, vacuum, bloat, replication, WAL, and query analysis.

    The server exposes 34 read-only tools for PostgreSQL operations, including lock state, WAL status, replication, vacuum and autovacuum activity, bloat analysis, index and I/O statistics, and schema relationships. It supports PostgreSQL 12-18 with regular user permissions, but advanced query analysis is enhanced when pg_stat_statements and optionally pg_stat_monitor are installed.

    GitHub stars
    161
    Stars / 30 days
    +5
    npm / typical week
    Ships no npm package
    Tools exposed
    34
    Last commit
    31 days ago
    Commits / 12 weeks
    20
    Maintenance grade
    B
    Tool descriptions
    A
    Score 69.5: show every number behind it
    • Adoption55 / 100 · weight 40%
      • GitHub stars55
      • npm downloadsnot measured
        no npm package
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance92 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade80
      • Commit cadence85
    • Momentum42 / 100 · weight 14%
      • Stars gained, relative to size50
      • Stars gained, absolute30
      • npm download trendnot measured
        no npm download history
    • Tool quality81 / 100 · weight 13%
      • Tool description quality73
      • Built and inspected by Glama100
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    69.5
    × relevance: the keyword is dedicated here
    1.00
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    69.5
  • 8

    Prisma MCP Server

    Community favouriteNo change
    prisma/orm ↗

    Best for: A developer starting a new Prisma Next project on PostgreSQL: the scaffolder wires in Prisma Next and registers AI agent skills.

    The README documents Prisma Next, a TypeScript rewrite of Prisma ORM, and its setup flows: a scaffolder for new projects and an init command for existing repositories. It requires Node.js 24 or newer.

    GitHub stars
    47,566
    Stars / 30 days
    +27
    npm / typical week
    downloads not counted
    Tools exposed
    never inspected
    Last commit
    2 days ago
    Commits / 12 weeks
    498
    Maintenance grade
    B
    Tool descriptions
    Not graded
    Score 66.0: show every number behind it
    • Adoption100 / 100 · weight 40%
      • GitHub stars100
      • npm downloadsnot measured
        npm names no repository for dev-env, so its downloads cannot be attributed
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance95 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade80
      • Commit cadence100
    • Momentum29 / 100 · weight 14%
      • Stars gained, relative to size10
      • Stars gained, absolute59
      • npm download trendnot measured
        no npm download history
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integrates100
    Weighted mean of the five
    84.6
    × relevance: the keyword is declared here
    0.78
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    66.0
  • 9

    DBCode

    Community favouriteNo change
    dbcodeio/public ↗

    Best for: Teams already using DBCode for PostgreSQL in VS Code: its built-in MCP server gives AI agents access to existing connections, schemas, and query execution.

    DBCode runs its MCP server inside the VS Code extension, giving AI agents access to existing database connections, schemas, and query execution. Worth knowing: the server has never been inspected, so its actual tool list is unknown, and choosing it assumes DBCode and its database connections are already set up.

    GitHub stars
    340
    Stars / 30 days
    +21
    npm / typical week
    downloads not counted
    Tools exposed
    never inspected
    Last commit
    3 days ago
    Commits / 12 weeks
    79
    Maintenance grade
    A
    Tool descriptions
    Not graded
    Score 60.3: show every number behind it
    • Adoption63 / 100 · weight 40%
      • GitHub stars63
      • npm downloadsnot measured
        npm names no repository for dbcode, so its downloads cannot be attributed
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance100 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade100
      • Commit cadence100
    • Momentum73 / 100 · weight 14%
      • Stars gained, relative to size86
      • Stars gained, absolute54
      • npm download trendnot measured
        no npm download history
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    77.3
    × relevance: the keyword is declared here
    0.78
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    60.3
  • 10

    infrawise

    Community favourite▲ 2
    Sidd27/infrawise ↗

    Best for: For adding PostgreSQL indexes from an AI coding assistant: it exposes postgres_index_suggestions, which generates CREATE INDEX CONCURRENTLY SQL with partial and ANALYZE variants.

    Infrawise statically analyzes a codebase, AWS services, and database schemas, then exposes the results as 22 MCP tools such as postgres_index_suggestions, get_infra_overview, and get_table_schema. It requires Node.js 22 or later, and on first run it generates an infrawise.yaml config that asks which AWS profile to use.

    GitHub stars
    20
    Stars / 30 days
    +1
    npm / typical week
    476
    Tools exposed
    22
    Last commit
    2 days ago
    Commits / 12 weeks
    281
    Maintenance grade
    A
    Tool descriptions
    A
    Score 57.9: show every number behind it
    • Adoption62 / 100 · weight 40%
      • GitHub stars33
      • npm downloads57
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance100 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade100
      • Commit cadence100
    • Momentum36 / 100 · weight 14%
      • Stars gained, relative to size38
      • Stars gained, absolute16
      • npm download trend58
    • Tool quality88 / 100 · weight 13%
      • Tool description quality80
      • Built and inspected by Glama100
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    74.2
    × relevance: the keyword is declared here
    0.78
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    57.9
  • Best for: An afternoon PostgreSQL MCP setup for read-only database analysis: it installs with npx, requires only DATABASE_URL, and documents a query tool plus table/schema resources.

    The server runs as a stdio or HTTP MCP process and exposes a query tool for SQL and resources for table listings and schema with sample data. Before choosing it, note that it requires a DATABASE_URL connection string and keeps write operations off unless DANGEROUSLY_ALLOW_WRITE_OPS is explicitly set.

    GitHub stars
    181
    Stars / 30 days
    +2
    npm / typical week
    217
    Tools exposed
    never inspected
    Last commit
    300 days ago
    Commits / 12 weeks
    0
    Maintenance grade
    C
    Tool descriptions
    Not graded
    Score 57.5: show every number behind it
    • Adoption64 / 100 · weight 40%
      • GitHub stars57
      • npm downloads50
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance38 / 100 · weight 24%
      • Last commit touching this server42
        dated from the last commit on the default branch, re-read from GitHub at publication; github.com shows a push 11 days ago, which counts every ref; the stored date would have published 11 days ago
      • Repository maintenance grade55
      • Commit cadence5
    • Momentum36 / 100 · weight 14%
      • Stars gained, relative to size34
      • Stars gained, absolute21
      • npm download trend58
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    57.5
    × relevance: the keyword is dedicated here
    1.00
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    57.5
  • 12

    dbx

    Community favourite▼ 1
    t8y2/dbx ↗

    Best for: Teams already using DBX who need MCP access for natural language queries and database management.

    It is the MCP server for DBX, which enables natural language queries and database management through MCP. DBX itself remains a dependency, since this package is only the MCP interface and not the database manager.

    GitHub stars
    17,423
    Stars / 30 days
    +5,035
    npm / typical week
    downloads not counted
    Tools exposed
    never inspected
    Last commit
    today
    Commits / 12 weeks
    4,093
    Maintenance grade
    A
    Tool descriptions
    Not graded
    Score 57.5: show every number behind it
    • Adoption100 / 100 · weight 40%
      • GitHub stars100
      • npm downloadsnot measured
        npm publishes dbx from samt/node-dbx
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance100 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade100
      • Commit cadence100
    • Momentum100 / 100 · weight 14%
      • Stars gained, relative to size100
      • Stars gained, absolute100
      • npm download trendnot measured
        no npm download history
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    95.8
    × relevance: the keyword is tagged here
    0.60
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    57.5
  • Best for: Teams standardizing on one natural-language MCP data access layer for PostgreSQL alongside other databases; it connects via MCP and HTTP and defaults to read-only.

    The server is a Node.js MCP connector that documents four access paths: MCP stdio, MCP SSE, MCP Streamable HTTP, and a REST API, and presents PostgreSQL access with a default read-only mode. Its actual tool list was not measured, so confirm which tools are exposed before installing it for your PostgreSQL workflow.

    GitHub stars
    908
    Stars / 30 days
    +33
    npm / typical week
    140
    Tools exposed
    never inspected
    Last commit
    166 days ago
    Commits / 12 weeks
    0
    Maintenance grade
    C
    Tool descriptions
    Not graded
    Score 55.3: show every number behind it
    • Adoption81 / 100 · weight 40%
      • GitHub stars74
      • npm downloads46
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance52 / 100 · weight 24%
      • Last commit touching this server68
      • Repository maintenance grade55
      • Commit cadence5
    • Momentum59 / 100 · weight 14%
      • Stars gained, relative to size73
      • Stars gained, absolute62
      • npm download trend31
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    70.9
    × relevance: the keyword is declared here
    0.78
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    55.3
  • Best for: Teams that need to connect AI agents and IDEs to PostgreSQL: this server's prebuilt generic tools provide schema discovery and SQL execution without custom code.

    The README documents a database MCP server with prebuilt generic tools for schema exploration and SQL execution, plus a custom-tools framework for production agents. Before choosing it, note that the measured npm package is none published, although the README quick start runs npx -y @toolbox-sdk/server; confirm that package is available for the chosen client.

    GitHub stars
    16,272
    Stars / 30 days
    +196
    npm / typical week
    Ships no npm package
    Tools exposed
    never inspected
    Last commit
    2 days ago
    Commits / 12 weeks
    264
    Maintenance grade
    A
    Tool descriptions
    Not graded
    Score 54.4: show every number behind it
    • Adoption100 / 100 · weight 40%
      • GitHub stars100
      • npm downloadsnot measured
        no npm package
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance100 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade100
      • Commit cadence100
    • Momentum64 / 100 · weight 14%
      • Stars gained, relative to size45
      • Stars gained, absolute93
      • npm download trendnot measured
        no npm download history
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    90.7
    × relevance: the keyword is tagged here
    0.60
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    54.4
  • Best for: AI agents running multi-step PostgreSQL administration tasks: Code Mode executes operations in a V8 isolate to reduce token overhead.

    This server binds the Model Context Protocol to a PostgreSQL sandbox and documents schema introspection, migration tracking, smart tool filtering, deterministic error handling, connection pooling, HTTP/SSE transport, OAuth 2.1 authentication, and extension support. The exposed tool list is unknown, so the current tool reference in the repository should be checked before installing.

    GitHub stars
    12
    Stars / 30 days
    +1
    npm / typical week
    77
    Tools exposed
    never inspected
    Last commit
    today
    Commits / 12 weeks
    20
    Maintenance grade
    A
    Tool descriptions
    Not graded
    Score 54.0: show every number behind it
    • Adoption44 / 100 · weight 40%
      • GitHub stars28
      • npm downloads40
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance97 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade100
      • Commit cadence85
    • Momentum33 / 100 · weight 14%
      • Stars gained, relative to size35
      • Stars gained, absolute13
      • npm download trend55
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    63.5
    × relevance: the keyword is dedicated here
    1.00
    × continuity: actively changing
    1.00
    × evidence: modest but real audience
    0.85
    Composite score
    54.0
  • 16

    whodb-cli

    Community favourite▼ 3
    clidey/whodb ↗

    Best for: Exploring an unfamiliar PostgreSQL database before writing SQL: it exposes schema, table, column, ERD, and starter-query tools.

    whodb-cli exposes 12 MCP tools for database work, covering connections, schemas, tables, columns, ERD metadata, EXPLAIN, data-quality audits, pending write confirmations, and SQL query execution. One thing to know before choosing it: write operations are gated behind a confirmation step, so whodb_pending and whodb_confirm are part of the workflow.

    GitHub stars
    5,017
    Stars / 30 days
    +31
    npm / typical week
    Ships no npm package
    Tools exposed
    12
    Last commit
    today
    Commits / 12 weeks
    672
    Maintenance grade
    A
    Tool descriptions
    A
    Score 53.3: show every number behind it
    • Adoption93 / 100 · weight 40%
      • GitHub stars93
      • npm downloadsnot measured
        no npm package
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance100 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade100
      • Commit cadence100
    • Momentum43 / 100 · weight 14%
      • Stars gained, relative to size32
      • Stars gained, absolute61
      • npm download trendnot measured
        no npm download history
    • Tool quality98 / 100 · weight 13%
      • Tool description quality90
      • Built and inspected by Glama100
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integrates100
    Weighted mean of the five
    88.8
    × relevance: the keyword is tagged here
    0.60
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    53.3
  • 17

    GraphJin

    Community favouriteNo change
    dosco/graphjin ↗

    Best for: AI agents working against PostgreSQL that need governed, auditable database access: GraphJin provides schema discovery, query validation, and an execution ledger.

    GraphJin runs as a service that serves GraphQL, REST, workflow, and MCP endpoints and documents agent tools such as query_catalog, graphql_help, and gj_security. Before choosing it, note that the built-in agent assumes a model API key in .env.

    GitHub stars
    3,152
    Stars / 30 days
    +23
    npm / typical week
    714
    Tools exposed
    never inspected
    Last commit
    today
    Commits / 12 weeks
    451
    Maintenance grade
    A
    Tool descriptions
    Not graded
    Score 53.0: show every number behind it
    • Adoption97 / 100 · weight 40%
      • GitHub stars87
      • npm downloads61
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance100 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade100
      • Commit cadence100
    • Momentum57 / 100 · weight 14%
      • Stars gained, relative to size34
      • Stars gained, absolute56
      • npm download trend100
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integrates100
    Weighted mean of the five
    88.3
    × relevance: the keyword is tagged here
    0.60
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    53.0
  • 18

    pg-mcp-server

    Abandoned but popularNo change
    stuzero/pg-mcp-server ↗

    Best for: Multiple PostgreSQL databases in one AI session: it can connect to several at once and exposes read-only query, explain, and schema discovery resources.

    The server registers connections with a connect tool, disconnects explicitly, executes read-only queries and query plans, and serves schema and extension metadata as pgmcp:// resources. It requires Python 3.13+ and a source clone via uv sync or Docker, so there is no published npm package.

    GitHub stars
    540
    Stars / 30 days
    0
    npm / typical week
    Ships no npm package
    Tools exposed
    never inspected
    Last commit
    354 days ago
    Commits / 12 weeks
    0
    Maintenance grade
    D
    Tool descriptions
    Not graded
    Score 52.7: show every number behind it
    • Adoption68 / 100 · weight 40%
      • GitHub stars68
      • npm downloadsnot measured
        no npm package
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance32 / 100 · weight 24%
      • Last commit touching this server42
      • Repository maintenance grade30
      • Commit cadence5
    • Momentum0 / 100 · weight 14%
      • Stars gained, relative to size0
      • Stars gained, absolute0
      • npm download trendnot measured
        no npm download history
    • Tool quality≈68 / 100 · weight 13%
      • Tool description quality≈68
        tool descriptions not yet scored
      • Built and inspected by Glamanot measured
        never built and inspected by Glama
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    52.7
    × relevance: the keyword is dedicated here
    1.00
    × continuity: actively changing
    1.00
    × evidence: widely adopted
    1.00
    Composite score
    52.7
  • Best for: Deciding whether a PostgreSQL version is safe or where to upgrade: it exposes CVE lists, version comparisons, yanked releases, exploits, and upgrade paths.

    The server exposes eight tools that answer PostgreSQL security questions with structured JSON, including per-version CVE reports, version-to-version comparisons, yanked releases, exploits, latest minors, and upgrade targets. It depends on the manually curated PG_CVE JSON dataset fetched from GitHub Pages with local caching, not on raw NVD feeds.

    GitHub stars
    0
    Stars / 30 days
    0
    npm / typical week
    Ships no npm package
    Tools exposed
    8
    Last commit
    13 days ago
    Commits / 12 weeks
    19
    Maintenance grade
    B
    Tool descriptions
    A
    Score 50.7: show every number behind it
    • Adoption45 / 100 · weight 40%
      • GitHub stars0
      • npm downloadsnot measured
        no npm package
      • Used through Glama45
    • Maintenance92 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade80
      • Commit cadence85
    • Momentum0 / 100 · weight 14%
      • Stars gained, relative to size0
      • Stars gained, absolute0
      • npm download trendnot measured
        no npm download history
    • Tool quality81 / 100 · weight 13%
      • Tool description quality73
      • Built and inspected by Glama100
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    59.6
    × relevance: the keyword is dedicated here
    1.00
    × continuity: actively changing
    1.00
    × evidence: modest but real audience
    0.85
    Composite score
    50.7
  • 20

    Best for: Teams running a self-hosted wiki that want agents to search, read, and write it: the built-in MCP server exposes page, search, backlink, and research tools.

    tela is a self-hostable markdown wiki whose backend includes an MCP endpoint; its tools cover page and space management, search, comments, backlinks, attachments, sheets, decks, and Atlas documentation generation. Before choosing it, note that it is a full wiki stack, not a thin Postgres connector: self-hosting uses Docker Compose, and semantic search requires adding an embedder and enabling pgvector.

    GitHub stars
    55
    Stars / 30 days
    +13
    npm / typical week
    Ships no npm package
    Tools exposed
    41
    Last commit
    3 days ago
    Commits / 12 weeks
    798
    Maintenance grade
    A
    Tool descriptions
    A
    Score 48.5: show every number behind it
    • Adoption44 / 100 · weight 40%
      • GitHub stars44
      • npm downloadsnot measured
        no npm package
      • Used through Glamanot measured
        not used through Glama in the last 30 days
    • Maintenance100 / 100 · weight 24%
      • Last commit touching this server100
      • Repository maintenance grade100
      • Commit cadence100
    • Momentum78 / 100 · weight 14%
      • Stars gained, relative to size100
      • Stars gained, absolute46
      • npm download trendnot measured
        no npm download history
    • Tool quality91 / 100 · weight 13%
      • Tool description quality83
      • Built and inspected by Glama100
    • Trust100 / 100 · weight 9%
      • License100
      • Published by the vendor it integratesnot measured
        not published by the vendor it integrates
    Weighted mean of the five
    73.2
    × relevance: the keyword is declared here
    0.78
    × continuity: actively changing
    1.00
    × evidence: modest but real audience
    0.85
    Composite score
    48.5

Questions people ask

What does Postgres MCP Server (ericzakariasson/pg-mcp-server) require to run?

Postgres MCP Server (ericzakariasson/pg-mcp-server) installs with npx and requires only DATABASE_URL. It is labelled Abandoned but popular, and its last commit was 300 days ago with 0 commits in the last 12 weeks.

Is PostgreSQL MCP Server (HenkDz/postgresql-mcp-server) safe to point at a production database?

PostgreSQL MCP Server (HenkDz/postgresql-mcp-server) exposes schema, RLS, and user tools behind a readonly-by-default security mode. It exposes 18 tools with grade B descriptions. Its last commit was 68 days ago, and it had 12 commits in the last 12 weeks.

Which server should I use for PostgreSQL monitoring?

MCP PostgreSQL Operations is built for production monitoring: its read-only tools cover locks, vacuum, bloat, replication, WAL, and query analysis. It exposes 34 tools with grade A descriptions. Its last commit was 31 days ago, and it had 20 commits in the last 12 weeks.

Can I use one MCP server for PostgreSQL and other databases?

DBHub is a universal database MCP server that connects to PostgreSQL, MySQL, SQLite, DuckDB, and other databases, and is built for querying and schema exploration through clients like Claude Code or Cursor. Universal DB MCP also covers PostgreSQL, MySQL, and Redis with a default read-only mode, but its last commit was 166 days ago and it had 0 commits in the last 12 weeks.

What should I check before letting an AI agent write to PostgreSQL?

Look for explicit write controls in the server you choose. PostgreSQL MCP Server (HenkDz/postgresql-mcp-server) defaults to readonly, Universal DB MCP defaults to read-only, and MCP PostgreSQL Operations exposes read-only tools; Postgres MCP Server (ericzakariasson/pg-mcp-server) supports optional write operations with safety controls.

Other comparisons