Best MCP Servers for PostgreSQL (2026)

Postgres access ranges from read-only analytics (Postgres MCP by Crystal DBA, with index tuning) to full hosted-platform control (Neon's server), multi-database gateways (Centralmind, Legion, DB MCP Server), and a hosted PostgreSQL listing.

This page collects the 9 MCP servers in our directory that genuinely cover postgresql — together they have 6,886 GitHub stars, and 0 of them run as hosted services you can connect to without installing anything. The highest-rated options are crystaldba/postgres-mcp, julien040/anyquery, neondatabase/mcp-server-neon.

How to choose

Use Crystal DBA's server for safe production analytics, Neon if your database is on Neon, and a gateway like Centralmind when Postgres is one of several databases behind one endpoint.

🔌

crystaldba/postgres-mcp

by crystaldba

2.7k ★MIT

🐍 🏠 - All-in-one MCP server for Postgres development and operations, with tools for performance analysis, tuning, and health checks

$npx -y crystaldba-postgres-mcp
PythonDatabases
🔌

julien040/anyquery

by julien040

1.7k ★

🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.

$npx -y julien040-anyquery
GoDatabases
🔌

neondatabase/mcp-server-neon

by neondatabase

594 ★MIT

📇 ☁️ — An MCP Server for creating and managing Postgres databases using Neon Serverless Postgres

$npx -y neonctl@latest
TypeScriptDatabases
🔌

subnetmarco/pgmcp

by subnetmarco

529 ★

🏎️ 🏠 - Natural language PostgreSQL queries with automatic streaming, read-only safety, and universal database compatibility.

$npx -y subnetmarco-pgmcp
GoDatabases
🔌

centralmind/gateway

by centralmind

528 ★Apache-2.0

🏎️ 🏠 🍎 🪟 - MCP and MCP SSE Server that automatically generate API based on database schema and data. Supports PostgreSQL, Clickhouse, MySQL, Snowflake, BigQuery, Supabase

$npx -y centralmind-gateway
GoDatabases
🔌

runekaagaard/mcp-alchemy

by runekaagaard

401 ★MPL-2.0

🐍 🏠 - Universal SQLAlchemy-based database integration supporting PostgreSQL, MySQL, MariaDB, SQLite, Oracle, MS SQL Server and many more databases. Features schema and relationship inspection, and l

$npx -y runekaagaard-mcp-alchemy
PythonDatabases
🔌

FreePeak/db-mcp-server

by FreePeak

372 ★MIT

🏎️ 🏠 – A high-performance multi-database MCP server built with Golang, supporting MySQL & PostgreSQL (NoSQL coming soon). Includes built-in tools for query execution, transaction management, schema

$npx -y @freepeak/db-mcp-server
GoDatabases
🔌

TheRaLabs/legion-mcp

by TheRaLabs

90 ★GPL-3.0

🐍 🏠 Universal database MCP server supporting multiple database types including PostgreSQL, Redshift, CockroachDB, MySQL, RDS MySQL, Microsoft SQL Server, BigQuery, Oracle DB, and SQLite.

$npx -y @modelcontextprotocol/inspector
PythonDatabases
🐘

PostgreSQL

by Anthropic

Execute SQL queries, explore schema, and interact with PostgreSQL databases safely.

$npx @modelcontextprotocol/server-postgres postgresql://localhost/mydb
databasesqlpostgres

Frequently asked questions

What is the most popular MCP server for PostgreSQL?

crystaldba/postgres-mcp leads this list with 2,688 GitHub stars. 🐍 🏠 - All-in-one MCP server for Postgres development and operations, with tools for performance analysis, tuning, and health checks

Are these PostgreSQL MCP servers free to use?

8 of the 9 servers here publish a license in the directory (MIT, NOASSERTION, Apache-2.0). 0 of them run as hosted services you can connect to remotely; the rest you install and run yourself. Hosted services may have their own pricing.

How do I choose an MCP server for PostgreSQL?

Use Crystal DBA's server for safe production analytics, Neon if your database is on Neon, and a gateway like Centralmind when Postgres is one of several databases behind one endpoint.

Best MCP Servers for PostgreSQL (2026) | Claude Rules