MCP PostgreSQL Ops

MCP PostgreSQL Ops selects metrics for the PostgreSQL version, exposing measurements available in that database installation.

  • 164 ★ on the repository
  • Last commit
  • MIT
MCP server

Extended access

Why this level

  • Database connection, schema and query details are exposed to the agent and can contain internal information.
All reasons and checks

call518/mcp-postgresql-ops

Install

Manual install

pip install mcp-postgresql-ops

First From PyPI option in Installation. Requires Python 3.12 or later; configure database access separately.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Database connection, schema and query details are exposed to the agent and can contain internal information.

This is third-party code. Review the repository files before installing.

What it does

MCP PostgreSQL Ops connects an agent to PostgreSQL diagnostics. It retrieves active connections, locks, table and index sizes, replication state and maintenance statistics from system views. These readings support a plan for further investigation. Core metrics work without extensions, while advanced query analysis uses optional statistics modules. Tools adapt readings to the PostgreSQL version. VACUUM and tuning recommendations still need an administrator’s decision; this server does not automatically repair problems.

Who it is for. PostgreSQL administrators investigating locks, table growth and slow queries with an agent.

Good fit when

  • During a slowdown, an administrator inspects active connections and locks.
  • Database growth is examined by table and index size.
  • Before maintenance, the team reviews autovacuum behavior and VACUUM statistics.
  • After a PostgreSQL upgrade, an operator inspects available replication and I/O metrics.

Not a fit when

  • The agent must modify schemas or execute arbitrary writes.
  • You need a replacement for backup and recovery.
  • Monitoring must reveal restricted system information without permission.

Example request

Show active locks and the largest tables, explain available metrics and plan investigation without database changes.

MCP

Transport
stdio, http
Authentication
not required

Limitations

Python 3.12 or later and a PostgreSQL account permitted to read the required information are needed. PostgreSQL 12–18 are supported, but some metrics exist only in newer versions, so review the compatibility table. Advanced query analysis depends on `pg_stat_statements` and statistics configuration; without them some tools cannot return complete results. The demo Docker Compose starts a test database and sample data and must be adjusted before connecting an existing database.

How to disable. Remove the MCP entry and stop the server. Revoke dedicated monitoring access when no longer needed.

FAQ

Does it modify data?

Its documented diagnostics are read-only. Still restrict the database account’s permissions.

Are extensions required to start?

Not for core tools. Configure `pg_stat_statements` for detailed query analysis.

Why are some connections missing?

Visibility depends on PostgreSQL permissions. Review the monitoring role rather than granting broad access by default.

What does the Compose example include?

A test database and supporting services. Disable demo services as documented before using your own database.

Which PostgreSQL versions are supported?

Versions 12–18. Check the compatibility matrix for each metric.

Discussion

No questions or reviews yet.

Self-hosted MCP server for running commands on remote servers over SSH, with tokens and roles

MCP serverBroad access2Repository stars

An MCP server for Prometheus: the agent runs PromQL queries, discovers metrics and checks scrape targets

MCP serverExtended access522Repository stars

Independent Datadog MCP server: an agent reads incidents, monitors, logs, metrics, traces and RUM and schedules downtimes.

MCP serverExtended access143Repository stars

BetterDB MCP

BetterDB Monitor

Official

BetterDB MCP server: the agent reads Valkey and Redis metrics, slow commands, hot keys and anomalies and investigates incidents from stored history

MCP serverBroad access1.3KRepository stars

A Claude Code plugin sets up PostgreSQL monitoring and returns a report of problems with exact fixes.

PluginBroad access140Repository stars
Official

Datadog's official managed MCP server: logs, metrics, traces and incidents right in your agent

MCP serverExtended access47Repository stars

README in short

The compatibility matrix maps tools to PostgreSQL versions and system views. Multiple instances use separate configurations.

README badge

Report a problem

Foxx AIMCP PostgreSQL Ops
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.