# Postgres MCP

Postgres MCP is an open source Model Context Protocol (MCP) server for PostgreSQL that gives AI agents structured database access with index tuning, query explain plans, health checks, and safe SQL execution across. It is open source and self-hosted, installable on Unraid and Docker Hub.

Canonical page: https://ourlocalhost.com/app/1119/postgres-mcp

## Description

Postgres MCP Pro is an open source Model Context Protocol (MCP) server for PostgreSQL that gives AI agents structured database access with index tuning, query explain plans, health checks, and safe SQL execution across the full development lifecycle.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

62/100 (Good), based on 5 of 5 factors.
- Maintained: 66 (last commit 97 days ago)
- Popular: 71 (3,450 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)
- Light to run: 60 (2 GB minimum RAM, runs on ARM)
- Security check: 70 (no serious findings, 5 minor, CI, tests)

## Links

- GitHub: https://github.com/crystaldba/postgres-mcp
- Unraid: https://ca.unraid.net/apps/postgres-mcp-1uaw2wp06c2ocl?q=postgres-mcp
- Docker Hub: https://hub.docker.com/r/crystaldba/postgres-mcp

## Common questions

### What connection values must be set before starting postgres-mcp?

The database name and timezone are required before starting the connection, and missing them can prevent the app from connecting. A Postgres username may also be required, and the wrong account can cause access errors.

### Does postgres-mcp support Server-Sent Events?

It supports both the Standard Input/Output transport and Server-Sent Events transport.

### Can a Cursor update break an existing Postgres MCP setup?

One Cursor forum report says a Postgres MCP server that worked in Cursor 0.46 stopped working after updating to Cursor 0.47.8.

## Alternatives

- Apache Cassandra
- CockroachDB: CockroachDB is a distributed SQL database for developers and operators of transactional applications that need horizontal scaling and resil…
- CouchDB: CouchDB is a document-oriented NoSQL database with a RESTful HTTP/JSON interface for storing, querying, and synchronising JSON documents ac…
- FerretDB: FerretDB is an open-source MongoDB compatibility proxy for self-hosted stacks.
- Firebird: Firebird is a relational database offering many ANSI SQL-92 features that runs on Linux, Windows, and a variety of Unix platforms.
- Microsoft SQL Server: SQL Server delivers on Microsoft’s Data Platform vision by helping your organization manage your data by enabling you to store data from st…
- MindsDB: MindsDB is an AI data solution that enables humans, AI, agents, and applications to query data in natural language and SQL, and get highly…
- MongoDB: MongoDB is an open-source, document-oriented NoSQL database that stores flexible, JSON-like documents, helping developers and self-hosters…
- MySQL Community Edition: Free GPL database platform supporting SQL and NoSQL applications with InnoDB storage, replication, clustering, connectors, and cross-platfo…
- SQLite: SQLite is a lightweight, embedded relational database engine that stores an entire database in a single file on your device.
- SurrealDB: SurrealDB is a modern "all-in-one" database that stores and organises your app's information.
- mariadb: MariaDB is a fast, open-source relational database server forked from MySQL by its original developers.

---
Source: Our Local Host (https://ourlocalhost.com/app/1119/postgres-mcp), the self-hosted and open-source app directory.
