Postgres AIops MCP server
io.github.AIops-tools · Updated
Governed PostgreSQL DBA ops: slow-query RCA, bloat/vacuum & blocking-lock analysis; 35 MCP tools.
At a glance
Postgres AIops is an MCP server in the Dev Tools & Git category. It runs locally over stdio via `uvx postgres-aiops`, and declares no required credentials. It scores B (71/100) on the MCP Skills Hub health score as of Oct 28, 2026.
One-click install
Opens your editor and pre-fills the config. Your editor will ask before adding it.
How to install Postgres AIops in your AI client
Setup for Claude Code, Claude Desktop, Cursor, Codex, Windsurf, Cline and VS Code — copy-paste ready.
How to install Postgres AIops in Claude CodeAnthropic's agentic CLI
Add the server
bashclaude mcp add postgres-aiops -- uvx postgres-aiopsVerify it's connected
bashclaude mcp listSharing it with your team?
Add `--scope project` to write it to .mcp.json in the repository root, which you can commit (with the secrets left as environment variables).
Use it in a session
Ask Claude to use the tools this server exposes. It discovers them automatically.
How to install Postgres AIops in Claude DesktopDesktop app (MCP config)
Open your MCP config
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json · Windows: %APPDATA%\Claude\claude_desktop_config.json
Add this server
json{ "mcpServers": { "postgres-aiops": { "command": "uvx", "args": [ "postgres-aiops" ] } } }Restart Claude Desktop
The tools appear under the 🔌 menu once the app reloads.
How to install Postgres AIops in CursorAI-first code editor
Create / edit .cursor/mcp.json in your project
json{ "mcpServers": { "postgres-aiops": { "command": "uvx", "args": [ "postgres-aiops" ] } } }Enable it
Cursor Settings → MCP → toggle the server on. Tools become available to the Composer/Agent.
How to install Postgres AIops in Codex CLIOpenAI coding agent
Add to ~/.codex/config.toml
toml[mcp_servers.postgres-aiops] command = "uvx" args = ["postgres-aiops"]Run Codex
Codex loads MCP servers from config.toml on startup and exposes their tools to the agent.
How to install Postgres AIops in WindsurfCodeium's agentic IDE
Edit ~/.codeium/windsurf/mcp_config.json
json{ "mcpServers": { "postgres-aiops": { "command": "uvx", "args": [ "postgres-aiops" ] } } }Reload
Windsurf → Cascade → refresh MCP servers. Cascade can now call the tools.
How to install Postgres AIops in ClineVS Code autonomous agent
Open Cline → MCP Servers → Configure
Adds to cline_mcp_settings.json.
Add the server
json{ "mcpServers": { "postgres-aiops": { "command": "uvx", "args": [ "postgres-aiops" ] } } }
How to install Postgres AIops in VS CodeCopilot / MCP support
Create .vscode/mcp.json
json{ "servers": { "postgres-aiops": { "type": "stdio", "command": "uvx", "args": [ "postgres-aiops" ] } } }Start it
VS Code shows a ▶ Start action above the server entry. Agent mode (Copilot Chat) can then use the tools.
What tools does Postgres AIops expose?
This server runs as a local package. We only query remote servers for their tool list — asking this one would mean executing it, so its tools are listed in the documentation below.
What the code can do
Source analysis currently covers npm packages only. This server ships as a Python package, which needs a different parser.
Before you install
Signals gathered from the source repo and package registry — not a safety verdict.
What it can reach
- Runs code on your machine — Executes as a local process with your user's permissions, including filesystem access.
- Downloads at launch — The package is fetched from its registry each run unless you pin a version.
- Last commit 14 days ago — Actively maintained.
- 0 GitHub stars — Very little community usage so far.
Client compatibility
Health score
B · 71Maintenance, adoption, transparency and packaging — not a safety audit. How this is calculated
- Maintenance30%100%
Last commit 14 days ago.
- Adoption20%0%
0 stars.
- Transparency20%75%
3/4: ✓ public source repo, ✓ declared license, ✓ documentation, ✗ discoverable tool list.
- Provenance15%75%
Links to its own repository; package linkage unverified.
- Packaging15%100%
Publishes a pinned version (0.12.0).
Documentation
Full READMEPostgres AIops
Disclaimer: Community-maintained open-source project. Not affiliated with, endorsed by, or sponsored by the PostgreSQL Global Development Group or any vendor. "PostgreSQL" and the elephant logo are trademarks of the PostgreSQL Community Association; all product/trademark names belong to their respective owners. MIT licensed.
Governed AI-ops for PostgreSQL DBA operations — connecting to a server with psycopg 3 and reading the system catalogs and pg_stat_* views — with a built-in governance harness: unified audit log, token/runaway budget guard, undo-token recording, and descriptive risk-tier labels. Beyond the mock test suite, the reads, a governed write, and its undo have been exercised against a live PostgreSQL 16.14 instance — see `docs/VERIFICATION.md`.
What it does
Three flagship signature analyses, plus the guarded reads and writes around them:
- Slow-query RCA — take the worst
pg_stat_statementsentry (plus an optional
EXPLAIN plan) and map its numbers — mean time, cache-hit ratio, temp spill, call count, plan node types — to a cited cause and a concrete action. Every finding carries its measured number, not a black-box verdict.
- Bloat & vacuum analysis — combine per-table dead-tuple ratio and autovacuum
recency into a ranked, cited recommendation (VACUUM / tune autovacuum).
- Blocking lock-chain RCA — build the wait-for tree from
pg_blocking_pids,
name the root blocker (blocks others, waits on none), and give the action; a cycle is flagged as a likely deadlock.
What works
- CLI (
postgres-aiops ...):init,overview,server,activity,query,index,table,repl,analyze,remediate,secret,doctor,mcp. - MCP server (
postgres-aiops mcporpostgres-aiops-mcp): 35 tools (25 read, 10 write), every one wrapped with the bundled@governed_toolharness. - Encrypted credentials: the role password lives in an encrypted store
~/.postgres-aiops/secrets.enc(Fernet + scrypt) — never plaintext on disk. Unlock with a master password fromPOSTGRES_AIOPS_MASTER_PASSWORD(MCP/CI) or an interactive prompt (CLI). - Reversibility: mutating writes fetch the real before-state first and record a faithful inverse —
create_index↔drop_index;drop_indexcapturespg_get_indexdefso undo recreates it exactly;update_settingcaptures the prior value so undo sets it back. Irreversible ops (terminate_backend,cancel_query,run_vacuum,run_analyze,reindex,reset_query_stats) record prior stats for audit but declare no undo. - Safety: every state-changing CLI op supports
--dry-runand requires double confirmation; every write MCP tool takes adry_runpreview. All identifiers that cannot be parameterised (table/index/GUC names) are validated and quoted; all values are bound query parameters.
Capability matrix (35 MCP tools)
Excerpt — the full document is on GitHub.
Alternatives to Postgres AIops
- MySQL AIopsB · 71Governed MySQL/MariaDB DBA ops: slow-query, lock-wait, replication & fragmentation RCA; 35 tools.
- ainative-postgres-mcpA · 85Zero-config Postgres MCP with auto-provisioning — drop-in for server-postgres.
- agent-tools (x402 + MCP + A2A directory)B · 78Discover x402 services, MCP servers and A2A agents by intent — agent-tools.cloud directory.
- GitHub Platform Changelog — buy per-query in-session (githubchangelog)B · 65GitHub platform changelog feed. $0.01/query. Register in-session — free testnet funds.
Maintain Postgres AIops? Add a badge to your README
Shows its health grade, and links readers to install steps for every client.
[](https://mcp-skills-hub.vercel.app/mcps/io-github-aiops-tools-postgres-aiops)Catalog data refreshed . Something wrong? Report it.