PostgreSQL MCP Server
Query PostgreSQL, inspect schemas, analyze performance, monitor health, and manage access through MCP.
Install PostgreSQL MCP Server
Pick your client, then add it in one click or paste the config.
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"postgresql-mcp-server-4": {
"command": "npx",
"args": [
"-y",
"@yawlabs/postgres-mcp@latest"
],
"env": {
"DATABASE_URL": "YOUR_VALUE_HERE",
"ALLOW_WRITES": "YOUR_VALUE_HERE",
"POSTGRES_MAX_ROWS": "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— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.
Overview
Use cases
- Inspect an unfamiliar PostgreSQL schema
- Analyze slow queries and missing indexes
- Check connection pressure and lock contention
- Audit database roles and table privileges
- Review replication, bloat, and maintenance risks
Key features
- Read-only SQL execution by default
- Schema and relationship introspection
- EXPLAIN plans with optional analysis
- HypoPG-based index recommendations
- Health, lock, replication, and I/O diagnostics
- Role and table privilege inspection
Tools23
What PostgreSQL MCP Server lets your agent do. Expand a tool for its parameters.
Security & health
What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.
Recent health check succeeded.
What it can do
From the 23 tools this server returned when we ran it; 23 declare their own safety hints.
Observed 2026-10-22 in an isolated sandbox. A description of reach, not a security audit.
Supply-chain signal
No high-severity advisories surfaced by our automated scan.
Scanned 14d ago via OSV.dev · @yawlabs/postgres-mcp@latest (npm)
Adoption & maintenance
Factual signals from GitHub, npm, and our automated checks — not a rating.
How PostgreSQL MCP Server works
Reviews
No reviews yet — be the first to share how it worked for you.
Frequently Asked Questions about PostgreSQL MCP Server
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/postgresql-mcp-server-4)<a href="https://allmcps.com/mcp/postgresql-mcp-server-4"><img src="https://allmcps.com/api/badge/postgresql-mcp-server-4?style=directory" alt="PostgreSQL MCP Server on AllMCPs" /></a>