convez.ai
MCP ServerDevOps & InfraestruturaAvançado
kubedb

KubeDB MCP Server

kubedb/mcp-server

Gerenciamento inteligente de bancos de dados KubeDB via IA

Ver no GitHub
InicialPluginScore · de 0 a 100

Servidor MCP que permite agentes de IA gerenciar bancos de dados KubeDB rodando em clusters Kubernetes e OpenShift. Fornece ferramentas para inventário, provisionamento, operações day-2 (restart, upgrade, scaling) e gerenciamento de ciclo de vida de mais de 25 tipos de engines (Postgres, MySQL, MongoDB, Redis, Kafka, Elasticsearch, etc).

Instalação

$npx convez-ai kubedb/mcp-server

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
25%
Último commit
há 1 mês
Versão
—
Issues abertas
0
Contribuidores
2

Casos de uso

  • Inventariar e monitorar bancos de dados em múltiplos clusters Kubernetes
  • Provisionar novos bancos de dados com padrões sensatos
  • Executar operações day-2 (restart, upgrade de versão, scaling, expansão de volume)
  • Automatizar patching e validação de constraints de upgrade
  • Gerenciar autoscaling de compute e storage de forma programática

Veredito

Ferramenta sólida e bem-estruturada para times DevOps que já usam KubeDB e querem automação inteligente via Claude. Requer conhecimento técnico de Kubernetes e KubeDB para extrair todo o valor; integração direta com kubeconfig local e suporte multi-cluster a tornam poderosa para ambientes enterprise.

README

A tradução para o português deste README ainda está na fila.

KubeDB MCP Server

A Model Context Protocol server that lets AI agents manage KubeDB databases running in Kubernetes and OpenShift clusters: Postgres, MySQL, MongoDB, Redis, Kafka, Elasticsearch, MariaDB, RabbitMQ, Druid, SingleStore and 25+ other engines.

Written in Go on the official MCP Go SDK. Single static binary, dual transport (stdio for local use, streamable HTTP for in-cluster deployment), discovery driven so it works with any KubeDB release and any subset of installed CRDs.

What agents can do with it

Inventory and observe: list every database across kinds and namespaces with version, phase, replicas, and storage. Pull full manifests, health reports (conditions, pod readiness, warning events), connection endpoints, and the version catalog with upgrade constraints.

Provision and manage lifecycle: create databases with sensible defaults, apply full manifests with server side apply, patch specs, pause and resume, delete with an explicit confirmation gate.

Day-2 operations: every KubeDB OpsRequest type, with dedicated tools for the common paths (restart, version update with catalog validation, horizontal and vertical scaling, volume expansion) and a generic escape hatch for the rest (Reconfigure, ReconfigureTLS, RotateAuth, StorageMigration, Reprovision, database specific types). Plus compute and storage autoscaler configuration.

Data plane resources: schema manager databases (schema.kubedb.com), Kafka ConnectClusters and Connectors, Postgres Publishers and Subscribers, archivers, and Elasticsearch dashboards are all reachable through the generic resource tools.

Tools

ToolKindDescription
kubedb_list_kindsreadDiscover installed KubeDB API groups and kinds
kubedb_list_contextsreadList kubeconfig contexts (multi-cluster)
kubedb_list_databasesreadDatabase inventory with compact summaries
kubedb_list_resourcesreadList any KubeDB family resource
kubedb_get_resourcereadFull manifest of any object, YAML or JSON
kubedb_database_healthreadPhase, conditions, pods, warning events
kubedb_get_connection_inforeadEndpoints, auth secret, TLS state, optional credentials
kubedb_list_versionsreadCatalog versions with deprecation and upgrade constraints
kubedb_list_ops_requestsreadDay-2 operation status
kubedb_create_databasewriteGuided provisioning with dryRun
kubedb_apply_manifestwriteServer side apply for any KubeDB manifest
kubedb_patch_resourcewriteJSON merge patch or JSON Patch
kubedb_halt_databasewritePause and resume
kubedb_create_ops_requestwriteGeneric OpsRequest builder, all types
kubedb_restart_databasewriteSafe ordered restart
kubedb_update_versionwriteUpgrade with catalog validation
kubedb_scale_databasewriteHorizontal and vertical scaling
kubedb_expand_volumewriteOnline and offline volume expansion
kubedb_configure_autoscalerwriteCompute and storage autoscaling
kubedb_delete_resourcedestructiveDelete with confirm=true gate

