
Postgres MCP servers: which one to use
No official server exists, so pick by need. Use your host's server on Supabase, Neon or AWS, or a local one for tuning or read-only safety.
- Servers
- 116
- active
- Official
- 3
- by PostgreSQL
- Hosted
- 20
- nothing to install
- Local
- 79
- runs on your machine
- OAuth
- 1
- sign in, no key
There is no single official Postgres MCP server, so pick one by what you need. The old reference server from the MCP project is archived, and its read-only mode can be bypassed to delete data. Whichever you choose, connect it with a database user that can only read. Read-only switches in several servers have been bypassed, so that database role is your real guard.
Good for
- Developers who want Claude Code or Cursor to explore a schema and run queries on their own Postgres
- Anyone tracking down a slow query or a missing index
- Teams whose database lives on Supabase, Neon, or AWS RDS and Aurora
- Teams who want an assistant to read data without being able to change it
Which PostgreSQL MCP server to use
Use your host's server if your database is on Supabase or Neon. For your own Postgres, pick Postgres MCP Pro for tuning or pgEdge to be read-only by default, and never the archived reference server.
| Server | Runs | Read-only by default | Read-only option | Sign-in | GitHub stars |
|---|---|---|---|---|---|
| For PostgreSQL | |||||
| Postgres MCP Pro | Local | No | Restricted mode | Connection string | – |
| Neon | Hosted | No | URL or sign-in | Account or key | 659 |
| pgEdge | Local | Yes | Default | – | 243 |
| AWS Labs Postgres | Local | Yes | Default | AWS profile | – |
| Google MCP Toolbox | Local | – | – | Env variables | 16.8K |
| DBHub | Local | – | Read-only mode | Connection string | 3.8K |
| Reference server, archived | Local | Bypassable | – | Connection string | – |
| Other tools for the same job | |||||
| SupabaseFor Supabase | HostedLocal | No | URL setting | Account | 3K |
| Microsoft Postgres | Local | No | Profile setting | Saved profile | 72 |
All PostgreSQL MCP servers
116 active · 3 official · official first, then by GitHub stars
MCP Toolbox for DatabasesOfficialLocaltoken in envMCP Toolbox for Databases enables your agent to connect to your database.
16.8K GitHub stars
mcp-server-neonOfficialHosted or LocalOAuthOfficial Neon MCP server for managing Neon projects and Lakebase Postgres databases.
659 GitHub stars
AWS Labs PostgreSQL MCP ServerOfficialLocaltoken in envAWS Labs server that lets your AI assistant query Aurora PostgreSQL and RDS PostgreSQL through the RDS Data API or a direct connection. Writes stay off unless you turn them on.
DBHubLocaltoken in envToken-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite
3.8K GitHub stars- Postgres MCP ProLocaltoken in env
Lets your AI assistant check the health of your own Postgres database, explain slow queries and suggest indexes. Runs on your machine with a connection string. It has full write access unless you start it in restricted mode.
3.4K GitHub stars
pgedge-postgres-mcpLocalEnterprise PostgreSQL MCP server with NL queries, hybrid search (pgvector+BM25), and web UI
243 GitHub stars
postgresql-mcp-serverLocalA Powerful PostgreSQL MCP server with 14 consolidated database management tools for AI assistants.
203 GitHub stars
pg-mcp-serverLocalA Model Context Protocol server for PostgreSQL databases
179 GitHub stars- postgres-mcpLocalNo sign-in
PostgreSQL MCP server for AI assistants over the Model Context Protocol.
72 GitHub stars - postgresHosted
Connect to your PostgreSQL database to query data and schemas.
65 GitHub stars
postgres-mcp-serverMCP (Model Context Protocol) Server for postgres Database
31 GitHub stars- ai-agents-mcp-pg
This repo is an extension of PostgreSQL MCP Server providing functionalities to create tables, insert entries, update entries, delete entries, and drop tables.
27 GitHub stars - mcp-postgres-full-access
Full access postgres mcp server
25 GitHub stars
mcp-postgres-serverLocalMCP server for PostgreSQL. Works with VS Code, Cursor, Claude Code, Codex, and Windsurf.
24 GitHub stars
PostgreSQL MCP ServerLocalPostgreSQL MCP server with 203 tools, connection pooling, HTTP/SSE, OAuth 2.1, and tool filtering
12 GitHub stars- postgres_mcpLocal
MCP server for PostgreSQL database operations - query, explore schemas, and analyze tables
12 GitHub stars - postgres-mcp-server
🔄 PostgreSQL MCP Server – AI-Powered PostgreSQL Management & Monitoring. A powerful, AI-integrated PostgreSQL Model Context Protocol (MCP) server for automated database operations, monitoring, security, diagnostics, and optimization. Seamlessly manage PostgreSQL with 237+ tools designed for AI assi
12 GitHub stars - PostgreSQL MCP ServerLocal
Enterprise PostgreSQL MCP server with 63 tools, 10 resources, 10 prompts for AI-native operations
12 GitHub stars - pg_licht
Read-only PostgreSQL MCP server for AI assistants: schema, statistics, plans, locks, replication and PgBouncer, read from the catalog. Never writes, never returns table rows.
11 GitHub stars
PostgreSQL MCP ServerLocalPostgreSQL MCP server - query, schema introspection, explain, and health checks for AI assistants
10 GitHub stars
Show all 116Show fewer
postgres-connector-mcpLocalMCP server for querying PostgreSQL databases
9 GitHub stars- postgresql-mcp
A Model Context Protocol (MCP) server that provides secure PostgreSQL database integration tools for Claude Code. Features read-only query execution, schema exploration, and performance analysis.
8 GitHub stars - postgresql-ssh-mcpLocal
PostgreSQL MCP server with SSH tunneling for Claude Desktop and ChatGPT
7 GitHub stars - pgarachne
🕷️ Turn PostgreSQL functions into a secure API: JSON-RPC, real-time SSE from LISTEN/NOTIFY, file & ZIP downloads, OpenAPI and MCP for AI agents. Every request runs as a real database role (GRANTs, RLS), with Basic or JWT auth. Single Go binary, zero boilerplate, Prometheus metrics.
7 GitHub stars - pgsql-mcp-server
🔧 A powerful tool server based on the Model Context Protocol (MCP), enabling interaction with PostgreSQL databases via MCP calls.
6 GitHub stars
typescriptLocalMCP server for PostgreSQL. Read-only by default, row caps, timeouts, secrets never logged.
5 GitHub stars
Postgres MCPLocalPostgreSQL MCP wrapper with .env credential mapping, tool selection, and safe read-only defaults.
5 GitHub stars- mcp-server-postgres
A production-grade, schema-aware PostgreSQL MCP server for enterprise AI. Features Zero-Trust SQL validation, multi-tier permissions, and real-time schema introspection for secure, autonomous database operations.
5 GitHub stars
mcp-postgresLocalMCP server that provides PostgreSQL database access and operations
4 GitHub stars
Postgres (read-only)LocalRead-only Postgres: drop-in for the archived server-postgres, with schema context.
4 GitHub stars- multi-postgres-mcp-server
MCP server for multiple PostgreSQL databases. One process, unlimited databases. Hot-reload JSON config, --label per-project isolation. Read-only safe queries. Works with Claude Code, Cursor, Windsurf, Cline, and any MCP-compatible AI client.
4 GitHub stars - pg-mcp-live
Read-only MCP server for PostgreSQL introspection, safe SELECT queries, and schema resources.
4 GitHub stars - pg-mnemosyne-mcp
🧠 A high-performance PostgreSQL-backed MCP server acting as a super memory, task tracker, and dynamic database manager for AI agents. Features built-in connection pooling, a professional tasks schema, and a unique shared multi-agent coordination hub to prevent coding conflicts in real-time.
4 GitHub stars - pg-redact-mcp
A PostgreSQL MCP server that automatically detects and redacts PII in query results before they reach AI agents.
4 GitHub stars - postgres-mcp
PostgreSQL MCP server for AI-assisted database analysis, query optimisation, index recommendations, and health monitoring
4 GitHub stars - postgres-mcp
Production-grade PostgreSQL MCP Server. Empowers LLMs with 40+ tools for deep database interaction, including schema inspection, secure query execution, performance analysis, and administrative tasks. Built for reliable AI-driven development.
4 GitHub stars
PostgreSQL (hardened, read-only)LocalRead-only PostgreSQL over MCP. Writes refused at the parsed SQL, plus a READ ONLY transaction.
3 GitHub stars- postgresql-mcpLocal
MCP server for PostgreSQL with full read-write support, transactions, and schema inspection. Works with any PostgreSQL instance — local, Supabase, AWS RDS, or self-hosted. Use with Claude, Cursor, Windsurf, and any MCP-compatible AI client.
3 GitHub stars - postgres-mcpLocal
A lightweight MCP server built to query Postgres database using SQL or plain English
3 GitHub stars - mcp-postgres-full-access-extendedLocal
Full-access PostgreSQL server for Model Context Protocol with read/write capabilities and enhanced schema metadata
3 GitHub stars - mcp-server-postgres-multi-schema
A Model Context Protocol server that provides read-only access to PostgreSQL databases with enhanced multi-schema support.
3 GitHub stars
read-only-local-postgres-mcp-serverLocalMCP server for read-only PostgreSQL database queries in Claude Desktop
2 GitHub stars- pg-mcpLocal
Minimal local MCP server for read-only PostgreSQL access via Claude Code
2 GitHub stars - postgres-mcp-serverLocal
MCP server for PostgreSQL database operations
2 GitHub stars - postgresLocal
MCP server for interacting with PostgreSQL databases
2 GitHub stars - postgres-mcp-go
A PostgreSQL MCP (Model Context Protocol) server implementation in Go that provides secure database access for AI agents.
2 GitHub stars
postgresql-sharp-mcpLocalDatabase-agnostic PostgreSQL MCP server with live discovery and bounded per-call selection. Installs one platform package with the .NET runtime bundled; no .NET installation or runtime downloads required.
1 GitHub stars- dsh-postgres-expertLocal
PostgreSQL expertise for DeepSeek Harness: 11 curated pg-aiguide skills from Tiger Data registered natively, plus their public MCP server for version-exact manual search.
1 GitHub stars
mcp-percona-pgLocalManage Percona PostgreSQL + PgBouncer on Kubernetes — safe-by-default access modes and guards.
1 GitHub stars- simple-postgres-mcpLocal
MCP server for PostgreSQL vector database with semantic and full-text search capabilities using pgvector
1 GitHub stars - postgres-mcp-serverLocal
Read-only PostgreSQL Model Context Protocol server
1 GitHub stars - pg-migration-lock-lintLocal
Names every statement in a Rails, Django or raw SQL migration that takes a table-blocking Postgres l
1 GitHub stars - PostgreSQL MCP ServerLocal
Python MCP server for PostgreSQL database inspection and querying
1 GitHub stars - Sezzlee PostgreSQLLocal
Explore and query PostgreSQL read-only: catalogue search, schema introspection and bounded queries.
1 GitHub stars
ainative-postgres-mcpLocalZero-config Postgres MCP with auto-provisioning — drop-in for server-postgres.
0 GitHub stars
postgresql-mcp-serveurLocalA comprehensive MCP server for PostgreSQL database interaction
0 GitHub stars
readonly-postgres-mcpLocalLet AI read your PostgreSQL database - without letting it write to it. A read-only PostgreSQL MCP server.
0 GitHub stars
NexQL Postgres MCPLocalStandalone Postgres MCP server — schema-aware, read-only by default, installable everywhere.
0 GitHub stars- postgres-mcp-routerLocal
Read-only PostgreSQL MCP server with multi-database semantic routing.
0 GitHub stars
mcp-server-postgresLocalPostgreSQL MCP — query databases, inspect schemas, explain queries.
0 GitHub stars- PgVouchLocal
Safe PostgreSQL migrations: schema drift, lock analysis, safe rewrites, data checksums. Read-only.
0 GitHub stars - postgres-mcpLocal
Model Context Protocol server for AI-assisted PostgreSQL database analysis and optimization. Provides read-only access for comprehensive performance analysis, index optimization, and schema recommendations.
0 GitHub stars - Kaiva Postgres MCPLocal
Read-only PostgreSQL MCP server. Drop-in replacement for the archived server-postgres.
0 GitHub stars - postgres-scout-mcpLocal
Scout your PostgreSQL databases with AI - safety features, monitoring, and data quality
0 GitHub stars - pg-lens-mcpLocal
Secure PostgreSQL integration for AI assistants via Model Context Protocol
0 GitHub stars - rag-memory-pg-mcpLocal
PostgreSQL-based RAG Memory MCP Server with Supabase - knowledge graph + semantic search
0 GitHub stars - sw-postgres-mcpLocal
Safe-write Postgres MCP server with preview-before-execute writes and rollback safety.
0 GitHub stars - mcp-postgres-secureLocal
A secure Model Context Protocol server for PostgreSQL with readonly, DML, and full access modes
0 GitHub stars - postgres-mcpLocal
PostgreSQL Model Context Protocol Server - A read-only PostgreSQL MCP server implementation
0 GitHub stars - postgres-ssh-mcpLocal
MCP server for Postgres (with SSH tunnel support)
0 GitHub stars - easy-pg-admin-mcpLocal
High privilege PostgreSQL admin MCP server for database and role management
0 GitHub stars - easy-pg-mcpLocal
High performance PostgreSQL MCP Server using node-postgres
0 GitHub stars - mcp-postgresLocal
Safe, read-only-by-default Model Context Protocol (MCP) server for PostgreSQL. Let AI agents inspect and query your database without fear of destructive writes.
0 GitHub stars - pg-ro-mcpLocal
PostgreSQL MCP server (read-only)
0 GitHub stars - postgres-mcpLocal
Model Context Protocol server for PostgreSQL database operations
0 GitHub stars - postgres-mcpLocal
MCP (Model Context Protocol) server for Postgres with dedicated tools and dry-run mutations.
0 GitHub stars - javimaligno-postgres_mcpLocal
MCP server for PostgreSQL database operations - query, explore schemas, and analyze tables
0 GitHub stars - postgres-mcp-serverLocal
A secure, self-hostable Model Context Protocol server for PostgreSQL.
0 GitHub stars - mcp-postgres-queryLocal
Model Context Protocol (MCP) server for PostgreSQL to run SQL queries via stdio (read-only by default)
0 GitHub stars - pg-mcp-serverLocal
MCP stdio bridge for Cursor and Claude Code to a remote PHP PostgreSQL HTTP tunnel
0 GitHub stars - postgresmcpLocal
PostgreSQL 数据库 MCP 服务器(Go 二进制包装,stdio 传输)
0 GitHub stars - postgresql-mcp-gallopLocal
PostgreSQL MCP Server - A Model Context Protocol server for PostgreSQL database operations
0 GitHub stars - postgres-db-mcpLocal
MCP server for PostgreSQL database operations - fetch schema, run queries, and modify data
0 GitHub stars - Devart MCP Server for PostgreSQL (ADO.NET)Local
Schema-aware read/write access to PostgreSQL through Devart dotConnect ADO.NET data provider.
0 GitHub stars - ISO country PGHosted
Public ISO 3166-1 record for PG.
0 GitHub stars - OwnPGLocal
PostgreSQL DBA tools over MCP, scoped to one database and one schema.
0 GitHub stars - pg bigserial 64-bit band, value discardedHosted
pg bigserial 64-bit band, value discarded
0 GitHub stars - PG Bloat DetectiveLocal
Read-only Postgres bloat verdicts: blockers, timelines, REINDEX proof.
0 GitHub stars - pg-readonly-mcpLocal
A read-only Postgres MCP server that parses SQL rather than pattern-matching it.
0 GitHub stars - Postgres AIopsLocal
Governed PostgreSQL DBA ops: slow-query RCA, bloat/vacuum & blocking-lock analysis; 35 MCP tools.
0 GitHub stars - Postgres DBA MCPLocal
Bounded, read-only PostgreSQL access for AI assistants: nine DBA tools, compact CSV output
0 GitHub stars - Postgres Secured (Aegis Zero-Trust)
Enterprise PostgreSQL MCP secured by Aegis Zero-Trust to block unauthorized SQL injections.
0 GitHub stars - Postgres URL ShapeHosted
Check a Postgres URL shape. Credentials discarded.
0 GitHub stars - postgres-mcpLocal
PostgreSQL MCP server with 15 tools (SQL, EXPLAIN, health, indexes) plus a Gradio UI with LLM chat.
0 GitHub stars - PostgreSQL CVE & Release IntelligenceLocal
PostgreSQL security for AI agents: CVEs, yanked releases, exploits, and upgrade paths
0 GitHub stars - PostgreSQL MCP by InsightfulPipeHosted
Hosted PostgreSQL MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
0 GitHub stars - PostgreSQL Performance (read-only)Local
Read-only PostgreSQL performance diagnostics: slow queries, EXPLAIN, index advice, locks, functions
0 GitHub stars - WHOOP MCPLocal
Sync WHOOP recovery, sleep, strain, and workouts into Postgres and query them from any MCP client.
0 GitHub stars - user-postgresql-mcpLocal
A PostgreSQL MCP server built with @modelcontextprotocol/sdk.
189/wk downloads a week
PostgreSQL MCP ServerLocalPostgreSQL MCP Server — 27 tools for queries, schema, CRUD, DBA, HA & server management
39/wk downloads a week- kafka-and-postgres-monitoring-stackHosted
Kafka and Postgres Monitoring Stack
- mcp-postgresql-opsLocal
Add your description here
- minio-postgres-redis-stack-generatorHosted
MinIO + Postgres + Redis Stack Generator
pg-aiguideHostedNo sign-inComprehensive PostgreSQL documentation and best practices, including ecosystem tools
- pg.ddx.io: the PostgreSQL community's memoryHosted
Every PostgreSQL mailing list since 1991, linked to the commits, code, commitfest and docs.
- postgres-kafka-prometheus-stack-generatorHosted
Postgres + Kafka + Prometheus Stack Generator
- postgres-kafka-stack-generatorHosted
Postgres + Kafka Stack Generator
- postgres-minio-stack-generatorHosted
Postgres + MinIO Stack Generator
- postgres-nl-queryLocal
RLS/tenant-aware Postgres for AI agents — schema, read-only SQL, NL→SQL with safety rails.
- postgres-prometheus-stack-generatorHosted
Postgres + Prometheus Stack Generator
- postgres-redis-compose-generatorHosted
Postgres + Redis Compose Generator
Prisma Postgres and Prisma ComputeHostedManage Prisma Postgres and existing Prisma Compute apps. Requires sign-in; does not upload code.
- rabbitmq-elasticsearch-postgres-stack-generator-elasticsearch-elasticsearchHosted
RabbitMQ + Elasticsearch + Postgres Stack Generator (Elasticsearch/Elasticsearch)
- rabbitmq-elasticsearch-postgres-stack-generator-mongoHosted
RabbitMQ + Elasticsearch + Postgres Stack Generator (Mongo)
- rabbitmq-postgres-mongodb-stack-generatorHosted
RabbitMQ + Postgres + MongoDB Stack Generator
- redis-minio-postgres-stack-generatorHosted
Redis + MinIO + Postgres Stack Generator
Questions
Is there an official PostgreSQL MCP server?
No. The PostgreSQL project does not publish one. The closest thing was the MCP project's reference server, which is now archived and has an unfixed read-only bypass.
Is the old reference Postgres MCP server safe?
No. A query that starts with COMMIT ends its read-only transaction, so an agent or a hidden prompt can drop your tables, and the archived @modelcontextprotocol/server-postgres package will not be patched. It still gets about 180,000 downloads a week, so check your config for it.
Which Postgres MCP is read-only?
pgEdge and the AWS Labs server for Aurora and RDS are read-only by default. Postgres MCP Pro, Supabase, Neon and Microsoft's server each have a read-only switch you must turn on. Pair any of them with a database user that can only read.
Is a server's read-only mode enough protection?
No. pgEdge, DBHub and the AWS Labs server all had read-only bypasses fixed in 2026. Connect with a database role that can only run SELECT, as Claude Code's and Google's docs advise.
Which one should I use for Supabase or Neon?
Use the host's own server. Supabase and Neon each run a hosted server you sign in to in the browser, with extra tools for branches and migrations. Both have a read-only switch, and Neon says its server is for development and testing, not production.
Which Postgres MCP server tunes indexes?
Postgres MCP Pro. It runs health checks, suggests indexes and tests them with hypothetical-index query plans before you create anything. Google's MCP Toolbox has query plan, lock and bloat tools, and Neon reports slow queries and unused indexes.
How do I make Postgres MCP Pro read-only?
Start it with --access-mode=restricted. Queries then run in read-only transactions with a 30-second limit. The default is unrestricted, which can change your data.
Which MCP server does Claude Code use for Postgres?
Claude Code's MCP docs use DBHub as their Postgres example. They also tell you to put a read-only database user in the connection string.
Can I use a Postgres MCP server with AWS RDS or Aurora?
Yes. AWS Labs publishes a server for Aurora PostgreSQL and RDS PostgreSQL that connects through the RDS Data API or a direct connection. Use version 1.1.7 or later, which fixed a critical read-only bypass.
Is there a hosted Postgres MCP server with sign-in?
Only if your database lives on a platform. Supabase and Neon each host one with browser sign-in. For your own Postgres, the servers run on your machine with a connection string.