Who makes Postgres MCP Pro? Is it official?
It is created and maintained by Crystal DBA. It is not an official PostgreSQL project, and it is a different project from the archived reference Postgres MCP server.
@crystaldba
Basic information
Postgres MCP Pro provides configurable read/write access and performance analysis for you and your AI agents.
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"postgres-mcp": {
"command": "docker",
"args": [
"pull",
"crystaldba/postgres-mcp"
]
}
}
}Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Postgres MCP Pro is an open-source postgres mcp server from Crystal DBA that gives AI agents safe SQL execution, schema intelligence, EXPLAIN plans, database health checks and index tuning for PostgreSQL.
It does more than wrap a database connection. Alongside running queries, it adds deterministic tools for performance work: it finds slow queries with pg_stat_statements, simulates hypothetical indexes with hypopg, and searches for an index configuration that suits your workload. A restricted, read-only access mode makes it usable against production databases. It is MIT-licensed, published on PyPI as postgres-mcp and on Docker Hub as crystaldba/postgres-mcp, and supports both stdio and SSE transports.
Prerequisites: a PostgreSQL connection URI (check it first with psql or pgAdmin) and either Docker or Python 3.12+. The maintainers generally recommend Docker, because Python installs can hit more environment-specific issues.
Install one way:
docker pull crystaldba/postgres-mcp
# or
pipx install postgres-mcp
# or
uv pip install postgres-mcp
Choose an access mode: --access-mode=unrestricted allows full read/write access to data and schema (for development); --access-mode=restricted limits the agent to read-only transactions and caps execution time (for production).
Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json, Windows: %APPDATA%/Claude/claude_desktop_config.json). With Docker:
{
"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"
}
}
}
}
The Docker image remaps localhost automatically (host.docker.internal on macOS/Windows, 172.17.0.1 or the right host address on Linux). With uvx instead:
{
"mcpServers": {
"postgres": {
"command": "uvx",
"args": ["postgres-mcp", "--access-mode=restricted"],
"env": {
"DATABASE_URI": "postgresql://username:password@localhost:5432/dbname"
}
}
}
}
If you installed with pipx, use "command": "postgres-mcp"; with uv, use "command": "uv" and "args": ["run", "postgres-mcp", "--access-mode=unrestricted"].
Add the same stdio command with the Claude Code CLI:
claude mcp add postgres \
-e DATABASE_URI=postgresql://username:password@localhost:5432/dbname \
-- uvx postgres-mcp --access-mode=restricted
Open Cursor Settings from the Command Palette, go to the MCP tab and paste one of the mcpServers blocks above. Windsurf (Open Windsurf Settings Page), Goose (goose configure → Add Extension) and Qodo Gen use the same configuration.
Start the server with --transport=sse:
docker run -p 8000:8000 \
-e DATABASE_URI=postgresql://username:password@localhost:5432/dbname \
crystaldba/postgres-mcp --access-mode=unrestricted --transport=sse
Then point Cursor (mcp.json) or Cline at it with {"type": "sse", "url": "http://localhost:8000/sse"}. Windsurf uses serverUrl instead of url.
For index tuning and workload analysis, enable pg_stat_statements and hypopg. On managed services such as AWS RDS, Azure or Google Cloud SQL they are usually available already:
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
CREATE EXTENSION IF NOT EXISTS hypopg;
list_schemas, list_objects (tables, views, sequences, extensions) and get_object_details (columns, constraints, indexes).execute_sql, read-only when the server runs in restricted mode.explain_query returns the execution plan and can include hypothetical indexes.get_top_queries reports the slowest queries from pg_stat_statements; analyze_workload_indexes recommends indexes for the whole workload; analyze_query_indexes does the same for up to 10 specific queries.analyze_db_health runs the full set of health checks.postgres-mcp name) mainly run queries and list tables. Check the package and author before installing.localhost, but confirm the URI works with psql from the host first, and that Postgres accepts connections from the Docker network.pg_stat_statements and hypopg. On self-managed Postgres, pg_stat_statements must be listed in shared_preload_libraries, and hypopg may need a system package.--access-mode=unrestricted only in development.-p 8000:8000) and that the client uses /sse; Windsurf needs serverUrl.It is created and maintained by Crystal DBA. It is not an official PostgreSQL project, and it is a different project from the archived reference Postgres MCP server.
Yes. It is open source under the MIT license and runs on your own machine or infrastructure.
Use `--access-mode=restricted`. It limits the agent to read-only transactions and caps execution time. Unrestricted mode allows changes to data and schema and is meant for development.
Testing currently focuses on Postgres 15, 16 and 17; the maintainers plan to support 13 through 17.
Yes. It connects with a standard connection URI, and the README covers enabling the extensions on AWS RDS, Azure SQL and Google Cloud SQL with `CREATE EXTENSION`.
The README gives full steps for Claude Desktop, plus Cursor, Windsurf, Goose, Qodo Gen and Cline. Other clients that run stdio or SSE MCP servers, including Claude Code, can use the same command.
By default it runs locally over stdio. With `--transport=sse` it can run as a shared server that several clients connect to over HTTP.
No. It only needs a `DATABASE_URI` for your PostgreSQL database.
Local MCP server for DuckDB and MotherDuck
Connect ClickHouse to your AI assistants.

Model Context Protocol Servers

Model Context Protocol Servers

Access millions of official legal and regulatory source documents from 155+ jurisdictions via MCP. Lawstronaut supports AI agents with structured legal research, legal data, laws, regulations, cases, guidance, official s
Comments