# MCP Percona Pg

> MCP Percona Pg is an open-source MCP server for databases. MCP server for operating Percona PostgreSQL and PgBouncer clusters on Kubernetes. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI
- **Repository:** https://github.com/dockndevai/mcp-percona-pg
- **MCP Registry name:** io.github.dockndevai/mcp-percona-pg
- **Categories:** [databases](https://ai-powered.com/categories/databases), [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-11-18

## About

This server talks to the Percona Operator for PostgreSQL v2 through your kube-config and drives its custom resources (PerconaPGCluster, PerconaPGBackup, PerconaPGRestore, PerconaPGUpgrade). That lets requests like "scale dev-pg to 3 replicas" or "switch pooling to transaction mode" map to operator changes.

It covers cluster status including Patroni members, connection endpoints, PgBouncer pool_mode and pool tunables, PostgreSQL parameters merged through Patroni's dynamic configuration, extension toggles, on-demand backups, point-in-time restore, standby promotion and major-version upgrades. It never reads or returns database credentials.

Starting in read-only mode, it adds namespace and cluster allowlists, protected clusters, separate opt-ins for restore, upgrade and delete, typed cluster-name confirmation for high-impact actions, dry-run, and a JSON audit trail. Scoping the kube-config to a narrow ServiceAccount is recommended.

## Features

- **Cluster status:** Summaries, raw status, Patroni members and connection endpoints.
- **PgBouncer settings:** Read and change pool mode and pool tunables.
- **PostgreSQL parameters:** Read and merge settings through Patroni dynamic configuration.
- **Backup and restore:** Create backups and run point-in-time restores behind an opt-in.
- **Separate gates for risky actions:** Restore, upgrade and delete each need their own flag plus admin mode.
- **Typed confirmation:** High-impact actions require echoing the cluster name.

## Good for

- Check the health of a Postgres cluster without kubectl
- Tune shared_buffers or pooling for a dev cluster
- Take a full backup before a change
- Restore a cluster to a chosen timestamp
- Toggle a built-in extension on a cluster

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-percona-pg -- npx -y @dockndevai/mcp-percona-pg
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-percona-pg": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-percona-pg"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp-percona-pg": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-percona-pg"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp-percona-pg": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-percona-pg"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp-percona-pg": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-percona-pg"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp-percona-pg": {
      "command": "npx",
      "args": [
        "-y",
        "@dockndevai/mcp-percona-pg"
      ]
    }
  }
}
```

## Tools

- `list_contexts`: List kube contexts
- `list_clusters`: List clusters
- `get_cluster`: Get a cluster
- `get_cluster_status`: Get cluster status
- `get_connection_info`: Get connection endpoints
- `get_pgbouncer_config`: Read PgBouncer configuration
- `get_pg_parameters`: Read PostgreSQL parameters
- `list_backups`: List backups
- `list_restores`: List restores
- `scale_cluster`: Scale PostgreSQL or PgBouncer (read-write)
- `set_pgbouncer_config`: Update PgBouncer settings (read-write)
- `set_pg_parameters`: Update PostgreSQL parameters (read-write)
- `pause_cluster`: Pause or resume a cluster (read-write)
- `toggle_builtin_extension`: Toggle a built-in extension (read-write)
- `create_backup`: Create a backup (read-write)
- `restore_cluster`: Restore or point-in-time recover (admin)
- `upgrade_cluster`: Major-version upgrade (admin)
- `promote_standby`: Promote a standby (admin)
- `delete_backup`: Delete a backup (admin)
- `delete_cluster`: Delete a cluster (admin)

## FAQ

### What does it need installed?

A Kubernetes cluster running the Percona Operator for PostgreSQL v2 and a kube-config the server can read.

### Does it see database passwords?

No. The README says it never reads or returns database credentials.

### How is restore protected?

It needs admin mode, PERCONA_ALLOW_RESTORE and confirmation.

### Can I limit which clusters it touches?

Yes, with namespace and cluster allowlists and a protected-clusters list.

### Is MCP Percona Pg free?

Yes. MCP Percona Pg is open source, so you can use and self-host it for free.

### How do I add MCP Percona Pg to Claude Code?

Run this command in your terminal: claude mcp add mcp-percona-pg -- npx -y @dockndevai/mcp-percona-pg

### What are the best alternatives to MCP Percona Pg?

The closest alternatives to MCP Percona Pg are mcp, Midplane, Webflow, Opendatasoft and Vercel MCP.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [mcp](https://ai-powered.com/mcp/mcp-mwfu4c84): mcp is an open-source MCP server for cloud and infrastructure.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Webflow](https://ai-powered.com/mcp/webflow): Webflow is a freemium MCP server for cloud and infrastructure.
- [Opendatasoft](https://ai-powered.com/mcp/opendatasoft): Opendatasoft is a freemium MCP server for cloud and infrastructure.
- [Vercel MCP](https://ai-powered.com/mcp/vercel-mcp): Vercel MCP is an MCP server for cloud and infrastructure.
- [Ripe Stat](https://ai-powered.com/mcp/ripe-stat): Ripe Stat is a freemium MCP server for cloud and infrastructure.
- [Nist Beacon](https://ai-powered.com/mcp/nist-beacon): Nist Beacon is a freemium MCP server for cloud and infrastructure.
- [OpenWrt MCP](https://ai-powered.com/mcp/openwrt-mcp): OpenWrt MCP is an open-source MCP server for cloud and infrastructure.

---
Source: https://ai-powered.com/mcp/mcp-percona-pg
