/ Verzeichnis / Playground / MKP (Model Kontext for K8s)
● Offiziell StacklokLabs ⚡ Sofort

MKP (Model Kontext for K8s)

von StacklokLabs · StacklokLabs/mkp

Kubernetes MCP from Stacklok — native API client, not a kubectl wrapper.

MKP is a Kubernetes MCP server written in Go that talks directly to the API server (not by shelling out to kubectl). That means structured outputs, less prompt pollution, and proper RBAC enforcement based on the agent's serviceaccount.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

mkp-mcp.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren Client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mkp-mcp": {
      "command": "mkp",
      "args": [
        "serve"
      ]
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "mkp-mcp": {
      "command": "mkp",
      "args": [
        "serve"
      ]
    }
  }
}

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "mkp-mcp": {
      "command": "mkp",
      "args": [
        "serve"
      ]
    }
  }
}

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mkp-mcp": {
      "command": "mkp",
      "args": [
        "serve"
      ]
    }
  }
}

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "mkp-mcp",
      "command": "mkp",
      "args": [
        "serve"
      ]
    }
  ]
}

Continue nutzt ein Array von Serverobjekten statt einer Map.

~/.config/zed/settings.json
{
  "context_servers": {
    "mkp-mcp": {
      "command": {
        "path": "mkp",
        "args": [
          "serve"
        ]
      }
    }
  }
}

In context_servers hinzufügen. Zed lädt beim Speichern neu.

claude mcp add mkp-mcp -- mkp serve

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: MKP (Model Kontext for K8s)

Find which pod is OOMKilling and propose a fix

👤 K8s operators ⏱ ~15 min intermediate

Wann einsetzen: You're paged for memory pressure and don't have a dashboard up.

Voraussetzungen
  • Server/skill installed and authenticated — See repo README
Ablauf
  1. Spot the OOMs
    Find pods in any namespace with restartCount > 3 in the last hour. Show pod, namespace, last termination reason.✓ Kopiert
    → Targeted list, likely with OOMKilled in the reason
  2. Propose the fix
    Get the limits/requests for the worst offender. Tell me what to raise and write an apply_manifest dry-run patch.✓ Kopiert
    → Resource diff + a dry-run apply

Ergebnis: Targeted patch ready to apply, RBAC-checked.

Fallstricke
  • MKP only exposes what the bound SA can do — MKP only exposes what the bound SA can do — to enable apply_manifest you must bind an SA with patch permission.
Kombinieren mit: portainer-mcp

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

mkp-mcp + portainer-mcp

Pair with portainer-mcp for complementary capabilities

Use this server together with portainer-mcp to complete a multi-step task.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
list_resources kind, namespace, label_selector Inventory any resource type 1 API call
get_logs pod, container, tail_lines Triage a pod 1 API call
apply_manifest yaml, dry_run Deploy a change (dry-run first) 1 API call

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
See provider docs for rate limits
Tokens pro Aufruf
Varies by tool
Kosten in €
See repo README for pricing details
Tipp
Cache tool results and avoid repeated identical calls.

Sicherheit

Rechte, Secrets, Reichweite

Credential-Speicherung: Use environment variables; never commit secrets
Datenabfluss: Tool calls go to the provider's API as documented

Fehlerbehebung

Häufige Fehler und Lösungen

Forbidden on list pods

Bind a Role/ClusterRole with pods:get,list,watch to the SA mkp uses. Use kubectl auth can-i to verify.

Prüfen: kubectl auth can-i list pods
context not found

Set KUBECONFIG to a file with the right context, or pass --context.

Prüfen: kubectl config get-contexts

Alternativen

MKP (Model Kontext for K8s) vs. andere

AlternativeWann stattdessenKompromiss
containers/kubernetes-mcp-serverYou want the most-starred optionSimilar feature set; pick by org preference

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen