MCP PostgreSQL Server

v0.6.2

Anthropic (Archived)

MCPdatabasesqlmcpmodel-context-protocol
72
Adequate
About This MCP

ARCHIVED WITH UNPATCHED VULNERABILITY: Former Anthropic reference MCP server for PostgreSQL, archived 2025-05-29. A SQL injection flaw disclosed by Trend Micro (June 2025) remains unpatched because the repo is archived, yet the npm package still saw ~21k weekly downloads. NOT RECOMMENDED for any use; a patched community fork (@zeddotdev/postgres-context-server) exists.

Last Evaluated: June 10, 2026
Official Website

Trust Vector Analysis

Dimension Breakdown

🚀Performance & Reliability
+
query execution accuracy

Query execution testing

Evidence
PostgreSQL Driver IntegrationUses standard PostgreSQL drivers with high query accuracy
highVerified: 2025-11-09
schema introspection

Schema discovery testing

Evidence
MCP Postgres ImplementationComprehensive schema inspection including tables, columns, indexes, and constraints
highVerified: 2025-11-09
connection stability

Connection reliability testing

Evidence
PostgreSQL ReliabilityBuilt on PostgreSQL's robust connection pooling and stability
highVerified: 2025-11-09
large result handling

Large dataset performance testing

Evidence
MCP Server ImplementationHandles large result sets with pagination and limits
mediumVerified: 2025-11-09
error handling

Error scenario testing

Evidence
PostgreSQL Error ReportingDetailed error messages from PostgreSQL with proper propagation
highVerified: 2025-11-09
🛡️Security
+
sql injection protection

Vulnerability disclosure review and exploitability analysis

Evidence
Trend Micro ResearchClassic SQL injection vulnerability disclosed in the archived PostgreSQL MCP server; will never be patched in @modelcontextprotocol/server-postgres because the repository is archived
Datadog Security LabsCase study confirming SQL injection in the PostgreSQL MCP server allows bypassing the read-only transaction restriction; ~21k weekly npm downloads while vulnerable
highVerified: 2026-06-10
access control

Permission boundary testing

Evidence
PostgreSQL PermissionsInherits database user permissions but AI can execute any query within those permissions
Datadog Security LabsSQL injection allows escaping the server's intended read-only transaction sandbox, defeating its primary access-control mechanism
highVerified: 2026-06-10
data modification risk

Write operation risk assessment

Evidence
Security AnalysisAI can execute INSERT, UPDATE, DELETE operations if database user has permissions
Trend Micro ResearchUnpatched SQL injection enables write operations even when the server is configured for read-only access
highVerified: 2026-06-10
credential security

Credential storage review

Evidence
Connection String ManagementCredentials stored in configuration; requires secure credential management
mediumVerified: 2025-11-09
audit logging

Logging capabilities assessment

Evidence
PostgreSQL LoggingDepends on PostgreSQL audit configuration; MCP server provides basic query logging
mediumVerified: 2025-11-09
🔒Privacy & Compliance
+
data exposure risk

Data flow and exposure analysis

Evidence
Data Flow AnalysisQuery results including sensitive data sent to LLM provider
highVerified: 2025-11-09
pii protection

Privacy controls assessment

Evidence
MCP Security GuidelinesNo built-in PII detection, redaction, or anonymization
highVerified: 2025-11-09
query result filtering

Data filtering capabilities review

Evidence
MCP Server ConfigurationCan limit result rows but no column-level filtering for sensitive data
mediumVerified: 2025-11-09
compliance readiness

Compliance framework review

Evidence
Compliance AssessmentGDPR/HIPAA compliance depends on LLM provider and data handling configuration
mediumVerified: 2025-11-09
schema exposure

Metadata exposure analysis

Evidence
Schema IntrospectionDatabase schema metadata shared with LLM for query generation
highVerified: 2025-11-09
👁️Trust & Transparency
+
documentation quality

Documentation completeness review

Evidence
MCP Postgres DocsClear documentation with setup instructions and security considerations
highVerified: 2025-11-09
query visibility

Query traceability assessment

Evidence
MCP Protocol LoggingAll SQL queries logged and visible in MCP message stream
highVerified: 2025-11-09
open source code

Source code review

Evidence
GitHub RepositoryFully open source with MIT license
highVerified: 2025-11-09
security documentation

Security documentation review

Evidence
Security GuidelinesProvides security best practices but could be more comprehensive for database access
MCP servers-archived repository READMEREADME states 'NO SECURITY GUARANTEES ARE PROVIDED FOR THESE ARCHIVED SERVERS'; known SQL injection remains undocumented and unpatched in the package
highVerified: 2026-06-10
⚙️Operational Excellence
+
ease of setup

Setup complexity assessment

Evidence
MCP QuickstartStraightforward setup requiring connection string configuration
highVerified: 2025-11-09
performance

Performance benchmarking

Evidence
PostgreSQL PerformanceQuery performance depends on database configuration and optimization
highVerified: 2025-11-09
connection pooling

Connection management review

Evidence
Implementation DetailsSupports connection pooling for efficient resource utilization
mediumVerified: 2025-11-09
error diagnostics

Error messaging assessment

Evidence
PostgreSQL Error MessagesDetailed error messages help diagnose issues
mediumVerified: 2025-11-09
community support

Community activity analysis

Evidence
MCP servers-archived repositoryServer archived 2025-05-29; repository read-only, no issues or PRs accepted. Patched community fork available as @zeddotdev/postgres-context-server
highVerified: 2026-06-10
Strengths
  • +Comprehensive PostgreSQL feature support including schema introspection
  • +Natural language to SQL query generation capabilities
  • +Excellent for data analysis and business intelligence workflows
  • +Full query visibility and logging for audit purposes
  • +Open source code remains publicly auditable in the archived repository
  • +Supports connection pooling and performance optimization
Limitations
  • !High risk of exposing sensitive database content to LLM providers
  • !No built-in PII detection, redaction, or data anonymization
  • !AI can execute destructive operations (DELETE, DROP) if permissions allow
  • !Limited granular access control beyond database user permissions
  • !Query results with sensitive data sent to external APIs
  • !Compliance challenges for regulated industries (HIPAA, PCI-DSS, GDPR)
  • !ARCHIVED 2025-05-29 with an UNPATCHED SQL injection vulnerability (Trend Micro, June 2025); use the patched fork @zeddotdev/postgres-context-server instead
Metadata
license: MIT
supported platforms
0: All platforms with PostgreSQL client support
programming languages
0: TypeScript
1: Python
mcp version: 1.0
github repo: https://github.com/modelcontextprotocol/servers-archived
github stars: 58700
database version: PostgreSQL 10+
connection method: Connection string with credentials
first release: 2024-11
maintained by: None (Archived 2025-05-29)
status: Archived - unpatched SQL injection vulnerability; patched community fork: @zeddotdev/postgres-context-server
package name: @modelcontextprotocol/server-postgres
transport types
0: stdio
installation methods
0: npm

Use Case Ratings

code generation

Useful for generating database migration scripts and query code

customer support

Can help support teams query customer data, but privacy concerns exist

content creation

Limited applicability; mainly for content stored in databases

data analysis

Excellent for AI-powered data analysis, reporting, and insights generation

research assistant

Good for analyzing research datasets stored in PostgreSQL

legal compliance

High risk due to potential exposure of sensitive legal data to LLM providers

healthcare

Not recommended for PHI due to data exposure risks; HIPAA compliance challenges

financial analysis

Risky for sensitive financial data; requires strict access controls and data filtering

education

Good for analyzing student data and learning analytics

creative writing

Limited utility unless creative content is database-driven