Skip to main content
Glama

KubeAid MCP

Ein MCP-Server für KubeAid-verwaltete Kubernetes-Cluster. Integrieren Sie ihn in Claude Code, Claude Desktop, Cursor oder einen beliebigen MCP-kompatiblen Client und stellen Sie Fragen wie „welche Apps sind nicht mehr synchron?“, „warum ist kube-prometheus degraded?“ oder „synchronisiere die cert-manager-App“ — das Modell antwortet, indem es die Tools dieses Servers aufruft, die über Ihre eigenen kubeconfig-Anmeldeinformationen mit Ihrem Cluster sprechen.

In TypeScript gebaut auf dem offiziellen @modelcontextprotocol/sdk und @kubernetes/client-node.

Autor: Deep Poharkar

Warum KubeAid-spezifisch?

KubeAid betreibt Cluster auf GitOps-Weise: Jede Anwendung ist eine ArgoCD-Application, die aus Ihrem kubeaid-config-Repo generiert wird, und Auto-Sync ist standardmäßig deaktiviert — Drift zwischen Git und Cluster ist normal und wartet auf einen bewussten Sync. Ein allgemeiner Kubernetes-Assistent versteht diesen Workflow nicht. Dieser Server schon:

  • Die ArgoCD-Application-CR ist ein Bürger erster Klasse: Sync-Status, Health, fehlgeschlagene Bedingungen und abgedriftete Ressourcen sind nur einen Tool-Aufruf entfernt.

  • Sync wird als die explizite „Jetzt bereitstellen“-Entscheidung modelliert, die es in KubeAid ist — abgesichert hinter einem Opt-in-Flag, mit dry_run-Unterstützung, und auf Kontexten, die Sie als geschützt markieren, nie erlaubt.

  • Die gebündelten Prompts kodieren KubeAid-Betriebsgewohnheiten: Drift vor dem Sync prüfen, Dinge im kubeaid-config-Repo beheben, anstatt den Cluster von Hand zu bearbeiten.

Related MCP server: mcp-kubernetes-server

Tools

Lese-Tools — immer registriert:

Tool

Beschreibung

list_contexts

Kubeconfig-Kontexte, die der Server ansteuern kann, mit Standard- und Schreibschutz-Flags.

list_argocd_apps

Jede von KubeAid verwaltete ArgoCD-App mit Sync-Status, Health, Revision und Auto-Sync-Flag. Unterstützt only_problems.

describe_argocd_app

Eine App im Detail: Quellen, Fehlerbedingungen, abgedriftete/ungesunde Ressourcen, letztes Sync-Ergebnis, Deployment-Verlauf.

list_namespaces

Namespaces mit Status und Alter.

list_nodes

Nodes mit Ready-Status, Rollen, kubelet-Version, interner IP.

list_pods

Pods mit kubectl-artigem abgeleitetem Status (CrashLoopBackOff usw.), Ready-Anzahl, Neustarts, Node, Alter.

describe_pod

Zustände pro Container und Details zum letzten Absturz, Bedingungen und die letzten Ereignisse des Pods.

get_pod_logs

Container-Logs verfolgen; previous: true liest die Logs der abgestürzten Instanz.

list_deployments

Deployments mit Ready-/Up-to-date-/Available-Anzahl.

get_events

Letzte Ereignisse, optional nur Warnungen, pro Namespace oder clusterweit.

describe_resource

Beliebige Ressource nach apiVersion/kind/name — einschließlich CRDs wie SealedSecret oder Certificate.

Schreib-Tools — nur registriert, wenn KUBEAID_MCP_ALLOW_WRITES=true:

Tool

Beschreibung

sync_argocd_app

Einen ArgoCD-Sync auslösen (die KubeAid-Aktion „Jetzt bereitstellen“). Unterstützt revision, prune, dry_run.

scale_deployment

Die Replica-Anzahl eines Deployments festlegen.

rollout_restart

Einen Rolling-Restart eines Deployments/StatefulSets/DaemonSets durchführen.

delete_pod

Einen festhängenden Pod löschen, damit sein Controller ihn ersetzt.

Jedes Tool akzeptiert ein optionales context-Argument, um von einem einzelnen Serverprozess aus jeden Cluster in Ihrer kubeconfig anzusteuern.

Prompts

Prompts erscheinen als Slash-Befehle / Menüpunkte im Client und führen das Modell mit den obigen Tools durch einen Workflow:

