Postgres MCP Pro Server: Setup for Claude, Cursor and Other Apps
Not the official PostgreSQL MCP server. This one is built by the community. PostgreSQL makes its own: MCP Toolbox for Databases →
Lets your assistant check the health of your Postgres database, explain slow queries, suggest indexes and run SQL.
Postgres MCP Pro is a community server from Crystal DBA, not from the Postgres project. It runs on your computer and connects to your database with a connection string that you give it.
By default it can change data, because the SQL tool runs whatever it is given. Start it in restricted mode to limit it to read-only queries with a time limit.
Good for
- Developers tuning slow Postgres queries
- Database admins who want a health check from chat
- Teams that want read-only access to production data
- Anyone who wants index advice without reading query plans
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install Postgres MCP Pro
Claude Code
- 1
Copy this prompt.
Add the Postgres MCP Pro server to Claude Code. Run this command: claude mcp add postgres-pro -e DATABASE_URI=<DATABASE_URI> -- uvx postgres-mcp Ask me for DATABASE_URI and only put the values in that config, nowhere else. Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires uv (Python).
Built from the package data we hold. Not yet tested by us.
Tools
Lists the schemas in your database
Returns every schema in the Postgres instance.
Try: “What schemas does this database have?”
Read ·
list_schemasLists tables, views, sequences and extensions
Shows the objects inside one schema.
Try: “List the tables in the public schema.”
Read ·
list_objectsShows a table's columns, constraints and indexes
Returns the structure of one table, view or other object.
Try: “Describe the orders table.”
Read ·
get_object_detailsRuns SQL on your database
Runs any SQL statement you or the assistant write. In the default unrestricted mode it can insert, update and delete data and change the schema. In restricted mode it only runs read-only transactions with a time limit.
Try: “Show the 10 newest rows in orders.”
Delete ·
execute_sqlShows how Postgres would run a query
Returns the execution plan and cost estimates for a query. It can also test the effect of indexes that do not exist yet.
Try: “Explain the plan for this slow query.”
Read ·
explain_queryFinds your slowest queries
Reports the queries that took the most total time, using the pg_stat_statements data.
Try: “Which queries are slowest?”
Read ·
get_top_queriesSuggests indexes for your whole workload
Looks at the most expensive queries and recommends indexes that would speed them up.
Try: “Which indexes should I add?”
Read ·
analyze_workload_indexesSuggests indexes for specific queries
Takes up to 10 queries you give and recommends indexes for them.
Try: “Recommend indexes for these three queries.”
Read ·
analyze_query_indexesRuns a database health check
Checks cache hit rates, connections, constraints, duplicate or unused indexes, sequence limits and vacuum health.
Try: “Check the health of my database.”
Read ·
analyze_db_health
Read from the source code
Permissions
high risk · 3 things to watch
High risk
By default it can read, change and delete data and schema, because it runs any SQL it is given. Use restricted mode, and connect with a database user that has only the rights you want the assistant to have.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
It can change or delete data by default
The default mode is unrestricted, and the SQL tool runs any statement. Use --access-mode=restricted, and a database user with limited rights. github.com
Restricted mode is not a guarantee
The authors say restricted mode is conservative but may not yet be safe for production databases. Prefer a read-only database user as well. github.com
Password sits in the connection string
The database password is part of the connection string in your client config. Keep that file private. github.com
Security advisories
No published security advisories as of Nov 2, 2026.
Technical details
| Turning on read-only | Start the server with --access-mode=restricted instead of --access-mode=unrestricted. Restricted mode allows only read-only transactions and limits execution time. |
|---|---|
| Talks to | Your Postgres host |
| Sign-in and keys | The database password is part of the DATABASE_URI connection string in your client config. |
| Scopes |
|
Questions
Is Postgres MCP Pro official?
No. It is made by Crystal DBA, not by the Postgres project, and ships from the crystaldba/postgres-mcp repository.
Can I make it read-only?
Yes. Start it with --access-mode=restricted, which allows only read-only transactions with a time limit. The README says it may still not be safe for production, so also use a read-only database user.
What do I need to run it?
A Postgres connection string in the DATABASE_URI setting, plus uv or Docker. Python 3.12 or newer is required for the PyPI package.
Does it work with managed Postgres like RDS?
Yes, if you can connect with a connection string. Some features need the pg_stat_statements and hypopg extensions, which the README says you can install on RDS, Azure and Cloud SQL.
Does it run locally?
Yes. It runs on your computer and talks straight to your database. An SSE mode for network use also exists and binds to localhost by default.
Is the tool list complete?
It lists the 9 tools in the README and source. The PyPI release (0.3.0) is older than the main branch, so check the version you install.
Information
updated Nov 2, 2026
- Publisher
- Community
- Package
postgres-mcp- Registry
- PyPI
- Transport
- stdio, SSE
- Auth
- token in env
- License
- MIT
- Last commit
- Aug 17, 2026
Other PostgreSQL MCP servers
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 3Hide
- README.md · github.com
- https://pypi.org/project/postgres-mcp/ · pypi.org
- server.py · github.com