Every write tool supports dryRun for server side validation without persisting.

Quick start (local, stdio)

go install kubedb.dev/mcp-server/cmd/kubedb-mcp@latest

Claude Code:

claude mcp add kubedb -- kubedb-mcp

Claude Desktop or any MCP client (uses your current kubeconfig context, switch per call via the context parameter):

{
  "mcpServers": {
    "kubedb": {
      "command": "kubedb-mcp",
      "args": ["--allow-credentials"]
    }
  }
}

Safety model

FlagEnvEffect
--read-onlyKUBEDB_MCP_READ_ONLYOnly the 9 read tools are registered
--disable-destructiveKUBEDB_MCP_DISABLE_DESTRUCTIVERemoves delete, blocks halt
--allow-credentialsKUBEDB_MCP_ALLOW_CREDENTIALSOpt-in for credential decoding

Defense in depth beyond the flags: the server refuses to touch any resource outside the *.kubedb.com API groups, deletion requires an explicit confirm=true argument, all tools carry accurate MCP annotations (readOnlyHint, destructiveHint) so clients can apply their own policies, and effective permissions are always bounded by the RBAC of the kubeconfig user or service account.

In-cluster deployment (HTTP)

The container runs the streamable HTTP transport in stateless JSON mode on port 8080, serving MCP at /mcp and health at /healthz.

make image                       # UBI based build via Dockerfile
kubectl create ns kubedb-mcp
kubectl apply -f deploy/openshift/rbac.yaml
kubectl apply -f deploy/openshift/mcpserver.yaml   # MCP lifecycle operator CR

deploy/openshift/mcpserver.yaml targets the MCP lifecycle operator (mcp.x-k8s.io/v1alpha1), the operator behind the OpenShift AI MCP catalog. On clusters without the operator, a plain Deployment plus Service works the same way; the binary needs nothing beyond the service account.

RBAC ships in three tiers: kubedb-mcp-read for observe-only deployments, kubedb-mcp-full for lifecycle and day-2 tools, and kubedb-mcp-credentials (secrets get) only if credential decoding is enabled.

Red Hat OpenShift AI MCP catalog

The MCP catalog in OpenShift AI 3.4+ (AI hub) lists validated MCP servers that admins deploy through the MCP lifecycle operator and consume through the MCP gateway and gen AI studio. This server is built to meet the catalog's technical bar:

  1. Streamable HTTP transport, stateless, load balancer friendly (mcp.stateless: true).
  2. UBI based image: the Dockerfile builds on ubi9/go-toolset and ships on ubi9-micro, non root (UID 65532), read only root filesystem, restricted SCC compatible, license in /licenses.
  3. Required image labels (name, vendor, version, release, summary, description) for Red Hat container certification scanning.
  4. Health endpoint at /healthz and MCP at /mcp, matching the operator's defaults.

Onboarding path for the catalog listing:

  1. Certify the image through Red Hat Partner Connect container certification (AppsCode already maintains certified KubeDB operator images, so this reuses the existing partner account and pipeline). The certified image publishes to registry.connect.redhat.com.
  2. Submit the server for MCP catalog inclusion through the OpenShift AI partner pipeline (partner consent plus technical scanning). Red Hat's validation covers provenance, vulnerability scanning, and transport conformance.
  3. Optionally publish server.json to the official MCP registry for discovery outside OpenShift; the file in this repo follows the registry schema.

Development

make build       # static binary in bin/
make vet
make inspector   # interactive testing with the MCP Inspector

License

Apache 2.0. Copyright AppsCode Inc.

Ver o original no GitHub

Bom para

Relacionados