postgres-mcp-server

Provides an MCP (Model Context Protocol) server that enables an AI assistant to interact with a PostgreSQL database using three tools: execute_query (SELECT/read), ddl_query (schema changes), and modify_query (INSERT/UPDATE/DELETE). The README claims queries are validated and restricted to block dangerous operations (e.g., DROP/administrative commands) before execution.

Evaluated Apr 04, 2026 (16d ago)
Repo ↗ API Gateway mcp postgresql golang database ai sql stdio model-context-protocol
⚙ Agent Friendliness
38
/ 100
Can an agent use this?
🔒 Security
44
/ 100
Is it safe for agents?
⚡ Reliability
16
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
55
Documentation
55
Error Messages
0
Auth Simplicity
30
Rate Limits
0

🔒 Security

TLS Enforcement
70
Auth Strength
25
Scope Granularity
35
Dep. Hygiene
35
Secret Handling
60

README claims query validation and blocking of dangerous operations (e.g., DROP/TRUNCATE/GRANT) and mentions SSL support for PostgreSQL. However, there is no documented MCP-level authentication/authorization, no documented per-tool/per-scope access control beyond the conceptual separation of tools, and no explicit statement about audit logging, SQL parameterization approach in the MCP layer (beyond a claim that GORM helps against SQL injection). Security therefore relies strongly on running the MCP server behind trusted boundaries and using a least-privilege database role.

⚡ Reliability

Uptime/SLA
0
Version Stability
20
Breaking Changes
20
Error Recovery
25
AF Security Reliability

Best When

You run the MCP server in a trusted environment (e.g., local/dev or tightly controlled backend) and use database credentials with least privilege to limit what the assistant can do.

Avoid When

When you cannot enforce network/trust boundaries or cannot ensure the database user has least-privilege permissions, since the assistant may still be able to execute allowed statements that impact data.

Use Cases

  • Allowing AI assistants to run safe read-only analytics queries (SELECT) against PostgreSQL
  • Enabling controlled schema changes via an AI workflow (CREATE/ALTER/etc.)
  • Performing controlled data modifications (INSERT/UPDATE/DELETE) with validation

Not For

  • Public-facing usage where untrusted users can directly trigger SQL execution via the MCP tool
  • Use cases requiring strict auditing/traceability of every SQL statement beyond basic validation claims
  • Environments that require API-level authentication/authorization for the MCP server itself (no such mechanism is documented here)

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
Yes
SDK
No
Webhooks
No

Authentication

OAuth: No Scopes: No

No authentication/authorization mechanism for the MCP transport is described. Connection security is handled via PostgreSQL credentials; therefore security depends heavily on where/how the MCP server is exposed and the permissions of the database user.

Pricing

Free tier: No
Requires CC: No

Open source (MIT) per repository metadata; pricing not applicable.

Agent Metadata

Pagination
none
Idempotent
False
Retry Guidance
Not documented

Known Gotchas

  • The server does not automatically LIMIT results; agents should include LIMIT to avoid huge result sets and timeouts.
  • Tool routing matters: SELECT queries go to execute_query; schema changes go to ddl_query; data modifications go to modify_query.
  • Validation/rules are described at a high level in README; exact allow/deny behavior may differ, so agents may need to iteratively adapt to rejected queries.

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for postgres-mcp-server.

AI-powered analysis · PDF + markdown · Delivered within 30 minutes

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-04-04.

8642
Packages Evaluated
17761
Need Evaluation
586
Need Re-evaluation
Community Powered