Best for
- PostgreSQL developers needing deep performance analysis and index tuning
- DBAs who need read-only access and health checks in production
- Teams that want AI assistants to help with database optimization and monitoring
Postgres MCP Pro is a feature-rich PostgreSQL MCP server offering health checks, index tuning, and safe SQL execution. Its use of classic optimization algorithms rather than relying solely on LLMs enhances reliability. Suitable for teams aiming to boost database performance and AI-assisted development.
Strongest · Setup experience 11/20 Weakest · Security and permissions 7/20
Static review · not runListed 2026-08-07
Read the FMRS scoring method →Runtime:Docker · Python 3.12+
DATABASE_URI
Postgres connection URI in the form postgresql://username:password@localhost:5432/dbname, using your own database credentials; required.
OPENAI_API_KEY
OpenAI API key, only needed for the experimental LLM-based index tuning feature; obtain it from platform.openai.com.
docker pull crystaldba/postgres-mcp) or Python (via pipx or uv install postgres-mcp).--access-mode=unrestricted or --access-mode=restricted).pg_stat_statements and hypopg) for index tuning and performance analysis.{
"mcpServers": {
"postgres": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DATABASE_URI",
"crystaldba/postgres-mcp",
"--access-mode=unrestricted"
],
"env": {
"DATABASE_URI": "postgresql://username:password@localhost:5432/dbname"
}
}
}
}
Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.
{
"servers": {
"postgres": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"DATABASE_URI",
"crystaldba/postgres-mcp",
"--access-mode=unrestricted"
],
"env": {
"DATABASE_URI": "postgresql://username:password@localhost:5432/dbname"
}
}
}
}
Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).
claude mcp add postgres -e DATABASE_URI=postgresql://username:password@localhost:5432/dbname -- docker run -i --rm -e DATABASE_URI crystaldba/postgres-mcp --access-mode=unrestricted
Run it in a terminal; replace any <…> placeholders with your own values first.
After startup, the client's tool list should show tools such as list_schemas, execute_sql, and analyze_db_health; asking "Check the health of my database and identify any issues" and getting buffer cache hit rate, connection, and index health results confirms the connection works.
Once connected, you can ask your AI assistant things like:
No matching tools
Listed from the project's documentation, not tested by this site.
Postgres MCP Pro is an open-source Model Context Protocol (MCP) server that supports developers and AI agents across the entire development lifecycle, from initial coding to production tuning and maintenance. It offers database health checks, index tuning, query plan analysis, safe SQL execution, and more, with configurable access modes for development and production environments.
Connect ClickHouse to your AI assistants
Unofficial MCP server providing advanced access to the ChEMBL chemical database
Google's official database MCP toolbox — define AI-accessible database tools via config
Bytebase's official, minimalist two-tool database MCP server
Source revision 15c8e3335354 Data synced 2026-10-12 Read the FMRS scoring method