io.github.dockndevai/mcp-percona-pg

Registre officiel Données et bases de données

Manage Percona PostgreSQL + PgBouncer on Kubernetes — safe-by-default access modes and guards.

Que pouvez-vous faire avec io.github.dockndevai/mcp-percona-pg ?

  • Discovery & status — list clusters, per-cluster summary and raw .status (Patroni members, PostgreSQL/PgBouncer readiness), connection endpoints, backups and restores.
  • Connection pooling — read and update PgBouncer pool_mode and the global pool tunables (default_pool_size, max_client_conn, …).
  • PostgreSQL tuning — read/merge parameters via spec.patroni.dynamicConfiguration (the only Patroni-safe path).
  • Lifecycle — scale PostgreSQL/PgBouncer, pause/resume, toggle built-in extensions, on-demand backups.
  • DR & recovery — restore / point-in-time recovery, promote a standby, major-version upgrades — each individually gated.

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package @dockndevai/mcp-percona-pg
Claude Code
claude mcp add mcp-percona-pg -e 'KUBECONFIG_PATH=<KUBECONFIG_PATH>' -e 'PERCONA_MODE=<PERCONA_MODE>' -e 'PERCONA_NAMESPACE=<PERCONA_NAMESPACE>' -- npx -y @dockndevai/mcp-percona-pg@0.3.3
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "mcp-percona-pg": {
            "command": "npx",
            "args": [
                "-y",
                "@dockndevai/mcp-percona-pg@0.3.3"
            ],
            "env": {
                "KUBECONFIG_PATH": "<KUBECONFIG_PATH>",
                "PERCONA_MODE": "<PERCONA_MODE>",
                "PERCONA_NAMESPACE": "<PERCONA_NAMESPACE>"
            }
        }
    }
}

Variables d'environnement

  • KUBECONFIG_PATH Path to a kube-config file that can reach the Percona Operator namespaces (empty = default resolution).
  • PERCONA_MODE Access mode: read-only | read-write | admin.
  • PERCONA_NAMESPACE Default namespace for PerconaPGCluster resources when a tool omits one.

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. mcp-percona-pg
  2. Features
  3. Security model
  4. Tools
  5. Quickstart — add to your agent
  6. Example prompts
  7. Prerequisites
  8. Run from source (development)
  9. Develop
  10. Publishing
  11. License

mcp-percona-pg

A Model Context Protocol server for the Percona Operator for PostgreSQL. It lets an MCP-capable client (Claude Desktop, Claude Code, Cursor, …) operate PostgreSQL + PgBouncer clusters on Kubernetes — topology, connection pooling, tuning, backups/PITR, DR, extensions, and lifecycle — with behaviour controlled entirely by flags.

It drives the operator's custom resources (PerconaPGCluster, PerconaPGBackup, PerconaPGRestore, PerconaPGUpgrade) through your kube-config, so the model works the way you already do: "scale dev-pg to 3 replicas", "switch pooling to transaction mode", "restore prod-pg to 12:00 UTC".

Safe by default: it starts read-only, can be scoped to an allowlist of namespaces and clusters, protects critical clusters from mutation, gates restore / upgrade / delete behind separate opt-ins, and requires typed confirmation for high-impact actions. It never reads or returns database credentials.

Features

  • Discovery & status — list clusters, per-cluster summary and raw .status (Patroni members, PostgreSQL/PgBouncer readiness), connection endpoints, backups and restores.
  • Connection pooling — read and update PgBouncer pool_mode and the global pool tunables (default_pool_size, max_client_conn, …).
  • PostgreSQL tuning — read/merge parameters via spec.patroni.dynamicConfiguration (the only Patroni-safe path).
  • Lifecycle — scale PostgreSQL/PgBouncer, pause/resume, toggle built-in extensions, on-demand backups.
  • DR & recovery — restore / point-in-time recovery, promote a standby, major-version upgrades — each individually gated.

Security model

