1. Conduid
  2. Developer Tools
  3. MCP-PostgreSQL-Ops
MCP server · Developer Tools

MCP-PostgreSQL-Ops

Give AI assistants full PostgreSQL DBA superpowers — 30+ tools for performance analysis, bloat detection, lock/deadlock monitoring, autovacuum & schema inspection. No extensions required. PG 12-18.

67Good

Scored 22 hours ago · breakdown

About MCP-PostgreSQL-Ops

MCP-PostgreSQL-Ops is an MCP server published by call518 in the Developer Tools category: give AI assistants full PostgreSQL DBA superpowers — 30+ tools for performance analysis, bloat detection, lock/deadlock monitoring, autovacuum & schema inspection. No extensions required. PG 12-18. Conduid read 37 tools from its source: get_active_connections, get_all_tables_stats, get_async_io_status, get_autovacuum_activity, get_autovacuum_status, get_bgwriter_stats and 31 more. No package is published for it, so it installs from a source checkout.

The repository has 164 stars and 28 forks, is licensed MIT, and its last commit was on 23 Nov 2026. The latest release is 3.4.0 (9 Oct 2026): 3.4.0 Key Fix Fix explicit null handling in MCP tool arguments (#71): Updated 41 optional parameters across 28 tools to accept null. It follows 3.3.7 (30 Apr 2026), and the 4 most recent releases go back to 3.3.5 (27 Apr 2026). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Its topics include data, management, fastmcp, database and database-management.

Install

From source
git clone https://github.com/call518/MCP-PostgreSQL-Ops

Tools (37)

get_active_connections❌ None
get_all_tables_stats[Tool Purpose]: Get comprehensive statistics for all tables (including system tables if requested)
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default database if omitted)
include_systembooleanInclude system tables in results (default: False)
get_async_io_status[Tool Purpose]: Monitor asynchronous I/O subsystem status (PostgreSQL 18+)
ParameterTypeDescription
database_namestringDatabase name (uses default if omitted)
get_autovacuum_activity❌ None
ParameterTypeDescription
database_namestringTarget database name (uses default database from POSTGRES_DB env var if omitted)
hours_backintegerTime period to analyze in hours (default: 24, max: 168 for 7 days)
limitintegerMaximum number of tables to show (1-100, default: 50)
schema_namestringSchema to analyze (analyzes all user schemas if omitted)
get_autovacuum_status❌ None
ParameterTypeDescription
database_namestringTarget database name (uses default database from POSTGRES_DB env var if omitted)
limitintegerMaximum number of tables to analyze (1-100, default: 50)
schema_namestringSchema to analyze (analyzes all user schemas if omitted)
table_patternstringTable name pattern to filter (SQL LIKE pattern, e.g., 'user%', '%log%', 'temp_*')
get_bgwriter_stats[Tool Purpose]: Analyze background writer and checkpoint performance statistics with version compatibility
get_current_database_info❌ None
ParameterTypeDescription
database_namestringTarget database to get info for (uses default connection if omitted)
get_database_bloat_overview❌ None
ParameterTypeDescription
database_namestringTarget database name (uses default database from POSTGRES_DB env var if omitted)
limitintegerMaximum number of schemas to show (1-50, default: 10)
get_database_conflicts_stats❌ None
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default database if omitted)
get_database_list❌ None
get_database_schema_info❌ None
ParameterTypeDescription
database_name *stringDatabase name to query (REQUIRED - specify which database to analyze)
schema_namestringSpecific schema name to analyze (if None, shows all schemas)
get_database_size_info❌ None
get_database_stats❌ None
get_index_io_stats❌ None
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default database if omitted)
schema_namestringSchema name to filter (default: public)
get_index_usage_stats❌ None
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default database if omitted)
get_io_stats[Tool Purpose]: Analyze comprehensive I/O statistics across all database operations with version compatibility
ParameterTypeDescription
database_namestringTarget database name (optional)
limitintegerMaximum number of results to return (1-100, default 20)
get_lock_monitoring❌ None
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default database if omitted)
grantedstringFilter by granted status ("true" or "false")
locktypestringFilter by lock type ("relation", "transactionid", "virtualxid", etc.)
modestringFilter by lock mode ("AccessShareLock", "ExclusiveLock", etc.)
statestringFilter by session state ("active", "idle", "idle in transaction", etc.)
usernamestringFilter by specific username
get_per_backend_io_stats[Tool Purpose]: Analyze per-backend I/O and WAL statistics (PostgreSQL 18+)
ParameterTypeDescription
database_namestringDatabase name (uses default if omitted)
limitintegerMaximum results (1-100, default 20)
get_pg_stat_monitor_recent_queriesPG12: `total_time` → `total_exec_time`; PG13+: native `total_exec_time`
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default database if omitted)
limitintegerNumber of recent queries to retrieve (default: 20, max: 100)
get_pg_stat_statements_top_queriesPG12: `total_time` → `total_exec_time`; PG13+: native `total_exec_time`; PG17+: `stats_since`
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default database if omitted)
limitintegerNumber of top queries to retrieve (default: 20, max: 100)
get_postgresql_config❌ None
ParameterTypeDescription
config_namestringSpecific configuration parameter name to retrieve (shows all configs if omitted)
filter_textstringText to filter configuration names or descriptions (optional)
get_replication_status[Tool Purpose]: Monitor PostgreSQL replication status and statistics
get_running_vacuum_operations❌ None
ParameterTypeDescription
database_namestringTarget database name (shows operations in all databases if omitted)
get_server_info❌ None
get_table_bloat_analysis❌ None
ParameterTypeDescription
database_namestringTarget database name (uses default database from POSTGRES_DB env var if omitted)
limitintegerMaximum number of results to return (1-100, default: 20)
min_dead_tuplesintegerMinimum dead tuples to include in results (default: 1, shows all tables with any bloat)
schema_namestringSchema to analyze (analyzes all user schemas if omitted)
table_patternstringTable name pattern to filter (SQL LIKE pattern, e.g., 'user%', '%log%', 'temp_*')
get_table_io_stats❌ None
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default database if omitted)
schema_namestringSchema name to filter (default: public)
get_table_list❌ None
ParameterTypeDescription
database_namestringDatabase name to query (uses currently connected database if omitted)
get_table_relationships❌ None
ParameterTypeDescription
database_name *stringDatabase name to query (REQUIRED - specify which database to analyze)
relationship_typestringType of relationships to show ("all", "foreign_keys", "dependencies", "inheritance")
schema_namestringSchema name to search in (default: "public")
table_namestringSpecific table name to analyze (if None, shows database-wide relationship overview)
get_table_schema_info❌ None
ParameterTypeDescription
database_name *stringDatabase name to query (REQUIRED - specify which database to analyze)
schema_namestringSchema name to search in (default: "public")
table_namestringSpecific table name to analyze (if None, shows all tables)
get_table_size_info❌ None
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default database if omitted)
schema_namestringSchema name to analyze (default: "public")
get_user_functions_stats[Tool Purpose]: Analyze performance statistics for user-defined functions
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default database if omitted)
get_user_list❌ None
get_vacuum_analyze_stats❌ None
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default database if omitted)
get_vacuum_effectiveness_analysis❌ None
ParameterTypeDescription
database_namestringTarget database name (uses default database from POSTGRES_DB env var if omitted)
limitintegerMaximum number of tables to analyze (1-100, default: 30)
schema_namestringSchema to analyze (analyzes all user schemas if omitted)
get_wait_events[Tool Purpose]: List available wait event types and their descriptions (PostgreSQL 17+)
ParameterTypeDescription
database_namestringDatabase name to analyze (uses default if omitted)
wait_event_typestringFilter by wait event type (e.g., "Lock", "IO", "LWLock")
get_wal_status❌ None
get_wal_summarizer_status[Tool Purpose]: Monitor WAL summarizer status for incremental backup support (PostgreSQL 17+)
ParameterTypeDescription
database_namestringDatabase name (uses default if omitted)

