Back to Home
loadept icon

pg-mcp

by loadept

Overview

Serves as a Model Context Protocol (MCP) server providing read-only PostgreSQL database access and introspection tools.

Installation

Run Command
docker run --rm -i loadept/pg-mcp:latest -u "postgres://usuario:contraseƱa@host:puerto/basedatos?sslmode=disable"

Security Notes

The `execute_query` tool directly passes user-provided SQL queries to the database without any form of sanitization or strict validation to enforce 'SELECT only' or other safe practices. This creates a critical SQL injection vulnerability, allowing an attacker to execute arbitrary SQL commands (e.g., DML, DDL) if the database user has sufficient privileges.

Similar Servers

Stats

Interest Score26
Security Score1
Cost ClassMedium
Avg Tokens10000
Stars1
Forks0
Last Update2025-11-19

Tags

PostgreSQLGoMCPDatabase ToolsRead-Only