postgresql-mcp-server

Provides an MCP server (implemented as a Spring Boot app) that exposes read-only access to a PostgreSQL database. It offers an MCP tool to run validated SQL queries (requires WHERE clause; blocks SELECT *) and a resource endpoint for table schema discovery from information_schema.

Evaluated Apr 04, 2026 (16d ago)
Repo ↗ Databases mcp postgresql spring-boot stdio sse database-access read-only agent-tools
⚙ Agent Friendliness
42
/ 100
Can an agent use this?
🔒 Security
32
/ 100
Is it safe for agents?
⚡ Reliability
12
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
78
Documentation
62
Error Messages
0
Auth Simplicity
45
Rate Limits
0

🔒 Security

TLS Enforcement
20
Auth Strength
35
Scope Granularity
20
Dep. Hygiene
40
Secret Handling
45

Security relies primarily on using a read-only PostgreSQL account and providing database credentials via environment variables. The tool validates SQL to require WHERE and disallow SELECT * / wildcard-like patterns, which reduces but does not eliminate injection or data-exfiltration risk. TLS/authz at the MCP transport layer (especially for SSE mode) are not documented, and there is no mention of MCP-layer authorization or fine-grained scopes.

⚡ Reliability

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

Best When

You want an MCP-compatible, STDIO-based (or optional SSE mode) way to retrieve read-only, paged query results and schema metadata with basic SQL safety constraints.

Avoid When

You need robust security controls beyond “database credentials in env vars,” or you require guarantees about pagination/rate limiting/error handling behavior under load that are not documented.

Use Cases

  • Allowing an AI agent to query a PostgreSQL database in read-only mode
  • Providing schema discovery for prompt/context (table/column metadata)
  • Building Claude Desktop or VS Code MCP workflows that need read access to database tables

Not For

  • Write/update/delete access to PostgreSQL
  • Use as a general-purpose database proxy for arbitrary SQL without guardrails
  • Handling sensitive workloads where strong transport and authentication guarantees for the MCP process are not documented

Interface

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

Authentication

Methods: Database credentials via environment variables (DATABASE_URL, DATABASE_USERNAME, DATABASE_PASSWORD) Assumes MCP client connects over local transport (STDIO) as configured via container/command
OAuth: No Scopes: No

No MCP-layer authentication/authorization is described in the provided README; security appears to rely on deploying the server in a trusted environment and using a read-only database account.

Pricing

Free tier: No
Requires CC: No

Agent Metadata

Pagination
pageNumber/pageSize (zero-based pages; max 50)
Idempotent
False
Retry Guidance
Not documented

Known Gotchas

  • The query tool requires a WHERE clause and forbids SELECT *; the agent must ensure compliant SQL to avoid tool rejections.
  • Pagination is LIMIT/OFFSET based; ordering is not specified in the tool contract, so results may be nondeterministic across pages unless the agent includes an ORDER BY in the SQL.
  • Schema resources are dynamically discovered on each request; an agent may incur repeated metadata lookups and potential latency.

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for postgresql-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