Postgres
Query PostgreSQL, inspect schemas and tables, and review query plans through MCP with read-only defaults.
Install Postgres
Pick your client, then add it in one click or paste the config.
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"mcp-pg-server"
],
"env": {
"DATABASE_URL": "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.
claude mcp add --env DATABASE_URL=YOUR_VALUE_HERE --transport stdio postgres -- npx -y mcp-pg-serverRun in your terminal. Add --scope project to share it with your team through .mcp.json.
We couldn’t confirm it starts correctly
The install command installed and started the server, which then stopped for configuration (such as an API key) that our sandbox does not have — expected for servers that connect to your account.
npx -y mcp-pg-serverNo response to initialize.
This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .
Overview
Use cases
- Query development data from an AI assistant
- Inspect tables and columns before writing SQL
- Compare PostgreSQL query execution plans
- List schemas in a local database
- Check table row counts
Key features
- PostgreSQL SQL queries with read-only defaults
- Schema and table metadata inspection
- Text-format EXPLAIN plans
- Per-call connection overrides
- Support for local and development databases
Tools5
What Postgres 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.
Supply-chain signal
No high-severity advisories surfaced by our automated scan.
Scanned 5d ago via OSV.dev · mcp-pg-server (npm)
Adoption & maintenance
Factual signals from GitHub, npm, and our automated checks — not a rating.
How Postgres works
Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings
Reviews
No reviews yet — be the first to share how it worked for you.
Frequently Asked Questions about Postgres
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/postgres)<a href="https://allmcps.com/mcp/postgres"><img src="https://allmcps.com/api/badge/postgres?style=directory" alt="Postgres on AllMCPs" /></a>