Flux159/mcp-server-kubernetes

MCP Server for kubernetes management commands

What it solves

This project lets AI coding assistants (like Claude, Codex, or Cursor) directly manage a Kubernetes cluster. Instead of switching to a terminal to run kubectl or helm commands, you can ask the assistant in plain language to list pods, apply a YAML manifest, scale a deployment, or diagnose a failing pod — and the assistant performs the action for you.

How it works

It is an MCP (Model Context Protocol) server that connects to your existing Kubernetes setup using your kubeconfig file (the same credentials kubectl uses). The server exposes a set of tools — such as kubectl_get, kubectl_apply, kubectl_logs, helm_install, port_forward, and more — that the AI assistant can call. You install it into your preferred client (Claude Code, Codex, Claude Desktop, VS Code, Cursor, Muse Code) with a simple configuration, and it automatically uses your current kubectl context. It also offers safety modes: a non-destructive mode that blocks deletions and other risky operations, and a strict read-only mode that only allows queries. Optional OpenTelemetry integration lets you trace every tool call for debugging and monitoring.

Who it’s for

Developers and DevOps engineers who use AI-powered coding tools and want to operate Kubernetes clusters from within their chat interface — without leaving the editor or terminal to run commands manually. It’s especially useful for quick inspections, routine deployments, and troubleshooting workflows.

Highlights

  • Unified kubectl API: get, describe, create, apply, delete, logs, scale, patch, rollout, and more
  • Helm support: install, upgrade, uninstall charts, plus template-based operations to bypass auth issues
  • Advanced operations: port forwarding, pod cleanup (Evicted, CrashLoopBackOff, etc.), and node cordon/drain/uncordon
  • Built-in troubleshooting prompt (/k8s-diagnose) that walks through pod issues step by step
  • Non-destructive mode and read-only mode for safer access
  • Secrets masking to hide sensitive data in kubectl get secrets output
  • Optional OpenTelemetry observability with support for Jaeger, Tempo, Grafana, and other OTLP backends
  • Easy installation across Claude Code, Codex, Claude Desktop, VS Code, Cursor, and Muse Code

Related

  • Project
  • Project
  • Project
  • Project
  • Project