Key takeaways
- Postgres MCP Pro is the only server here that documents hypothetical-index EXPLAIN and workload-based index advice. It describes no auth on its network transports, so keep it local.
- Supabase MCP and Neon MCP are hosted, use OAuth, scope to a project and have a read-only switch. Neon's own README advises against production use.
- AWS Labs postgres-mcp-server targets Aurora and RDS. Run 1.1.7 or later: CVE-2026-87911 let a planted
COPY ... TO PROGRAMthrough read-only mode in earlier versions. - The archived
@modelcontextprotocol/server-postgresis deprecated on npm and its read-only mode falls to a stackedCOMMIT. Replace it. - Every server's read-only mode is a guardrail, not a boundary. Connect with a Postgres role that only has
SELECT, whatever server you pick. - Faucet (ours, listed last) applies one RBAC policy to a REST API and an MCP server across seven SQL engines; it is an access layer, not a DBA tool.
Eight Postgres MCP servers, compared from their own docs and source on 2026-10-16, with honest notes on where each one stops, ours included.
What is the best Postgres MCP server?
The right Postgres MCP server depends on where your database runs. On Supabase, use Supabase MCP. On Neon, use the Neon MCP Server, best for branch-based migrations. On Aurora or RDS, use AWS Labs postgres-mcp-server 1.1.7 or later. For tuning any Postgres, Postgres MCP Pro is best for EXPLAIN and index advice. Google MCP Toolbox is best for live diagnostics such as locks and bloat. DBHub is best as a light multi-engine server for local development. For governed table access without raw SQL, compare SQL MCP Server and Faucet, which is best for one role policy over REST and MCP.
Postgres MCP servers compared at a glance
| Server | Best for | License / pricing model | Hosting and transports | Auth to the MCP server | Read-only mechanism | DBA tooling | Version checked (2026-10-16) |
|---|---|---|---|---|---|---|---|
| Postgres MCP Pro | DBA work on any Postgres | MIT, free | Self-hosted (Python, Docker); stdio, SSE (streamable HTTP in unreleased main) | None described | Read-only txn; COMMIT/ROLLBACK parsed out | EXPLAIN with hypothetical indexes, index advice, health | PyPI and Docker 0.3.0 (May 2025) |
| Supabase MCP | Supabase projects | Apache-2.0; usage on your Supabase plan | Hosted; HTTP | OAuth (hosted only) | Read-only Postgres user | Performance and security advisors (get_advisors); no EXPLAIN tool | Hosted service |
| Neon MCP Server | Neon projects, branch migrations | MIT; usage-based Neon plans, free plan | Hosted; streamable HTTP | OAuth or Neon API key | Write tools removed; READ ONLY txn; optional roleName | EXPLAIN, slow queries, tuning on a branch | Hosted service |
| AWS Labs postgres-mcp-server | Aurora and RDS | Apache-2.0, free; AWS usage applies | Local only (same host as client); documented configs use stdio | AWS credentials, Secrets Manager or IAM | Default read-only; pglast allowlist (“best-effort”) | Not documented | PyPI 1.2.2 |
| Google MCP Toolbox | Live diagnostics, Google Cloud | Apache-2.0, free | Self-hosted binary, container or npx; stdio, HTTP | Opt-in OAuth 2.1 / OIDC (off by default); IAM, authorized parameters | Per tool on self-hosted Postgres; read-only source setting documented for Cloud SQL and AlloyDB | get_query_plan, query stats, locks, bloat | v1.14.0 |
| DBHub | Light multi-engine dev server | MIT, free | Self-hosted (Node 22.5+); stdio, HTTP | Off by default; optional static bearer tokens (--auth-token) | Per tool: keyword check plus BEGIN READ ONLY | Opt-in explain_sql, health_check | npm 1.5.0 |
| SQL MCP Server (DAB) | Governed CRUD without raw SQL | MIT, free, “no premium tier” | Self-hosted; streamable HTTP, stdio | Default provider Unauthenticated (trusted front end); Entra ID, custom JWT, App Service | No raw SQL; per-entity role permissions | None | DAB 2.0 docs |
| Faucet | One RBAC policy over REST and MCP | MIT, free | Self-hosted (Go binary, Docker); streamable HTTP, stdio | API key | App-level read-only service; raw SQL off by default | None | v0.1.15 |
How we evaluated
We compared each server on where it runs, how an agent authenticates, how read-only is enforced (transaction, database role or application check), query-tuning help, license and pricing model, and maintenance and security history.
Every competitor fact comes from the project’s own README, docs, pricing page, registry or commit history, checked on 2026-10-16 and listed in the sources below; versions are what the registries showed that day. Faucet facts come from its source code. We did not run these servers against a Postgres instance for this post, so nothing here is a test result; the one figure we produced is the Toolbox tool count. If you spot an error, tell us and we will correct it with a dated note.
The order follows fit for the most common reader: someone choosing a server for an existing Postgres database. Faucet, which we build, is listed last because it is not the right fit for most Postgres-only, DBA-style use.
First: retire the archived reference server
Many tutorials still point at @modelcontextprotocol/server-postgres. Don’t use it.
- It now lives in modelcontextprotocol/servers-archived, whose README says: “NO SECURITY GUARANTEES ARE PROVIDED FOR THESE ARCHIVED SERVERS.”
- Its last npm release, 0.6.2, is marked “Package no longer supported.”
- Datadog Security Labs showed (August 2025) that its read-only mode wraps your SQL in
BEGIN TRANSACTION READ ONLYbut accepts multiple statements, soCOMMIT; DROP SCHEMA public CASCADE;ends the read-only transaction and runs the rest as normal writes. We walked through the mechanics in our write-up of the Postgres MCP read-only bypass. - If you need a drop-in replacement for the same tool shape, Datadog’s article names Zed’s fork,
@zeddotdev/postgres-context-server, as fixed from v0.1.4.
The same bug class shows up elsewhere. CVE-2025-59333 hit @executeautomation/database-server, whose read-only check only verified that a query started with select. CVE-2026-87911 (below) hit an AWS server. The lesson isn’t “pick the server with no CVEs”; it is to connect any of them with a role that can’t write:
CREATE ROLE mcp_reader LOGIN PASSWORD 'change-me';
GRANT CONNECT ON DATABASE app TO mcp_reader;
GRANT USAGE ON SCHEMA public TO mcp_reader;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO mcp_reader;
-- Cover tables created later by the role that runs this:
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO mcp_reader;
-- Postgres 14 and earlier let PUBLIC create objects in public:
REVOKE CREATE ON SCHEMA public FROM PUBLIC;
ALTER ROLE mcp_reader SET default_transaction_read_only = on;
-- Do not grant pg_execute_server_program, pg_read_server_files or superuser.
default_transaction_read_only is only a default that a session can switch off, so the missing INSERT/UPDATE/DELETE grants are what actually stop writes. Our guide to giving an AI agent read-only database access covers this per engine.
1. Postgres MCP Pro — Best for DBA work on any Postgres
Best for: query tuning, index advice and health checks on self-managed or cloud Postgres.
Postgres MCP Pro (crystaldba/postgres-mcp) is a Python server built for database work, not just running queries. Its nine tools include execute_sql, explain_query, get_top_queries, analyze_workload_indexes and analyze_db_health.
Strengths
- The only server here that documents hypothetical-index EXPLAIN:
explain_querycan simulate a plan with indexes that don’t exist yet. The index tools recommend indexes from your workload (viapg_stat_statements) or from a given set of queries. Index advice is worth having for agent traffic: in our MCP database benchmark, adding indexes raised PostgreSQL throughput 13.3x on the same workload. analyze_db_healthchecks buffer cache hit rates, connections, constraints, index health (duplicate, unused and invalid indexes), sequence limits and vacuum.- Two access modes.
unrestrictedallows full read/write and DDL for development.restrictedlimits execution to read-only transactions with execution-time limits, and the README saysCOMMITandROLLBACKare rejected after the SQL is parsed with pglast, which closes the archived server’s hole. - Works against any Postgres you can reach with a connection string; the README says testing focuses on Postgres 15, 16 and 17. MIT licensed, about 3.4k GitHub stars.
Things to know
- Packaged builds lag the source. Development is sporadic: a batch of fixes landed in January 2026 and one dependency pin in August 2026, but PyPI and Docker Hub were still at 0.3.0 (May 2025) when we checked. Install from source if you need the newer fixes.
- No auth on the MCP server is described for SSE or for streamable HTTP, which is in the source since January 2026 but not yet in a packaged release. Keep it on localhost or behind an authenticating proxy.
- Postgres only.
- LLM-based index tuning is optional and needs an
OPENAI_API_KEY. - Restricted mode is enforced inside the server. Pair it with a
SELECT-only role.
Who should choose it
DBAs and backend engineers who want an agent to explain slow queries and suggest indexes on a Postgres they control, and who run the server locally.
2. Supabase MCP — Best for Supabase projects
Best for: teams whose Postgres is a Supabase project.
Supabase’s official server (now at github.com/supabase/mcp, Apache-2.0) is hosted at https://mcp.supabase.com/mcp. It reaches beyond SQL to account- and project-level tools, grouped into feature sets (such as database and docs) you can switch on or off.
Strengths
- Hosted, with OAuth sign-in (the supabase/mcp README calls it OAuth 2.1): your client prompts you to log in to Supabase and pick an organization. No connection strings in config files.
- Scoping lives in the URL:
project_ref=limits the server to one project,features=limits tool groups, andread_only=trueis documented as “Execute all queries as a read-only Postgres user.” get_advisorsreturns Supabase’s security and performance advisors, so an agent can surface missing indexes or exposed tables that the platform already flags.
Things to know
- Only works with Supabase Postgres. The local CLI endpoint (
localhost:54321/mcp) and self-hosted Supabase get a limited subset of tools and no OAuth. - Supabase documents that elicitations are “a guardrail, not a guarantee of human review or approval,” and that SQL warnings “may not catch every destructive operation.”
- No dedicated EXPLAIN tool is listed; you would run
EXPLAINthroughexecute_sql. - The server costs nothing extra, but what it creates can. Project and branch creation show a cost confirmation, and branching requires a paid plan. Supabase plans run from Free to Enterprise, with an org-level fee plus usage.
- Supabase’s guidance is to connect to production only when a task needs production evidence, scoped and read-only.
Who should choose it
Anyone building on Supabase. If you’re weighing Supabase against a self-hosted API layer, our Faucet vs Supabase page covers that trade-off.
3. Neon MCP Server — Best for Neon projects and branch-based migrations
Best for: Neon users who want an agent to test schema changes on a branch before touching main.
Neon’s MIT-licensed server is hosted at https://mcp.neon.tech/mcp over Streamable HTTP (SSE is deprecated). Its signature feature is using Neon branches as a safety net.
Strengths
prepare_database_migrationtests a change on a temporary branch andcomplete_database_migrationapplies it.prepare_query_tuningandcomplete_query_tuningwork the same way for optimizations.- Diagnostics:
explain_sql_statement,list_slow_queries(needspg_stat_statements) andinspect_database, which the README describes as 15 read-only checks. - Read-only mode:
?readonly=true, or unticking “Allow writes” at OAuth consent, removes write tools, andrun_sqlthen runs each query in aREAD ONLYtransaction.roleNamepins all SQL to a specific Postgres role, so grants back up the setting. - OAuth by default, or a Neon API key as a Bearer token; an organization API key limits access to that organization.
Things to know
- The README says: “We do not recommend using the Neon MCP Server in production environments,” and advises reviewing every action the LLM requests.
- Neon only. There’s no standalone local install for end users; the repo describes the hosted app and a dev setup.
- Analytics can be disabled with
NEON_MCP_DISABLE_ANALYTICS=1, but the README notes Sentry error reporting is not covered by that flag. - Neon’s paid plans are usage-based, and there is a free plan.
Who should choose it
Neon users, especially for development workflows where branch-per-change beats a read-only gate.
4. AWS Labs postgres-mcp-server — Best for Aurora and RDS
Best for: Amazon Aurora PostgreSQL and RDS for PostgreSQL.
Part of the Apache-2.0 awslabs/mcp monorepo (PyPI awslabs.postgres-mcp-server, 1.2.2 as of 2026-10-16). It connects through the RDS Data API (Aurora only), the Postgres wire protocol, or wire protocol with IAM auth, and defaults to verify-full TLS for direct connections.
Strengths
- Read-only by default; writes need
--allow_write_query. - Queries are parsed with pglast and only read statement shapes pass. Known mutating functions are rejected even inside a
SELECT, multi-statement input is rejected, parse errors fail closed, andCOPY ... TO/FROM PROGRAMand host file access are blocked in every mode. --privilege_check enforcerefuses to run as superuser,rds_superuseror aBYPASSRLSrole. The default iswarn; the README recommendsenforce.- Credentials stay in AWS Secrets Manager or come from IAM.
Things to know
- Use 1.1.7 or later. AWS bulletin 2026-104-AWS (September 9, 2026) and NVD’s CVE-2026-87911 entry describe OS command injection past the read-only validation before 1.1.7. The path was indirect: a crafted
COPY ... TO PROGRAMplanted in content a user later processed through the server (prompt injection), in the default read-only mode, on self-managed Postgres where the role had superuser orpg_execute_server_program. AWS recommends a minimal-privilege role. - The README calls the validation “a best-effort, defense-in-depth mechanism, not a security boundary.”
- Local only: the README says it “can only be run locally on the same host as your LLM client,” and its documented configs use stdio.
- The README doesn’t list DBA tools like EXPLAIN or index advice.
Who should choose it
Teams on Aurora or RDS who want AWS-native credential handling and a conservative read-only default.
5. Google MCP Toolbox for Databases — Best for live diagnostics and Google Cloud
Best for: watching a running Postgres (locks, long transactions, bloat, replication), and AlloyDB or Cloud SQL users.
MCP Toolbox (repo renamed from genai-toolbox to googleapis/mcp-toolbox, Apache-2.0, install docs reference v1.14.0) is a Go server that covers dozens of data sources. For Postgres, --prebuilt=postgres loads a ready-made tool set:
npx -y @toolbox-sdk/server --prebuilt=postgres --stdio
# connection settings come from POSTGRES_HOST, POSTGRES_PORT,
# POSTGRES_DATABASE, POSTGRES_USER and POSTGRES_PASSWORD
Strengths
- The prebuilt Postgres config on the main branch defines 29 tools (our count, 2026-10-16), grouped into
data,monitor,health,view-configandreplicationtoolsets, includingget_query_plan,list_locks,list_top_bloated_tablesandlist_invalid_indexes. - Load only what you need, for example
--prebuilt=postgres/datafor SQL tools alone, which also shrinks the tool schema the model has to read. - Custom tools let you replace free-form SQL with fixed, parameterized statements, the safer pattern for production agents.
- Google also offers managed Google Cloud MCP servers for its databases, which the README points to.
Things to know
execute_sqlruns whatever single statement it is given. Toolbox documents a read-only source setting only for Cloud SQL and AlloyDB; on a self-hostedpostgressource, restriction comes from which tools you load and from the database role.- The full prebuilt set is large. If you don’t need monitoring, load a toolset.
- MCP endpoint auth (OAuth 2.1 / OIDC) is opt-in and off by default; tool-level auth centers on Google Cloud IAM and authorized parameters.
Who should choose it
Platform and SRE teams who want an agent to help diagnose a live Postgres, and Google Cloud shops.
6. DBHub — Best for a lightweight developer server
Best for: developers who want one small server for Postgres plus MySQL, MariaDB, SQL Server, Oracle or SQLite.
DBHub (Bytebase, MIT, npm @bytebase/dbhub 1.5.0 as of 2026-10-16) loads only two tools by default, execute_sql and search_objects, at 347 tokens in our o200k count of its tools/list, a small footprint when an agent juggles many servers. explain_sql and health_check are opt-in, and you can define parameterized custom tools in dbhub.toml.
Strengths
- It is the PostgreSQL example server in the Claude Code MCP docs, and it ships a built-in web workbench for running tools and viewing request traces without an MCP client.
- Read-only is set per tool (
readonly = trueon anexecute_sqlentry), so one source can be read-only and another writable. Its docs describe two layers: a keyword check, then the database’s own mechanism (BEGIN READ ONLYon Postgres, since 0.22.6). max_rowscapsSELECTresults and returns"truncated": truewhen it cuts rows.- SSH tunnels and TLS for the database connection.
Things to know
- HTTP auth is off unless you pass
--auth-token, which adds a shared static bearer token (the docs say it is “not OAuth”). The server binds to0.0.0.0by default; bind it to127.0.0.1or put it behind a proxy. - DBHub’s own docs warn that a privileged role can still act through functions such as
pg_read_fileorCOPY ... TO PROGRAM, and recommend a least-privilege read-only user. - Requires Node.js 22.5 or later.
- Postgres tuning stops at
explain_sql; there’s no index advice.
Who should choose it
Developers wiring Claude Code, Cursor or similar to local and staging databases across several engines.
7. SQL MCP Server (Data API builder) — Best for governed CRUD without raw SQL
Best for: teams that want agents to read and write records through declared entities and role rules, never through SQL text.
Microsoft’s SQL MCP Server is part of Data API builder (DAB) 1.7 and later; Microsoft’s docs say to use the latest 2.0 release for current capabilities and fixes. DAB is MIT licensed and, in Microsoft’s words, “truly free, with no premium tier.” It supports PostgreSQL 11+ alongside SQL Server, Azure SQL, MySQL and Cosmos DB, and the same config serves REST, GraphQL and MCP.
Strengths
- By design, no NL2SQL and no DDL. Agents get seven DML tools (
describe_entities,create_record,read_records,update_record,delete_record,execute_entity,aggregate_records) over the entities you expose. - Per-entity role permissions with field include/exclude, plus database policies for read, update and delete on Postgres.
- Operations features: caching, OpenTelemetry, health checks and Key Vault secrets.
- Auth providers include Entra ID, custom JWT (Okta, Auth0, Keycloak) and App Service EasyAuth.
Things to know
- The default auth provider is Unauthenticated, which assumes DAB sits behind a trusted front end that handles identity. Configure a real provider before exposing it.
- On Postgres, Microsoft’s feature table marks
aggregate_records, stored procedures as tools and custom MCP tools as unsupported, and database policies don’t cover create. - Microsoft lists PostgreSQL data types DAB doesn’t support, including
bytea,date,timestamptzandtime. Check your schema before you choose it. - No API-key security; you need an identity provider, or the simulator for local stdio.
- No query tuning or EXPLAIN.
Who should choose it
Teams, especially Azure shops, building agent features on a fixed set of tables who want the API layer to be the security boundary. Our SQL Server MCP servers comparison covers it on its home engine.
8. Faucet — Best for one RBAC policy over REST and MCP
Best for: self-hosted teams that want the same role rules to govern a REST API and an MCP server over Postgres and other SQL databases.
Faucet, the open-source database-to-REST-API and MCP server, is an MIT-licensed single Go binary (v0.1.15 when we checked). Point it at Postgres and it serves a REST API with an OpenAPI 3.1 spec, an admin UI, and an MCP server at /mcp on the same port. It also connects MySQL, MariaDB, SQL Server, Oracle, Snowflake and SQLite. Faucet’s PostgreSQL REST API guide covers the Postgres specifics.
faucet db add --name app --driver postgres --dsn "postgres://mcp_reader:pass@localhost:5432/app"
faucet role create --name agent --service app --component "_table/orders" --verbs GET
# let the agent list tables and read the orders schema over MCP
faucet role grant --role agent --service app --component "_table" --verbs GET
faucet role grant --role agent --service app --component "_schema/orders" --verbs GET
faucet key create --role agent --label claude
faucet serve
claude mcp add --transport http faucet http://localhost:8080/mcp --header 'X-API-Key: <key>'
Listing tables over MCP needs GET on _table, and describing one needs GET on _schema/<table>. The service’s read-only switch is set per database in the admin UI (Databases page) or admin API.
Strengths
- Typed tools (
faucet_query,faucet_describe_table,faucet_insert,faucet_update,faucet_delete) compile to parameterized SQL; filter values are always bind parameters and identifiers are allowlisted. faucet_raw_sqlis off by default. It runs only if the service allows raw SQL, the service isn’t read-only, and the caller’s role grants all five verbs on_sql.- MCP calls go through the same role rules as REST calls, per service and table, and fail closed. A read-only service rejects every write over both REST and MCP.
- Update and delete refuse an empty filter, which stops accidental whole-table writes. A filter that matches every row still goes through, so grant write verbs sparingly.
Things to know
- A newer project. Faucet is at v0.1.x, with a shorter track record than the vendor servers above.
- No DBA tooling. No EXPLAIN, index advice or workload stats; pair it with Postgres MCP Pro if you need them.
- Read-only is enforced in the application, not with a read-only transaction. Connect it with a
SELECT-only role as well. - Table-level access, API-key auth. Roles are scoped by service, table and verb rather than row-level policies, and agents authenticate with an
X-API-Keyheader rather than OAuth.
Who should choose it
Teams that need the same governed Postgres data reachable by apps over REST and by agents over MCP, especially across more than one database engine. If you also need DBA help, pair it with Postgres MCP Pro locally. The guide to connecting Claude to your database walks through client setup.
Also worth knowing
- PlanetScale MCP server. Hosted, and covers PlanetScale Postgres as well as Vitess: OAuth or service tokens, read-only access levels, replica reads, query insights, and a block on
UPDATEorDELETEwithoutWHERE. - pgEdge MCP Server for Postgres. GA since April 2026, PostgreSQL License, for Postgres 14 and newer. Read-only transactions by default; HTTP mode has user and token auth.
- Azure MCP Server. Includes Azure Database for PostgreSQL tools (list, query, schema, server parameters) with Microsoft Entra auth by default.
- Zed’s
@zeddotdev/postgres-context-server. The patched fork of the archived reference server.
Supabase MCP vs Neon MCP
Both are hosted, use OAuth, scope to a project and have a read-only switch. The differences:
- Read-only enforcement. Supabase runs queries as a read-only Postgres user. Neon removes write tools, runs
run_sqlin aREAD ONLYtransaction, and can also pin a role withroleName. - Safety model for writes. Neon leans on branches: migrations and tuning are tried on a temporary branch first. Supabase relies on cost confirmations, elicitations and feature-group scoping; its branching is a paid-plan feature.
- Surface area. Supabase exposes more of its platform beyond the database, including account-level tools, docs search and its security and performance advisors. Neon goes deeper on query diagnostics, with EXPLAIN, slow-query listing and branch-based tuning.
- Production stance. Neon advises against production use; Supabase says production only when needed, scoped and read-only.
If you’re on one of these platforms, it has already chosen for you, and PlanetScale users have the same answer with PlanetScale’s server. If you’re looking for Supabase MCP alternatives because you’re self-hosting Postgres, look at Postgres MCP Pro, DBHub or Toolbox for SQL access, or SQL MCP Server or Faucet for a governed API. Our PostgREST alternatives roundup covers the REST side.
Postgres MCP Pro vs DBHub vs Google MCP Toolbox
All three are free, self-hosted and work on any Postgres, but they suit different jobs:
- Postgres MCP Pro answers why is this slow and which index fixes it. It is the only one of the three with workload-based index recommendations and hypothetical-index EXPLAIN. Postgres only.
- Google MCP Toolbox answers what is happening on the server right now: locks, active queries, bloat, replication lag, invalid indexes. It covers many engines and lets you replace free SQL with fixed tools.
- DBHub answers give my coding agent a database with minimal overhead: two tools by default, per-tool read-only, six SQL engines.
On network auth: Postgres MCP Pro describes none, DBHub offers only a shared static bearer token that is off by default, and Toolbox’s MCP endpoint auth (OAuth 2.1 / OIDC) is opt-in and off by default. Run Postgres MCP Pro and DBHub on localhost or behind an authenticating proxy.
Bottom line
Pick by environment first: Supabase, Neon and PlanetScale users should start with their platform’s server, and Aurora and RDS users with AWS Labs 1.1.7 or later. For hands-on tuning of any Postgres, Postgres MCP Pro is the one with index advice and hypothetical-index EXPLAIN. For agents that should touch data only through declared tables and roles, compare SQL MCP Server and Faucet. Whatever you choose, retire the archived reference server and connect with a role that can’t write.
If one governed REST API plus MCP server is what you need, the Faucet MCP server docs and the PostgreSQL tutorial get you running in a few minutes.
Frequently asked questions
Is it safe to connect an MCP server to a production Postgres database?
It can be, with limits. Use a dedicated role with SELECT only on the tables the agent needs, and never superuser or pg_execute_server_program. Turn on the server's read-only mode as a second layer, prefer a replica, and keep network transports off the public internet unless they authenticate. Neon's README advises against production use, and Supabase recommends scoped, read-only connections.
Is the official Postgres MCP server deprecated?
Yes. The reference server @modelcontextprotocol/server-postgres now lives in the modelcontextprotocol/servers-archived repository, which states that no security guarantees are provided. Its last npm version, 0.6.2, is marked as no longer supported, and Datadog Security Labs showed in August 2025 that its read-only mode can be bypassed with a stacked COMMIT.
How do I make a Postgres MCP server read-only?
Use two layers. Turn on the server's read-only setting (restricted mode, read_only=true, readonly=true, or a read-only service), then connect it with a Postgres role that has only SELECT on the tables the agent needs. Server-side checks have been bypassed before; a role without write privileges is enforced by Postgres itself.
What are the alternatives to Supabase MCP?
If you are on Neon, the Neon MCP Server offers a similar hosted, OAuth-based setup with branching, and PlanetScale's MCP server covers PlanetScale Postgres. For self-hosted Postgres, Postgres MCP Pro, DBHub and Google MCP Toolbox run against any Postgres connection. For a governed API layer instead of raw SQL, Microsoft's SQL MCP Server and Faucet expose typed tools behind role rules.
Can a Postgres MCP server run EXPLAIN and suggest indexes?
Yes. Postgres MCP Pro runs EXPLAIN, simulates hypothetical indexes and recommends indexes from workload statistics. Neon MCP has EXPLAIN, slow-query listing and query tuning on a temporary branch. Google MCP Toolbox's prebuilt Postgres tools include get_query_plan and invalid-index checks. DBHub has an opt-in explain_sql tool, and Supabase offers performance advisors. Faucet has none of these.
Do Postgres MCP servers support OAuth?
The hosted platform servers do: Supabase MCP, Neon MCP and PlanetScale MCP all sign you in with OAuth. Most self-hosted servers do not. Postgres MCP Pro describes no auth, DBHub has optional static bearer tokens, AWS Labs runs locally on the client's host, and Faucet uses API keys. Microsoft's SQL MCP Server supports Entra ID and custom JWT providers.
Sources
- Postgres MCP Pro (crystaldba/postgres-mcp) README (checked )
- Postgres MCP Pro server.py (transport options on main) (checked )
- Postgres MCP Pro commit history (checked )
- postgres-mcp on PyPI (release history) (checked )
- crystaldba/postgres-mcp on Docker Hub (tags) (checked )
- Supabase MCP server repository (supabase/mcp) (checked )
- Supabase docs: Model context protocol (MCP) (checked )
- Supabase pricing (checked )
- Neon MCP Server README (checked )
- Neon pricing (checked )
- AWS Labs postgres-mcp-server README (checked )
- awslabs.postgres-mcp-server on PyPI (checked )
- AWS Security Bulletin 2026-104-AWS (CVE-2026-87911) (checked )
- NVD: CVE-2026-87911 (checked )
- Google MCP Toolbox for Databases repository (checked )
- MCP Toolbox prebuilt PostgreSQL tool config (checked )
- DBHub repository (checked )
- DBHub docs: execute_sql (read-only and max_rows) (checked )
- DBHub docs: command-line options (--host, --auth-token) (checked )
- @bytebase/dbhub on npm (checked )
- Microsoft Learn: SQL MCP Server overview (checked )
- Microsoft Learn: Data API builder feature availability (checked )
- Microsoft Learn: What is Data API builder? (checked )
- PlanetScale docs: MCP server (checked )
- pgEdge MCP Server repository (pgEdge/pgedge-postgres-mcp) (checked )
- pgEdge press release: MCP Server for Postgres generally available (checked )
- Microsoft Learn: Azure MCP Server tools for Azure Database for PostgreSQL (checked )
- modelcontextprotocol/servers-archived (checked )
- @modelcontextprotocol/server-postgres on npm (checked )
- Datadog Security Labs: SQL injection in the PostgreSQL MCP server (checked )
- @zeddotdev/postgres-context-server on npm (checked )
- OSV: CVE-2025-59333 (checked )
- Faucet source code (faucetdb/faucet) (checked )
Last reviewed