pgmcp
Verified Safeby kyagoshi
Overview
Provides an MCP server to retrieve PostgreSQL database schema information, including tables, columns, indexes, foreign keys, and ER diagrams.
Installation
uvx --from git+https://github.com/kyagoshi/pgmcp pgmcpEnvironment Variables
- PGHOST
- PGPORT
- PGDATABASE
- PGUSER
- PGPASSWORD
Security Notes
The server correctly uses environment variables for PostgreSQL connection details, avoiding hardcoded secrets. All SQL queries are parameterized using `psycopg2`, effectively preventing SQL injection vulnerabilities. No 'eval' or other dynamic code execution patterns were identified.
Similar Servers
MCP-PostgreSQL-Ops
This MCP server provides comprehensive PostgreSQL database operations, monitoring, and management through natural language queries.
SchemaCrawler-AI
The SchemaCrawler AI MCP Server exposes database schema metadata and analysis tools to AI agents, enabling natural language queries and automated database interactions.
postgres-mysql-mcp-server
A Model Context Protocol (MCP) server that enables AI assistants to query PostgreSQL and MySQL databases for schema introspection and data retrieval.
MsSqlMCP
Provides an MCP Server for SQL Server database schema inspection and safe, read-only query execution to AI clients.