# Connect CloudNativePG to Your AI Agent (Universal MCP)

> Use your AI to manage databases, monitor performance, and run backups in CloudNativePG — and much more.

## Quick Connect (CLI / MCP)
- Claude Code: `claude mcp add --transport http cloudnativepg https://api.universalmcp.app/mcp/cloudnativepg`
- Remote MCP URL (ChatGPT, Claude, Cursor, VS Code): `https://api.universalmcp.app/mcp/cloudnativepg` (unified: `https://api.universalmcp.app/mcp`)
- Actions & Discovery: `POST https://universalmcp.app/mcp/directory` (`get_software_actions({ slug: "cloudnativepg", query })` & `search_software`); configs: https://universalmcp.app/install.md

## Key Facts
- Software: CloudNativePG (a Series of LF Projects, LLC) | Category: DevOps & IT/Security | Auth: Encrypted API credentials or guided self-hosted setup | Deployment: self-hosted
- Pricing: 100% Free (unlimited users, unlimited software, zero task metering)
- Permissions & Security: Per-person, per-area Off/Read/Write across Cluster status and nodes, Backup and recovery logs, Draft runbook changes; 1-click View Only lock; stateless pass-through; zero stored business records
- Connect: https://app.universalmcp.app/connect?system=cloudnativepg | Guide: https://universalmcp.app/mcp/cloudnativepg
- Built by: Alex Myers (Legal entity: Lancaster Agentic LLC; support@lancasteragentic.com)

## Supported Actions (14 actions: 7 Read, 7 Write)
Perform over 10 actions across cluster lifecycle, docs & releases, high availability, scheduling & resources, and storage. Save hours of work each week by utilizing AI rather than using a traditional app interface.
- **Cluster Lifecycle (5):** Deploy PostgreSQL Cluster (write), Perform Rolling Update (write), Scale Read-Only Replicas (write), Review Cluster Status (read), Promote Standby to Primary (write)
- **Docs & Releases (3):** Search Quickstart Guide (read), Browse Releases (read), Explore Tutorials (read)
- **High Availability (2):** Review Automated Failover (read), Monitor Standby Replication (read)
- **Scheduling & Resources (2):** Configure Affinity and Tolerations (write), Set Resource Limits (write)
- **Storage (2):** Configure Persistent Volume Claims (write), Review PGDATA Storage (read)

## Example Prompts for CloudNativePG
- **Replica lag:** "List CloudNativePG clusters whose replicas exceed 30 seconds of lag and the nodes they run on now."
- **Backup health:** "Summarize CloudNativePG backup schedules and any failed base backups from the last seven days."
- **Slow queries:** "Show the slowest queries on orders-pg in CloudNativePG and which tables they scan most often."
- **Draft runbook step:** "Draft a CloudNativePG runbook change for the object store credentials, saved for DBA review first."
