PostgreSQL Official MCP Server MCP Configuration
Read-only schema inspection, table relation discovery, and parameterized SQL query execution for PostgreSQL databases across Cursor, Claude Desktop, and VS Code.
Select Blueprint
Protocol Latency Profile
stdio (Local Node/NPX)1.4ms IPC
SSE (HTTP EventStream)28ms Edge
Streamable HTTP (/mcp)19ms Stateless
Transport:
stdio · 14ms schema reflection / 22ms parameterized query round-trip
PostgreSQL Official MCP Server
@modelcontextprotocol/server-postgres
Compiling MCP client configuration…
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://readonly_user:password@localhost:5432/production_db"
],
"env": {
"PGSSLMODE": "require"
}
}
}
}
Inspect Sandbox & Env Secret Policy
All synthesized MCP definitions isolate secret keys via interactive prompt inputs and wrap Win11 child processes safely.
"inputs": [{ "type": "promptString", "id": "api_key", "password": true }]
Environment Variables for PostgreSQL Official MCP Server
| Variable Key | Requirement | Example Format | Guidance |
|---|---|---|---|
PGSSLMODE |
Optional | require |
Enforce TLS verification when connecting to managed cloud PostgreSQL instances (Neon, RDS, Supabase). |
Agency & Team Registry Lifetime Buyout
$49 one-time payment
- Unlimited seats & shared .cursor/mcp.json lockfiles
- Windows 11 cmd /c wrapper & secret-leak CI validation
- Private internal MCP server blueprint hosting
Recurring & Sponsor Tiers
Team Registry Pro
$19/mo · 25 developer seats
Weekly Ecosystem Sponsor
$99/wk · Header & llms.txt slot