LayerFlagEffect
Access modePERCONA_MODEread-only → read-write → admin; over-privileged tools are never registered
Namespace/cluster allowlistsPERCONA_NAMESPACE_ALLOWLIST, PERCONA_CLUSTER_ALLOWLISTscope what the agent can touch
Protected clustersPERCONA_PROTECTED_CLUSTERSreadable, never mutated/restored/deleted
Restore / upgrade / deletePERCONA_ALLOW_RESTORE, PERCONA_ALLOW_UPGRADE, PERCONA_ALLOW_DELETEseparate opt-ins on top of admin mode
ConfirmationPERCONA_REQUIRE_CONFIRMATIONhigh-impact ops require echoing the cluster name
Dry-run / auditPERCONA_DRY_RUN, PERCONA_AUDIT_LOGvalidate-only; JSON audit line per guarded op
Interactive confirmation(automatic)destructive & high-impact ops prompt the human to approve via MCP elicitation before running; fall back to the PERCONA_ALLOW_* gates when the client can't elicit

Tools

Read (read-only+): list_contexts, list_clusters, get_cluster, get_cluster_status, get_connection_info, get_pgbouncer_config, get_pg_parameters, list_backups, list_restores

Write (read-write+): scale_cluster, set_pgbouncer_config, set_pg_parameters, pause_cluster, toggle_builtin_extension, create_backup

Admin (admin): restore_cluster (needs PERCONA_ALLOW_RESTORE), upgrade_cluster (needs PERCONA_ALLOW_UPGRADE), promote_standby, delete_backup / delete_cluster (need PERCONA_ALLOW_DELETE)

Quickstart — add to your agent

Published on npm as @dockndevai/mcp-percona-pg. No clone or build needed — your MCP client runs it on demand with npx. Start in read-only mode; see .env.example for every variable and docs/CLIENTS.md for the full per-client guide.

Claude Code (CLI)

claude mcp add percona-pg -e PERCONA_MODE="read-only" -e PERCONA_NAMESPACE="postgres-operator" -- npx -y @dockndevai/mcp-percona-pg

Claude Desktop · Cursor · Windsurf — same block in claude_desktop_config.json, .cursor/mcp.json, or ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "percona-pg": {
      "command": "npx",
      "args": ["-y", "@dockndevai/mcp-percona-pg"],
      "env": {
        "PERCONA_MODE": "read-only",
        "PERCONA_NAMESPACE": "postgres-operator"
      }
    }
  }
}

OpenAI Codex CLI — in ~/.codex/config.toml:

[mcp_servers.percona-pg]
command = "npx"
args = ["-y", "@dockndevai/mcp-percona-pg"]
env = { PERCONA_MODE = "read-only", PERCONA_NAMESPACE = "postgres-operator" }

Example prompts

  • "List the PostgreSQL clusters and show me the status of dev-pg."
  • "What pool_mode is dev-pg using, and how big is the default pool?" → get_pgbouncer_config
  • "Set dev-pg PgBouncer to transaction pooling with default_pool_size 25." (needs read-write)
  • "Bump shared_buffers to 512MB on dev-pg." (needs read-write)
  • "Take a full backup of dev-pg to repo1." (needs read-write)
  • "Restore dev-pg to 2026-08-30 12:00:00+00." (needs admin + PERCONA_ALLOW_RESTORE + confirmation)

Prerequisites

  • A Kubernetes cluster running the Percona Operator for PostgreSQL v2 (pgv2.percona.com/v2).
  • A kube-config the server can read. For safety, use a ServiceAccount/RBAC scoped to the operator's namespaces and to the pgv2.percona.com resources you want the agent to see.

Run from source (development)

Prefer the published package above. To run from a clone:

npm install
npm run build
node dist/index.js   # with the environment variables set

Develop

npm run dev
npm test          # security policy + annotations
npm run typecheck

Publishing

This server ships a server.json for the official MCP registry and an mcpName for npm ownership validation. See PUBLISHING.md.

License

MIT

Questions fréquentes

Qu'est-ce que io.github.dockndevai/mcp-percona-pg ?

Manage Percona PostgreSQL + PgBouncer on Kubernetes — safe-by-default access modes and guards.

Comment installer io.github.dockndevai/mcp-percona-pg ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add mcp-percona-pg -e 'KUBECONFIG_PATH=<KUBECONFIG_PATH>' -e 'PERCONA_MODE=<PERCONA_MODE>' -e 'PERCONA_NAMESPACE=<PERCONA_NAMESPACE>' -- npx -y @dockndevai/mcp-percona-pg@0.3.3. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour io.github.dockndevai/mcp-percona-pg ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

io.github.dockndevai/mcp-percona-pg est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient io.github.dockndevai/mcp-percona-pg ?

Il est publié par dockndevai. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.