# Postgres MCP Pro

> A Postgres MCP server with index tuning, explain plans, health checks, and safe SQL execution

Source: https://talira.ai/catalog/postgres-mcp-pro-j2wvmkav
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: MCP server
- Categories: [ai / mcp / servers](https://talira.ai/categories/ai/mcp/servers), [databases / postgres / monitoring](https://talira.ai/categories/databases/postgres/monitoring), [databases / postgres](https://talira.ai/categories/databases/postgres)
- Platforms: docker[^1][^4]
- Licence: MIT[^2][^3]
- Pricing: Free and open source[^2]
- Pricing notes: Free under MIT.
- Free tier: yes[^2]
- Self-hostable: yes[^1]
- MCP server: yes[^1]
- Supports: [MCP](https://talira.ai/standards/mcp.md)[^1]
- Backed by: [Crystal DBA](https://talira.ai/orgs/crystal-dba.md)

Postgres MCP Pro is Crystal DBA's MIT-licensed MCP server, written in Python, that gives AI agents in [Claude](https://talira.ai/catalog/claude-w14d0j2d.md) Desktop, [Cursor](https://talira.ai/catalog/cursor-x8ypqq22.md), Windsurf and other clients access to a [PostgreSQL](https://talira.ai/catalog/postgresql-cm55wcnd.md) database along with tools to tune it. Besides listing schemas and objects and running SQL, it reports the slowest queries from `pg_stat_statements`, recommends indexes for a workload or for up to 10 queries using a version of Microsoft's Anytime algorithm for database tuning, simulates hypothetical indexes in EXPLAIN plans with `hypopg`, and runs deterministic health checks (buffer cache, connections, constraints, duplicate, unused or invalid indexes, sequences and vacuum) that build on [PgHero](https://talira.ai/catalog/pghero-jt9sfs5t.md)'s. Unrestricted mode allows reads and writes for development; restricted mode runs SQL in read-only transactions with an execution time limit for production. It installs with [pipx](https://talira.ai/catalog/pipx-e5h3wgnb.md) or [uv](https://talira.ai/catalog/uv-4x6kck1t.md) as `postgres-mcp`, or as a [Docker](https://talira.ai/catalog/docker-engine-9442r3nw.md) image, and speaks stdio and SSE; it has no vector or hybrid search tools.

## Links

- GitHub: https://github.com/crystaldba/postgres-mcp

## Problems it solves

- let my AI coding assistant query our production Postgres without any way to change data
- find out which indexes to add to speed up my slow Postgres queries
- ask an agent why my app's database is slow and get recommendations backed by the real query planner
- test whether a new Postgres index would help a query before creating it on production
- check my Postgres database for unused or duplicate indexes, vacuum problems and sequences close to their limit
- see the slowest queries in my database from pg_stat_statements by asking my AI assistant
- give Cursor or Claude full read and write access to my local development database to fix slow ORM queries
- an MCP server for Postgres that runs in Docker and connects to RDS, Cloud SQL or Azure databases
- stop an AI agent's SQL queries from running too long against our production database

## Features

- list_schemas, list_objects and get_object_details for schema context
- execute_sql, read-only in restricted mode
- explain_query, with hypothetical indexes through hypopg
- get_top_queries from pg_stat_statements by total or mean execution time
- analyze_workload_indexes and analyze_query_indexes (up to 10 queries): index recommendations from an Anytime database tuning advisor search
- analyze_db_health: buffer cache hit rates, connections, constraints, duplicate, unused or invalid indexes, sequence limits and vacuum health
- unrestricted (read/write) and restricted (read-only transactions, execution time limit) access modes
- stdio and SSE transports
- Docker image remaps localhost to the host automatically
- tested on Postgres 15, 16 and 17

## Limitations

- No vector or hybrid search tools: its tools cover schemas, SQL, EXPLAIN plans, index tuning and health checks[^1]

## Capabilities

- Has an MCP server: plan not known

## Trust

Overall: 0.32 out of 1.
Signals: backing 0.30, extensibility 0.20.

- backed by Crystal DBA
- has an MCP server for agents

Warnings:

- GitHub activity not fetched yet

## Related

- Works with [PostgreSQL](https://talira.ai/catalog/postgresql-cm55wcnd.md)

## Alternatives

- [PgHero](https://talira.ai/catalog/pghero-jt9sfs5t.md): A performance dashboard for Postgres
- [pgEdge Postgres MCP Server](https://talira.ai/catalog/pgedge-postgres-mcp-server-fr903afd.md): A PostgreSQL MCP server with a Natural Language Agent CLI and Web UI
- [MCP Toolbox for Databases](https://talira.ai/catalog/mcp-toolbox-for-databases-yx1af6jx.md): An open source MCP server for databases
- [Supabase MCP Server](https://talira.ai/catalog/supabase-mcp-server-tr5yrypf.md): Supabase's official MCP server: connect AI assistants to your Supabase projects

## Sources

[^1]: https://github.com/crystaldba/postgres-mcp (checked 20 Nov 2026)
[^2]: https://github.com/crystaldba/postgres-mcp/blob/main/LICENSE (checked 20 Nov 2026)
[^3]: https://pypi.org/project/postgres-mcp/ (checked 20 Nov 2026)
[^4]: https://hub.docker.com/r/crystaldba/postgres-mcp (checked 20 Nov 2026)
