MCP server for Postgres with tools for index tuning, query plans, health checks, and safe SQL execution.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Postgres MCP.
Postgres MCP Pro is an open source Model Context Protocol (MCP) server built to support you and your AI agents throughout the entire development processβfrom initial coding, through testing and deployment, and to production tuning and maintenance.
Postgres MCP Pro does much more than wrap a database connection.
Features include:
Postgres MCP Pro supports both the Standard Input/Output (stdio) and Server-Sent Events (SSE) transports, for flexibility in different environments.
For additional background on why we built Postgres MCP Pro, see our launch blog post.
From Unusable to Lightning Fast
What we did:
See the video below or read the play-by-play.
https://github.com/user-attachments/assets/24e05745-65e9-4998-b877-a368f1eadc13
Before getting started, ensure you have:
You can confirm your access credentials are valid by using psql or a GUI tool such as pgAdmin.
The choice to use Docker or Python is yours. We generally recommend Docker because Python users can encounter more environment-specific issues. However, it often makes sense to use whichever method you are most familiar with.
Choose one of the following methods to install Postgres MCP Pro:
Pull the Postgres MCP Pro MCP server Docker image. This image contains all necessary dependencies, providing a reliable way to run Postgres MCP Pro in a variety of environments.
If you have pipx installed you can install Postgres MCP Pro with:
Otherwise, install Postgres MCP Pro with uv:
If you need to install uv, see the uv installation instructions.
We provide full instructions for configuring Postgres MCP Pro with Claude Desktop. Many MCP clients have similar configuration files, you can adapt these steps to work with the client of your choice.
You will need to edit the Claude Desktop configuration file to add Postgres MCP Pro. The location of this file depends on your operating system:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.jsonYou can also use Settings menu item in Claude Desktop to locate the configuration file.
You will now edit the mcpServers section of the configuration file.
The Postgres MCP Pro Docker image will automatically remap the hostname localhost to work from inside of the container.
host.docker.internal automatically172.17.0.1 or the appropriate host address automaticallyuvxpipxuvReplace postgresql://... with your Postgres database connection URI.
Postgres MCP Pro supports multiple access modes to give you control over the operations that the AI agent can perform on the database:
To use restricted mode, replace --access-mode=unrestricted with --access-mode=restricted in the configuration examples above.
Many MCP clients have similar configuration files to Claude Desktop, and you can adapt the examples above to work with the client of your choice.
Command Palette to Cursor Settings, then open the MCP tab to access the configuration file.Command Palette to Open Windsurf Settings Page to access the configuration file.goose configure, then select Add Extension.Connect more tools, click + Add new MCP, then add the new configuration.Postgres MCP Pro supports the SSE transport, which allows multiple MCP clients to share one server, possibly a remote server.
To use the SSE transport, you need to start the server with the --transport=sse option.
For example, with Docker run:
Then update your MCP client configuration to call the the MCP server.
For example, in Cursor's mcp.json or Cline's cline_mcp_settings.json you can put:
For Windsurf, the format in mcp_config.json is slightly different:
To enable index tuning and comprehensive performance analysis you need to load the pg_stat_statements and hypopg extensions on your database.
pg_stat_statements extension allows Postgres MCP Pro to analyze query execution statistics.
For example, this allows it to understand which queries are running slow or consuming significant resources.hypopg extension allows Postgres MCP Pro to simulate the behavior of the Postgres query planner after adding indexes.Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/crystaldba-postgres-mcp)<a href="https://allmcps.com/mcp/crystaldba-postgres-mcp"><img src="https://allmcps.com/api/badge/crystaldba-postgres-mcp?style=directory" alt="Postgres MCP on AllMCPs" /></a>