Home / MCP / PostgreSQL MCP Server

PostgreSQL MCP Server

A PostgreSQL MCP Server providing execute_query, list_tables, describe_table, and list_schemas to manage PostgreSQL data via MCP clients.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "postgresql_mcp": {
            "command": "python",
            "args": [
                "postgresql-mcp.py"
            ],
            "env": {
                "POSTGRES_HOST": "localhost",
                "POSTGRES_PORT": "5432",
                "POSTGRES_USER": "postgres",
                "POSTGRES_PASSWORD": "postgres",
                "POSTGRES_DATABASE": "postgres"
            }
        }
    }
}