Back to MCP ServersOfficial documentation
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.
Compatible Agents
Claude CodeGrok BuildClaude DesktopCursor
Related MCP Servers
@modelcontextprotocol/server-filesystem
Reference filesystem access for agents. Read, write, list, move, and search files within explicitly allowed directories.
GitHub MCP Server
GitHub's official MCP server. Manage issues, PRs, branches, workflows, and code scanning — or just let the agent read your repos.
mcp-server-git
Reference Git server. Status, diff, log, branch, commit, and search — structured Git operations for repos the agent works in.