Security checks

Static checks derived from the repository 10 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository's README runs to about 6.7K words.
  • ✓License declaredThe repository declares the MIT license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedDependency versions are pinned by uv.lock.
  • ✓No dynamic code executionScanned 6 source files and found no eval, dynamic Function or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

What the source scan found

Transport
stdio and Streamable HTTPsrc/mcp_postgresql_ops/mcp_main.py:4115, src/mcp_postgresql_ops/mcp_main.py:4111
Starts other programs
No calls that start other programs
Outbound network calls
No outbound network calls
Writes or deletes files
No file writes or deletes
Lockfile
uv.lock

Pattern matches on the source text of 6 files: places to read, not proof of what the code does at run time.

Releases

3.4.03.4.0 · 9 Oct 20263.4.0 Key Fix Fix explicit `null` handling in MCP tool arguments (#71): Updated 41 optional parameters across 28 tools to accept `null`. This resolves validation failures in clients that explicitly send `null` for optional arguments, while…
3.3.73.3.7 · 30 Apr 2026Release Notes — v3.3.6 Release Date: 2026-04-28 Changes Chores Remove unused dev dependencies — Removed the redundant `pip` entry from the `[dependency-groups]` dev section in `pyproject.toml` and its corresponding lock entry in `uv.lock`.…
3.3.63.3.6 · 28 Apr 2026What's Changed Security: Addressed CVE-2026-3219 — removed `pip` (`<=26.0.1`) from dev dependencies pip has an interpretation conflict when handling concatenated tar/ZIP files (CVSS 4.6, CWE-434) Since `uv` is the primary package manager,…
3.3.53.3.5 · 27 Apr 2026Highlights PostgreSQL 12-18 full version support with automatic version detection Bearer token authentication for streamable-http mode Schema discovery tools: table schema, database schema, table relationships Autovacuum and bloat analysis…

README

The repository's README runs to about 6.7K words, fetched a month ago. The original in the repository is authoritative.

Read full README
Questions

About MCP-PostgreSQL-Ops

How do I install MCP-PostgreSQL-Ops?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is MCP-PostgreSQL-Ops safe to use with an AI agent?

Its trust score is 67 out of 100 (good). It passes 5 of the 6 static checks Conduid ran on the repository; it does not pass Scoped permissions. Conduid's scan of 6 source files found that it serves MCP over stdio and Streamable HTTP. Its dependencies are pinned by uv.lock. It has no ConduID identity yet, so agent calls to it are not receipted.

Is MCP-PostgreSQL-Ops still maintained?

Yes — the latest release is 3.4.0 (9 Oct 2026), and the last commit was 8 days ago. The repository has 164 stars.

What tools does MCP-PostgreSQL-Ops provide?

Conduid read 37 tools from the source: get_active_connections, get_all_tables_stats, get_async_io_status, get_autovacuum_activity, get_autovacuum_status, get_bgwriter_stats, get_current_database_info, get_database_bloat_overview and 29 more. 28 of them publish their parameters, listed under Tools above.

What license is MCP-PostgreSQL-Ops released under?

The repository declares the MIT license. That applies to the latest release, 3.4.0, as well.