Skip to content

Summary

Open-source MCP server that lets AI assistants manage a Kubernetes cluster through kubectl and Helm, using your existing kubeconfig.

Features

  • kubectl get, describe, apply, logs, scale, patch and rollout tools on your existing kubeconfig
  • Optional Helm v3 chart operations, including template-based install
  • Non-destructive mode and optional OpenTelemetry tracing
  • Kubeconfig loaded from several sources in priority order
  • Configs for Claude Code, Codex, Claude Desktop, Cursor and VS Code
  • Claude Desktop .mcpb extension and optional streamable HTTP mode

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it.
  3. Restart the agent — the "MCP Server Kubernetes" tools will be available.
{
  "mcpServers": {
    "mcp-server-kubernetes": {
      "command": "npx",
      "args": [
        "mcp-server-kubernetes"
      ]
    }
  }
}

Description

MCP Server Kubernetes, by Flux159, connects an AI assistant to a Kubernetes cluster and lets it manage it the way you would with kubectl and Helm: list and inspect resources, create and change deployments, read logs and install charts. It runs against whatever context your kubeconfig points at, so minikube, Rancher Desktop, GKE and other clusters work the same way.

Requirements

kubectl on your PATH, a kubeconfig with contexts (loaded from ~/.kube/config by default, with other sources such as environment variables and custom paths in priority order), and access to a cluster. Helm v3 is optional and only needed for chart operations.

Setup

It runs with npx mcp-server-kubernetes over stdio. The README gives ready commands for Claude Code (claude mcp add kubernetes -- npx mcp-server-kubernetes) and Codex, configs for Claude Desktop, Cursor and VS Code (with a one-click install button), and an .mcpb extension listed in Claude Desktop's extension browser. A streamable HTTP mode on port 3000 is available behind an explicit ENABLE_UNSAFE_STREAMABLE_HTTP_TRANSPORT flag.

Extras

A non-destructive mode removes delete operations while keeping reads and changes, kubectl_generic runs any other kubectl command, template-based Helm install and uninstall work around chart-repository authentication issues, secrets are masked in kubectl get secrets output, a /k8s-diagnose prompt walks through troubleshooting pods, and optional OpenTelemetry tracing covers every tool call.

Who it is for

Developers and platform engineers who want to operate or debug clusters from an agent instead of typing kubectl. MIT-licensed; the same author maintains the mcp-chat CLI client.

Covered in the Weekly

Browse all MCP servers →