MCP Catalogs
HomeMCP-PostgreSQL-Ops screenshot

MCP-PostgreSQL-Ops

by call518·149·Score 50

Comprehensive MCP server providing PostgreSQL DBA superpowers with 30+ tools for performance analysis, bloat detection, and monitoring.

databasedeveloper-toolsops-infra
24
Forks
3
Open issues
this month
Last commit
2d ago
Indexed

Overview

MCP-PostgreSQL-Ops is a professional MCP server offering PostgreSQL database operations, monitoring, and management capabilities. It provides comprehensive database analysis, performance monitoring, and intelligent maintenance recommendations through natural language queries. The server supports PostgreSQL versions 12-18 with automatic version detection and works with regular user permissions while offering enhanced functionality when using optional extensions like pg_stat_statements and pg_stat_monitor.

Try asking AI

After installing, here are 6 things you can ask your AI assistant:

you:AI assistants monitoring PostgreSQL database health and performance
you:Database administrators analyzing table bloat and maintenance needs
you:Development teams investigating slow queries and optimization opportunities
you:What permissions are required to use this MCP server?
you:Can this be used with cloud databases like Amazon RDS?
you:What PostgreSQL versions are supported?

When to choose this

Choose this for PostgreSQL DBA operations when you need comprehensive monitoring, performance analysis, and maintenance recommendations through natural language queries, especially with production constraints requiring read-only access.

When NOT to choose this

Don't choose this if you need write access to PostgreSQL databases, as this server is read-only only. Also consider alternatives if you require monitoring for non-PostgreSQL databases.

Tools this server exposes

12 tools extracted from the README
  • get_server_info

    Get PostgreSQL server information and version details

  • get_active_connections

    Monitor current database connections and their status

  • get_table_bloat_analysis

    Analyze table bloat across all databases

  • get_slow_queries

    Identify slow queries in the system

  • get_database_size_info

    Get database size information and storage usage

  • get_vacuum_analyze_stats

    Get statistics about VACUUM and ANALYZE operations

  • get_lock_monitoring

    Monitor database locks and potential deadlocks

  • get_table_schema_info

    Get detailed table schema information

  • get_autovacuum_status

    Check autovacuum configuration and status

  • get_replication_status

    Check PostgreSQL replication status and health

  • get_index_usage_stats

    Get index usage statistics and effectiveness

  • get_wait_events

    Check database wait events for performance analysis

Comparable tools

postgres-mcpmysql-mcpdatabase-mcpmcp-databasesupabase-mcp

Installation

Installation

  1. Install via PyPI:
pip install mcp-postgresql-ops
  1. Start the server:
mcp-server-postgresql-ops
  1. Configure in Claude Desktop (add to claude_desktop_config.json):
{
  "mcpServers": {
    "postgresql-ops": {
      "command": "mcp-server-postgresql-ops",
      "args": []
    }
  }
}
  1. Or using Docker Compose:
git clone https://github.com/call518/MCP-PostgreSQL-Ops.git
cd MCP-PostgreSQL-ops
docker-compose up -d

FAQ

What permissions are required to use this MCP server?
The server works with regular user permissions for basic monitoring tasks. Superuser privileges provide access to all databases and system information, but are not required for most operations.
Can this be used with cloud databases like Amazon RDS?
Yes, the MCP server is compatible with RDS and Aurora and designed for production-safe read-only operations with regular user permissions.
What PostgreSQL versions are supported?
The server supports PostgreSQL versions 12-18 with automatic version detection and version-aware features.

On Hacker News

Recent discussion from the developer community.

Compare MCP-PostgreSQL-Ops with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.