MCP Server — call518/MCP-PostgreSQL-Ops

MCP-PostgreSQL-Ops is a professional MCP server for PostgreSQL database operations, monitoring, and management. Supports PostgreSQL 12-17 with

Local serverstdioPython

What is the MCP Server?

MCP-PostgreSQL-Ops is a professional MCP server for PostgreSQL database operations, monitoring, and management. Supports PostgreSQL 12-17 with comprehensive

What you get

  1. logging in to OpenWebUI with an admin account 1. go to "Settings" → "Tools" from the top menu. 1. Enter the postgresql-ops Tool address (e.g., http://localhost:8003/postgresql-ops) to connect MCP Tools. 1. Setup Ollama or OpenAI.
  • ✅ Zero Configuration: Works with PostgreSQL 12-18 out-of-the-box with automatic version detection
  • ✅ Natural Language: Ask questions like "Show me slow queries" or "Analyze table bloat."
  • ✅ Production Safe: Read-only operations, RDS/Aurora compatible with regular user permissions
  • ✅ Extension Enhanced: Optional pg_stat_statements and pg_stat_monitor for advanced query analytics
  • ✅ Comprehensive Database Monitoring: Performance analysis, bloat detection, and maintenance recommendations
  • ✅ Smart Query Analysis: Slow query identification with pg_stat_statements and pg_stat_monitor integration

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
get_server_info❌ None
get_active_connections❌ None
get_postgresql_config❌ None
get_database_list❌ None
get_table_list❌ None
get_table_schema_info❌ None
get_database_schema_info❌ None
get_table_relationships❌ None
get_user_list❌ None
get_index_usage_stats❌ None
get_database_size_info❌ None
get_table_size_info❌ None
get_vacuum_analyze_stats❌ None
get_current_database_info❌ None

How to install the MCP Server

{
  "mcpServers": {
    "mcp-postgresql-ops": {
      "command": "uvx",
      "args": ["--python", "3.12", "mcp-postgresql-ops"],
      "env": {
        "POSTGRES_HOST": "127.0.0.1",
        "POSTGRES_PORT": "15432",
        "POSTGRES_USER": "postgres",
        "POSTGRES_PASSWORD": "changeme!@34",
        "POSTGRES_DB": "ecommerce"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
POSTGRES_HOSTEndpoint or connection string the server talks to.Optional
POSTGRES_PORTConfiguration value read at startup.Optional
POSTGRES_USERConfiguration value read at startup.Optional
POSTGRES_PASSWORDConfiguration value read at startup.Optional
POSTGRES_DBConfiguration value read at startup.Optional

Example prompts to try

  • “Use MCP to get server info.”
  • “Use MCP to get active connections.”
  • “Use MCP to get postgresql config.”

Frequently asked questions

MCP-PostgreSQL-Ops is a professional MCP server for PostgreSQL database operations, monitoring, and management. Supports PostgreSQL 12-17 with comprehensive Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.