
crystaldba/postgres-mcp
Postgres development and operations: performance analysis
by crystaldbaOpen source
Description
Postgres MCP Pro is an open-source Model Context Protocol server that gives you and your AI agents Postgres tools for the whole development process, from coding and testing through deployment to production tuning and maintenance. It analyses database health, including index health, connection use, buffer cache, vacuum health, sequence limits and replication lag. Index tuning explores many candidate indexes to find good ones for your workload, and the query plan tools review EXPLAIN output and simulate the impact of hypothetical indexes. Schema intelligence helps the agent write SQL based on an understanding of the database schema. Safe SQL execution offers configurable access control, including a read-only mode and safe SQL parsing, so the server can be used in development and in production. It supports the stdio and Server-Sent Events transports. The project's demo shows an AI assistant using it to fix slow ORM queries, indexing and caching in a movie app. You can run it with Docker or with Python 3.12 or newer, and you need database credentials that work with psql or a GUI tool.…
Highlights
- Index tuning and hypothetical index simulation
- EXPLAIN plan review and query optimisation
- Database health checks
- Read-only mode and safe SQL execution
- Works over stdio or Server-Sent Events
Ratings & Reviews
No ratings yet
Be the first to rate crystaldba/postgres-mcp.
People also visit

postgres-patterns
PostgreSQL database patterns for query optimization, schema design, indexing

antonorlov/mcp-postgres-server
Access PostgreSQL databases, including those behind an SSH bastion

postgresql-database-engineering
Comprehensive PostgreSQL database engineering skill covering indexing
crystaldba/postgres-mcp FAQ
What is Postgres MCP Pro?
An open-source MCP server that gives AI agents Postgres tools for health checks, index tuning, query plans and safe SQL.
Can it run read-only?
Yes. Its configurable access control includes a read-only mode.
How do I run it?
With Docker, or with Python 3.12 or higher. The README recommends Docker.
What do I need to connect?
Database access credentials. You can confirm they work with psql or a GUI tool such as pgAdmin.
How are indexes tested?
The query plan tools simulate the impact of hypothetical indexes before you create any.
Which transports are supported?
Standard input and output (stdio) and Server-Sent Events (SSE).
What are the best crystaldba/postgres-mcp alternatives?
Popular alternatives to crystaldba/postgres-mcp include postgres-patterns, postgres-pro and DBHub. See all crystaldba/postgres-mcp alternatives














