Back to Home
ShakibaMirbagheri icon

mcp-postgres-wrapper

by ShakibaMirbagheri

Overview

Provides PostgreSQL database access for AI agents and chat applications via the Model Context Protocol (MCP).

Installation

Run Command
docker compose up -d

Environment Variables

  • POSTGRES_HOST
  • POSTGRES_PORT
  • POSTGRES_DB
  • POSTGRES_USER
  • POSTGRES_PASSWORD

Security Notes

CRITICAL SQL INJECTION VULNERABILITY: The server directly concatenates user-provided input (e.g., `table_name` and the `query` itself) into SQL statements using f-strings without proper sanitization or parameterized queries. This allows an attacker to execute arbitrary SQL commands by manipulating the input arguments to tools like `postgres_describe_table` or `postgres_query`. Additionally, default PostgreSQL credentials are provided as fallback environment variables, which could be a risk if not overridden.

Similar Servers

Stats

Interest Score0
Security Score1
Cost ClassLow
Stars0
Forks0
Last Update2025-11-24

Tags

PostgreSQLMCPAI AgentDatabaseAPI