Postgres MCP
by crystaldba
Connects AI agents to Postgres for health checks, index tuning, query plans, schema-aware SQL, and controlled SQL execution.
Install Postgres MCP
Pick your client, then add it in one click or paste the config.
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"crystaldba-postgres-mcp": {
"command": "uvx",
"args": [
"postgres-mcp"
],
"env": {
"DATABASE_URI": "YOUR_VALUE_HERE"
}
}
}
}
Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.
Values are written into the snippet above so you can paste it as is. They never leave your browser.
Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.
Overview
Use cases
- Inspect database health before production changes
- Tune indexes for a slow workload
- Review EXPLAIN plans for inefficient queries
- Generate SQL using live schema context
- Restrict agent database access to read-only operations
Key features
- PostgreSQL health checks
- Workload-based index tuning
- EXPLAIN plan and hypothetical index analysis
- Schema-aware SQL generation
- Restricted and unrestricted SQL access modes
- stdio and SSE transports
Security & health
What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.
Recent health check succeeded.
Supply-chain signal
No high-severity advisories surfaced by our automated scan.
Scanned 10d ago via OSV.dev · postgres-mcp (PyPI)
Adoption & maintenance
Factual signals from GitHub, npm, and our automated checks — not a rating.
How Postgres MCP works
Reviews
No reviews yet — be the first to share how it worked for you.
Frequently Asked Questions about Postgres MCP
Related MCP servers
Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.
AllMCPs Directory Badge
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/crystaldba-postgres-mcp)<a href="https://allmcps.com/mcp/crystaldba-postgres-mcp"><img src="https://allmcps.com/api/badge/crystaldba-postgres-mcp?style=directory" alt="Postgres MCP on AllMCPs" /></a>