Postgres MCP Pro
A PostgreSQL MCP server with index tuning, EXPLAIN plans, database health checks and a read-only mode
- 3,437 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- Works with a database and can change data in unrestricted mode
- Keeps database credentials in the config
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/postgres-mcp-proDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Works with a database and can change data in unrestricted mode
- Keeps database credentials in the config
This is third-party code. Review the repository files before installing.
What it does
The server gives the agent DBA tools rather than bare SQL execution. It checks index health, connection usage, buffer cache, vacuum, sequence limits and replication lag. Index tuning searches candidate indexes for your workload, and EXPLAIN plans can be compared with hypothetical indexes. Unrestricted mode suits development, while restricted mode limits work to read-only transactions with an execution time cap.
Who it is for. For backend developers and PostgreSQL admins hunting slow queries and database problems.
Good fit when
- The app is slow and you need to find slow queries and missing indexes
- You need to check a production database without risk of changes
- You want the agent to write SQL that matches the real schema
Not a fit when
- Your database is not PostgreSQL
- The agent must not see database data
Example request
Check database health and suggest indexes for the slowest queriesMCP
- Transport
- stdio, sse
- Authentication
- API key
Environment variables
DATABASE_URIrequired, secret- PostgreSQL connection URI
Limitations
Requires Docker or Python 3.12 and a database connection string. Some analysis needs the pg_stat_statements and hypopg extensions. In unrestricted mode the agent can change data and schema; use restricted for production.
How to disable. Remove the postgres block from the MCP client config.
FAQ
Is it safe for a production database?
Use restricted mode: it allows only read-only transactions and caps execution time.
Docker or Python?
The authors recommend Docker because Python installs hit more environment issues.
How is Postgres MCP Pro different from a plain SQL server?
Besides running SQL the server gives the agent DBA tools: index health, connection usage, buffer cache, vacuum, sequence limits, replica lag, index tuning and EXPLAIN plans. A read-only mode is available.
Is it safe to connect Postgres MCP Pro to a production database?
Turn on read-only mode and give a separate role with minimal rights. In Claude Desktop, Claude Code, Cursor and Windsurf the server connects with the uvx command, as in the install block. Risk is high.
Discussion
No questions or reviews yet.
Related
MCP serversInstant REST and MCP over PostgreSQL: the agent reads an existing database through an MCP endpoint with no backend to write
Two official Prisma MCP servers: a local one for migrations and Prisma Studio, and a remote one for managing Prisma Postgres databases
Supabase's official MCP server: the agent manages tables, reads project config and queries data after an OAuth login
mcp-graphql: MCP server for GraphQL APIs
mcp-graphql
Two GraphQL tools for MCP clients: the agent fetches your API schema and runs queries against a single endpoint
The pscale CLI for PlanetScale MySQL and PostgreSQL databases: branches, deploy requests, SQL and diagnostics, with an agent guide
Apollo's MCP server: turns chosen GraphQL operations into tools the agent uses to work with your API
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| Postgres MCP Pro (this entry) | no | API key | 3,437 | |
| PG-MCP Server | no | not required | 540 | an MCP server for PostgreSQL with several databases at once |
| pgEdge Postgres MCP | no | not required | 241 | postgres MCP in Go with read-mode queries |
| Postgres MCP (Microsoft) | no | key is optional | 68 | postgres MCP from Microsoft |
README in short
The README covers five areas: database health, index tuning, query plans, schema understanding and safe SQL execution. A demo walkthrough shows the server speeding up a slow SQLAlchemy app. Installation uses the Docker image or pipx and uv, with Claude Desktop configs and pointers for Cursor and Windsurf. Stdio and SSE transports are supported. MIT licensed.