PostgreSQL MCP is a database tuning and analysis tool that provides real-time insights into PostgreSQL performance. It offers tools for analyzing query execution plans, identifying slow queries, monitoring database health metrics, and recommending index optimizations. The server implements features like hypothetical index testing, transaction health monitoring, and buffer cache analysis, making it valuable for database administrators and developers who need to optimize query performance, troubleshoot bottlenecks, or maintain healthy PostgreSQL databases. Built with Python 3.12 and packaged as a Docker container, it supports both PostgreSQL 15 and 16 with a focus on read-only safety through restricted access modes.
Aún no hay reseñas. ¡Sé el primero en reseñar!
Inicia sesión para unirte a la conversación
Lists all database schemas available in the PostgreSQL instance.
Lists database objects (tables, views, sequences, extensions) within a specified schema.
Provides information about a specific database object, for example, a table's columns, constraints, and indexes.
Executes SQL statements on the database, with read-only limitations when connected in restricted mode.
Gets the execution plan for a SQL query describing how PostgreSQL will process it and exposing the query planner's cost model. Can be invoked with hypothetical indexes to simulate the behavior after adding indexes.
Reports the slowest SQL queries based on total execution time using pg_stat_statements data.
Analyzes the database workload to identify resource-intensive queries, then recommends optimal indexes for them.
Analyzes a list of specific SQL queries (up to 10) and recommends optimal indexes for them.
Performs comprehensive health checks including: buffer cache hit rates, connection health, constraint validation, index health (duplicate/unused/invalid), sequence limits, and vacuum health.