AUTOMATIONSWITCH
OfficialDatabase

Postgres MCP

by Anthropic

Official MCP server for PostgreSQL. Provides read and write access to PostgreSQL databases with schema introspection, query execution, and transaction support. The reference implementation for database MCP servers.

84,955·14 tools·Released AUG 2025·MIT
npx -y @modelcontextprotocol/server-postgres
Share:

The gold standard for Postgres MCP servers. Explicit transactions, EXPLAIN output, and read-only mode make this the production-safe choice.

Reviewed by M. Nouriel · MAY 2026

INSTALL THIS SERVER

Requires authenticationConnection string (DATABASE_URL env var)
{ "mcpServers": { "postgres": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-postgres" ], "env": { "DATABASE_URL": "postgres://user:pw@host:5432/db", "READ_ONLY": "false" } } } }
PrereqNode.js 18+, PostgreSQL connection string

14 TOOLS AVAILABLE

query
Execute a read-only SQL query
Read
execute
Execute a write SQL statement
Write
list_schemas
List all schemas in the database
Read
list_tables
List all tables in a schema
Read
describe_table
Get column details for a table
Read
list_indexes
List indexes on a table
Read

OUR ASSESSMENT

Strengths
  • Explicit transaction tools (BEGIN/COMMIT) as first-class operations
  • EXPLAIN plan output returns as structured JSON
  • Read-only mode via CLI flag, no config surgery needed
  • Fastest cold start in the category at 180ms
  • 14 tools covering schema introspection, queries, and admin operations
Weaknesses
  • Connection-string-only auth, no OAuth flow
  • No built-in branching for reversible migrations
  • Zero BaaS features — this is a database client only
Security Notes

Supports read-only mode via --read-only flag. Credentials passed as DATABASE_URL environment variable or .pgpass file.

Best For

Production Postgres clusters where DBA-governed schemas demand explicit transactions and EXPLAIN plans.

TECHNICAL DETAILS

Language
typescript
Transport
stdio
Clients
Claude DesktopClaude CodeCursorVS CodeWindsurfCline
License
MIT
GitHub
npm
@modelcontextprotocol/server-postgres
Last Release
1.2.4
First Released
AUG 15, 2025

ADOPTION METRICS

// GitHub Stars
84,955

// Reading this84,955 stars belong to the modelcontextprotocol/servers monorepo (10 commits/30d). The Postgres server is one subdirectory; per-server activity is not separately reported. Audit (2026-05-03) confirmed the URL is correct; star count reflects monorepo aggregate.

// Weekly Downloads
48,200
// Popularity Rank
#3
Globally

OTHER DATABASE MCP SERVERS

Vendor5

Supabase

Supabase

Persistence layer with full Postgres access and Row Level Security awareness. Query tables, manage schemas, handle auth users, and work with storage buckets.

18 tools2,663
Official4.7

MCP Toolbox for Databases

Google (googleapis)

Google's open-source MCP server for databases. One MCP binary speaks PostgreSQL, MySQL, BigQuery, Spanner, AlloyDB, Cloud SQL, and SQLite. 14,937 GitHub stars and 100 commits on main in the last 30 days. Highest commit cadence in the directory.

7 tools14,937
Official4.5

ClickHouse MCP

ClickHouse

Official ClickHouse MCP server with both ClickHouse Tools (production cluster queries) and chDB Tools (embedded ClickHouse for local analytics). Apache-2.0 with destructive-operation protection: write access is opt-in via configuration.

5 tools766
Official4.4

Redis MCP

Redis

Official Redis MCP server with natural-language interface for managing and searching Redis data. EntraID authentication for Azure Managed Redis included; Redis ACL configurable via environment variables. Tool coverage spans strings, lists, hashes, sets, sorted sets, JSON, vectors, and search.

8 tools499
Community4.4

Elasticsearch MCP

cr7258

Elasticsearch and OpenSearch MCP server with index management, document CRUD, search queries, cluster health, and aggregations. 270 stars and 22 commits on main in the last 30 days.

6 tools270
Vendor4

MindsDB

MindsDB

MindsDB ships native MCP server support as part of the main project (mindsdb/mindsdb, 39,093 stars). Federated query layer over 200+ data sources with built-in MCP endpoint for AI agent access to enterprise data.

6 tools39,093
// Get in touch

DISCUSS YOUR
MCP REQUIREMENTS.

Evaluating a server, scoping an internal deployment, or working out whether MCP is the right fit at all. Start the conversation and we will point you at the right piece of the ecosystem.

Discuss Your MCP Requirements →