Prompt

Workflow

diagnose_app

Ursachenanalyse einer Degraded/OutOfSync-App: Bedingungen → Ressourcen → Pod-Logs → Empfehlung.

sync_review

Alle abgedrifteten Apps auflisten, das Risiko jedes anstehenden Syncs bewerten und dann fragen, bevor etwas synchronisiert wird.

cluster_health_check

Nodes, Apps, Pods und Warnereignisse durchgehen; Ergebnisse nach Schweregrad melden.

Schnellstart

Erfordert Node.js 20+.

git clone <your-repo-url> kubeaid-mcp
cd kubeaid-mcp
npm install
npm run build

Claude Code

claude mcp add kubeaid -- node "$(pwd)/dist/index.js"

Standardmäßig schreibgeschützt. Um Schreibzugriff zu aktivieren und die Produktion unantastbar zu lassen:

claude mcp add kubeaid \
  -e KUBEAID_MCP_ALLOW_WRITES=true \
  -e KUBEAID_MCP_PROTECTED_CONTEXTS=prod-cluster-1,prod-cluster-2 \
  -- node "$(pwd)/dist/index.js"

Claude Desktop

Aktivieren Sie Einstellungen → Entwickler → Lokale MCP-Server und fügen Sie dann der Konfigurationsdatei, die diese Seite öffnet, Folgendes hinzu:

{
  "mcpServers": {
    "kubeaid": {
      "command": "node",
      "args": ["/absolute/path/to/kubeaid-mcp/dist/index.js"],
      "env": {
        "KUBEAID_MCP_ALLOW_WRITES": "true",
        "KUBEAID_MCP_PROTECTED_CONTEXTS": "prod-cluster-1"
      }
    }
  }
}

Beenden Sie die App danach vollständig und öffnen Sie sie erneut.

Konfiguration

Die gesamte Konfiguration erfolgt über Umgebungsvariablen, die beim Start einmal gelesen werden:

Variable

Standard

Bedeutung

KUBECONFIG

Standard-Suchpfad von client-node (~/.kube/config)

Kubeconfig-Pfad.

KUBEAID_MCP_CONTEXT

folgt dem current-context live

Einen festen Standardkontext festlegen. Wenn nicht gesetzt, richtet kubectl config use-context den Server mitten in der Sitzung neu aus; context-Argumente pro Aufruf haben immer Vorrang.

KUBEAID_MCP_ARGOCD_NAMESPACE

argocd

Namespace, der die ArgoCD-Application-CRs enthält.

KUBEAID_MCP_ALLOW_WRITES

false

Die mutierenden Tools überhaupt registrieren.

KUBEAID_MCP_PROTECTED_CONTEXTS

keine

Kommagetrennte Kontexte, die jeden mutierenden Aufruf ablehnen, selbst wenn Schreibzugriff aktiviert ist.

Sicherheitsmodell

Drei unabhängige Ebenen:

  1. Capability-Gating — bei deaktiviertem Schreibzugriff (Standard) werden mutierende Tools nie registriert, sodass das Modell sie nicht einmal sehen kann.

  2. Geschützte Kontexte — jeder mutierende Handler prüft den Zielkontext erneut gegen KUBEAID_MCP_PROTECTED_CONTEXTS und lehnt geschützte ab, ganz gleich, was das Modell verlangt.

  3. Client-Bestätigung — Tools tragen MCP-readOnlyHint/destructiveHint-Annotationen, sodass sich gut verhaltende Clients Sie vor riskanten Aufrufen um Bestätigung bitten.

Der Server besitzt keine eigenen Anmeldeinformationen; er kann nur das tun, wozu Ihre kubeconfig-Identität bereits über RBAC autorisiert ist.

Entwicklung

npm run typecheck   # strict TS, no emit
npm run build       # compile to dist/
npm run smoke       # spawn the server, MCP handshake, list tools + prompts
KUBEAID_MCP_ALLOW_WRITES=true npm run smoke   # verify write tools register

Der Smoke-Test benötigt keinen Cluster — er steuert das rohe JSON-RPC-Protokoll über stdio.

