pg-mcp-server
Provides a Model Context Protocol (MCP) server that connects to a PostgreSQL database and exposes MCP tools/resources for listing tables, retrieving table schema/sample data, and executing SQL queries through a controlled interface.
Score Breakdown
⚙ Agent Friendliness
🔒 Security
Security largely depends on protecting the network and using a least-privilege Postgres user in DATABASE_URL. HTTP transport is mentioned without documented auth; there is an option to enable write ops (DANGEROUSLY_ALLOW_WRITE_OPS) which increases risk if misconfigured. TLS/HTTP security details and error-safe handling of secrets are not specified in the provided content.
⚡ Reliability
Best When
You run the MCP server locally or in a trusted network and want an agent-friendly bridge to Postgres with a simple configuration via DATABASE_URL.
Avoid When
You need strong transport security guarantees for remote clients, fine-grained authorization, or well-defined rate-limit/retry semantics for high-throughput production use.
Use Cases
- • LLM-assisted database exploration (schemas, sample data)
- • Querying PostgreSQL from an MCP-capable client via a standardized interface
- • Building agent workflows that need read-only (or optionally write) access to a Postgres database
Not For
- • Publicly exposed production databases without additional network/auth controls
- • Use cases requiring fine-grained, per-user permissions beyond what the database user allows
- • Workloads needing strict audit/compliance guarantees (not documented here)
Interface
Authentication
No separate user authentication for the MCP server is described; access is governed by the Postgres credentials and the DANGEROUSLY_ALLOW_WRITE_OPS flag.
Pricing
Open-source npm package (MIT) per provided metadata; no pricing details in the provided content.
Agent Metadata
Known Gotchas
- ⚠ Write operations are disabled by default but can be enabled; agents should respect DANGEROUSLY_ALLOW_WRITE_OPS and database permissions.
- ⚠ For safety, the Postgres user in DATABASE_URL should be restricted (e.g., read-only) when using agent-driven SQL.
- ⚠ HTTP transport is described but no authentication/rate-limit behavior is documented; do not expose to untrusted networks.
Alternatives
Full Evaluation Report
Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for pg-mcp-server.
AI-powered analysis · PDF + markdown · Delivered within 30 minutes
Package Brief
Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.
Delivered within 10 minutes
Score Monitoring
Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.
Continuous monitoring
Scores are editorial opinions as of 2026-03-30.