MCP ConfigsMay 12, 2026·3 min read

MCP-PostgreSQL-Ops — PostgreSQL DBA MCP (30+ tools)

Give Claude Desktop/Claude Code a PostgreSQL DBA toolbox (30+ tools) for locks, bloat, autovacuum, and stats. Works on PG 12–18; stdio or HTTP transport.

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 27/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
Mcp Config
Install
Pip
Trust
Trust: Established
Entrypoint
pip install mcp-postgresql-ops && mcp-postgresql-ops --help
Safe staging command
npx -y tokrepo@latest install fb948ce5-cb80-5f54-858e-e005011db6f4 --target codex

Stages files first; activation requires review of the staged README and plan.

Intro

MCP-PostgreSQL-Ops exposes a PostgreSQL operations toolkit to MCP clients so your agent can inspect health, diagnose performance, and answer “what’s happening in the DB?” without hand-written SQL.

Best for: DBA-on-call workflows, incident triage, and agent-assisted database visibility

Works with: PostgreSQL 12–18; MCP clients (Claude Desktop/Claude Code/Cursor); stdio or HTTP transport

Setup time: 10–15 minutes

Key facts (verified)

  • README claims 30+ DBA tools, including locks/deadlocks, bloat, autovacuum, and schema inspection.
  • Supports transport stdio (default) or streamable-http per README options table.
  • GitHub: 150 stars · 24 forks; pushed 2026-05-11 (GitHub API verified).

Main

A practical pattern is to pair “symptom → evidence → next action”:

  • Symptom: “queries are slow” → Evidence: locks, bloat, vacuum stats, IO stats → Next action: index/vacuum/tuning.
  • Keep the MCP server read-only at first (no writes) and rotate DB credentials like any other operational secret.
  • For teams, prefer a dedicated DB role with least privilege; the agent only needs catalog/stat views for most diagnostics.

README excerpt (verbatim)

MCP Server for PostgreSQL Operations and Monitoring

License: MIT Python Docker Pulls PostgreSQL BuyMeACoffee

Deploy to PyPI with tag PyPI PyPI - Downloads


Architecture & Internal (DeepWiki)

Ask DeepWiki


Features

  • 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.
  • Schema & Relationship Discovery: Database structure exploration with detailed relationship mapping.
  • VACUUM & Autovacuum Intelligence: Real-time maintenance monitoring and effectiveness analysis.
  • Multi-Database Operations: Seamless cross-database analysis and monitoring.

FAQ

Q: Which PostgreSQL versions are supported? A: README states PG 12–18 with version-aware tools.

Q: How does it connect to the DB? A: The README shows configuring host/port/user/password/db via environment variables.

Q: Can it run over HTTP? A: README options mention streamable-http as an alternative transport to stdio.

🙏

Source & Thanks

Source: https://github.com/call518/MCP-PostgreSQL-Ops > License: MIT > GitHub stars: 150 · forks: 24

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets