MCP server with 14 tools for PostgreSQL database operations. Query databases, explore schemas, analyze tables, list indexes/constraints, and get performance statistics. Features security-first design with SQL injection prevention and read-only mode by default. Works with Claude Desktop, Claude Code, and any MCP-compatible client.
Server Config
{
"mcpServers": {
"postgres": {
"command": "postgresql-mcp",
"env": {
"POSTGRES_HOST": "localhost",
"POSTGRES_PORT": "5432",
"POSTGRES_USER": "your-user",
"POSTGRES_PASSWORD": "your-password",
"POSTGRES_DB": "your-database"
}
}
}
}