MCP server for AI agents, enabling configurable read/write access and performance analysis
Top 44.4% on sourcepulse
Postgres MCP Pro is an open-source Model Context Protocol (MCP) server designed to assist developers and AI agents with PostgreSQL database management, performance analysis, and safe SQL execution. It offers features like database health checks, index tuning, query plan analysis, and schema intelligence, aiming to improve development workflows from coding to production tuning.
How It Works
Postgres MCP Pro leverages the MCP standard, exposing database functionality through tools rather than resources. It integrates with PostgreSQL extensions like pg_statements
for query statistics and hypopg
for simulating index impacts. For index tuning, it employs a greedy search strategy, similar to Microsoft's Anytime Algorithm, to find optimal index configurations by estimating performance gains and storage costs. Database health checks are adapted from PgHero, covering aspects like buffer cache hit rates, connection health, and vacuum status.
Quick Start & Requirements
docker pull crystaldba/postgres-mcp
uv
): uv pip install postgres-mcp
unrestricted
or restricted
).pg_statements
and hypopg
for advanced features.Highlighted Details
restricted
mode with read-only transactions and query execution time limits for safer production use.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
pglast
parsing and may be circumvented if unsafe stored procedure languages are enabled.2 months ago
Inactive