Back to MCP Servers

Postgres MCP Pro (community)

Connect agents to PostgreSQL with configurable read-only or read-write modes, schema introspection, query plans, and health checks.

Category: Data · Works with: Claude Code, Grok Build, Claude Desktop, Cursor

What it does

Lets agents explore schemas, run queries, and analyze performance. The original @modelcontextprotocol/server-postgres is archived — use a maintained community server like crystaldba/postgres-mcp, or your database provider's official MCP (e.g. Supabase).

Install

uvx postgres-mcp --access-mode=restricted

Setup Instructions

claude Code
claude mcp add postgres --env DATABASE_URI=postgresql://user:pass@localhost:5432/db -- uvx postgres-mcp --access-mode=restricted
claude Desktop
Prefer restricted (read-only) mode for agent work unless you explicitly need writes. Set DATABASE_URI in the server's env block.
Official documentation