Roadmap

  • check_chart_updates: vergleicht die bereitgestellten Chart-Versionen mit dem Upstream-Verzeichnis argocd-helm-charts von KubeAid.

  • Sealed-Secrets-Helfer: SealedSecret-Status auflisten, fehlgeschlagene Entsiegelungen markieren.

  • Prometheus/Alertmanager-Tools: aktive Alerts aus dem kube-prometheus-Stack anzeigen, den KubeAid mitliefert.

Danksagungen

  • KubeAid von Obmondo — der Cluster-Management-Stack, für den dieser Server gebaut wurde.

  • Argo CD — die GitOps-Engine unter KubeAid.

Lizenz

MIT © 2026 Deep Poharkar

Available Tools

11 tools
describe_argocd_appA
Read-only

Full detail for one ArgoCD Application: Git/Helm sources, sync and health status, error conditions, the resources that are OutOfSync or unhealthy, last sync operation result and recent deploy history. Use this to diagnose why an app is Degraded or a sync failed.

Inputs: name (required), context.

describe_podA
Read-only

Deep-dive one pod: per-container state (waiting/termination reasons, last crash exit code), conditions and the pod's recent events.

Inputs: name (required), namespace (required), context.

describe_resourceA
Read-only

Fetch any Kubernetes resource (including CRDs like SealedSecret or Certificate) by apiVersion, kind and name. Returns the full object.

Inputs: kind (required), name (required), context, namespace, +1 more.

get_eventsA
Read-only

Recent cluster events, newest last. Filter to one namespace and/or Warning-type events only.

Inputs: context, namespace, only_warnings.

get_pod_logsA
Read-only

Tail a container's logs. Set previous=true to read the prior (crashed) instance's logs — essential for CrashLoopBackOff.

Inputs: name (required), namespace (required), lines, context, +2 more.

list_argocd_appsA
Read-only

List the ArgoCD Applications KubeAid manages in this cluster, with sync status (Synced/OutOfSync), health (Healthy/Degraded/...), deployed revision and whether auto-sync is on. KubeAid disables auto-sync by default, so OutOfSync apps are usually awaiting a deliberate sync. Start here for any GitOps question.

Inputs: context, project, only_problems.

list_contextsA
Read-only

List the kubeconfig contexts (clusters) this server can target, including which one is the default and which are write-protected.

Inputs: no named parameters.

list_deploymentsA
Read-only

List deployments with ready/up-to-date/available replica counts and age.

Inputs: context, namespace.

list_namespacesA
Read-only

List namespaces in the cluster with their status and age.

Inputs: context.

list_nodesA
Read-only

List cluster nodes with Ready status, roles, kubelet version and internal IP.

Inputs: context.

list_podsA
Read-only

List pods with derived status (CrashLoopBackOff, ImagePullBackOff, Terminating, ...), ready count, restarts, node and age.

Inputs: context, namespace.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 11 tools

    Disambiguation5/5

    Each tool targets a distinct resource/action - nodes, events, ArgoCD apps, pods, deployments, generic resource fetch, contexts, namespaces - with no overlapping purposes. The list/describe pairs for pods and ArgoCD apps are clearly separated by summary vs. detail, and describe_resource is explicitly generic.

    Naming Consistency5/5

    Naming follows a consistent verb_noun pattern: list_* for summary listings, describe_* for detailed views, and get_pod_logs as a specific action. Even though get_events uses 'get' instead of 'list', the pattern is predictable and readable, so deviation is minor and not confusing.

    Tool Count5/5

    With 11 tools, the set is well-scoped for a Kubernetes diagnostic server. Each tool addresses a common troubleshooting need (node health, pod issues, logs, ArgoCD sync, deployments) without excess or missing core operations.

    Completeness5/5

    The surface covers the main diagnostic workflows: listing and describing nodes, pods, deployments, and ArgoCD apps; retrieving events and logs; fetching any resource via describe_resource; and listing contexts/namespaces. For a read-only troubleshooting tool, this is comprehensive with no critical dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      An MCP (Model Context Protocol) server that integrates with the ArgoCD API, enabling AI assistants and large language models to manage ArgoCD applications and resources through natural language interactions.
      10
      12
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables AI assistants to interact with Kubernetes clusters by translating natural language into kubectl and Helm operations. It allows users to query, manage, and diagnose Kubernetes resources and cluster states through a seamless integration.
      20
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      A lightweight MCP server that enables AI assistants to deploy, inspect, and operate Kubernetes workloads through high-level workflow tools, reducing token usage with structured outputs.
      3
      MIT