MCP Server Kubernetes logo

MCP Server Kubernetes

by flux159

Manage Kubernetes resources, workloads, nodes, Helm releases, logs, rollouts, and port forwards through MCP.

Install MCP Server Kubernetes

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "flux159-mcp-server-kubernetes": {
      "command": "npx",
      "args": [
        "mcp-server-kubernetes"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— the server itself is confirmed live (we called its tools/list endpoint). The stdio install command is a separate, ongoing check.

Overview

flux159/mcp-server-kubernetes connects an MCP client to a Kubernetes cluster using kubectl, kubeconfig, and optional Helm support. Its tools cover resource inspection and mutation, manifest application, logs, scaling, rollouts, node maintenance, port forwarding, pod execution, and context management. Use it when an AI agent needs to investigate or operate a cluster without switching between separate command-line workflows. It runs over standard stdio, with Streamable HTTP available as an optional transport.

Use cases

  • Inspect pods, deployments, services, and other cluster resources
  • Apply or delete Kubernetes manifests through an AI client
  • Read workload logs and execute commands inside pods
  • Scale deployments and manage rollouts
  • Install or upgrade Helm chart releases

Key features

  • Unified kubectl resource operations over MCP
  • Kubernetes context and API reconnection management
  • Helm chart installation, upgrades, and removal
  • Node cordon, drain, and uncordon operations
  • Pod execution, logs, and port forwarding
  • Optional non-destructive mode and OpenTelemetry tracing

Tools23

What MCP Server Kubernetes lets your agent do. Expand a tool for its parameters.

Verified live~5.5k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

31/31 checks healthy over the last 79d

What it can do

From the 23 tools this server returned when we ran it; 22 declare their own safety hints.

Runs commands · 2Can delete or modify data · 12Read-only tools · 11
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceSigned build
Package age683 days
Maintainers1

Observed 2026-10-24 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

3 high-severity advisories on record for this package. Most advisories affect transitive dependencies and may not be exploitable in this server's actual usage — this is a directional signal, not a security audit.

Critical 0High 3Medium 2Low 0

Scanned 7d ago via OSV.dev · mcp-server-kubernetes (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1.6kStargazers on the source repository.
npm downloads106kPackage downloads in the last 30 days.
Last commit1d agoMost recent push to the default branch.
Tools exposed23Callable tools this server registers over MCP.

How MCP Server Kubernetes works

What flux159/mcp-server-kubernetes does

flux159/mcp-server-kubernetes exposes Kubernetes cluster operations as MCP tools. It supports common workload and resource tasks for pods, deployments, services, jobs, daemonsets, statefulsets, and other API resources through a unified interface around kubectl.

Read operations include getting or listing resources, describing them, reading logs, explaining resource fields, listing API resources, and checking the connection. Write and operational tools can apply manifests, create or delete resources, patch fields, scale deployments, manage rollouts, change contexts, and clean up managed resources.

The server also includes cluster-administration workflows. It can cordon, drain, and uncordon nodes; install, upgrade, or uninstall Helm charts; forward local ports to Kubernetes resources; execute a command in a pod; and stop an existing port-forward process. Pod commands are passed as an argument array and run directly rather than through shell interpretation.

How it works

The server uses the Kubernetes access already configured for kubectl. By default, it loads the kubeconfig at ~/.kube/config, including the contexts configured there, and connects to the selected cluster context. Before starting it, kubectl must be installed and available on PATH, and the configured credentials must be able to reach a cluster. Helm 3 is also needed for Helm operations.

MCP clients normally launch it as a stdio process with npx mcp-server-kubernetes. A Streamable HTTP mode is available on the /mcp endpoint and uses port 3000 by default when enabled. The kubectl_reconnect tool recreates Kubernetes API clients, which is useful after a cluster upgrade that changes endpoint DNS resolution or underlying connections.

The server supports a non-destructive mode for read and create/update-only access. Secret values are masked for kubectl get secrets operations, while logs are not affected by that masking behavior. Optional OpenTelemetry instrumentation can trace tool calls and export spans to Jaeger, Tempo, Grafana, or another OTLP backend.

Setup and configuration

Install kubectl and configure a working kubeconfig before adding the server to an MCP client. Verify access independently with a command such as kubectl get pods. Helm 3 is optional unless chart operations are required.

Claude Code and Codex can register the server with their MCP commands:

Terminal
claude mcp add kubernetes -- npx mcp-server-kubernetes
codex mcp add kubernetes -- npx mcp-server-kubernetes

Claude Desktop, Cursor, and VS Code can use a stdio configuration with npx as the command and mcp-server-kubernetes as its argument. Claude Desktop also supports the server as an mcpb extension. The project documents a Streamable HTTP configuration for Muse Code, using ENABLE_UNSAFE_STREAMABLE_HTTP_TRANSPORT=1 when launching HTTP mode.

Tools and capabilities

  • Inspect resources with kubectl_get, kubectl_describe, explain_resource, and list_api_resources.
  • Create, apply, delete, patch, scale, and roll out Kubernetes resources.
  • Read pod, deployment, or job logs and execute direct commands in pods.
  • Manage contexts and refresh API connections after cluster changes.
  • Install, upgrade, and uninstall Helm releases, including template-based operations.
  • Cordon, drain, and uncordon nodes for maintenance.
  • Start and stop local port forwards.
  • Run a generic kubectl command when a specialized tool does not cover the operation.
  • Clean up managed resources and use ping to verify the MCP connection.

Limitations and notes

Cluster permissions still come from the kubeconfig and Kubernetes credentials used by kubectl. The server does not replace RBAC configuration or grant access by itself. Helm features require Helm 3 on the host. Pod command execution avoids shell interpretation, so commands must be supplied as an executable followed by separate argument strings.

The non-destructive mode and secret masking are available as safety features, but secret masking does not apply to logs. OpenTelemetry is opt-in rather than enabled by default. HTTP transport is described as unsafe and must be explicitly enabled with its environment variable.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Server Kubernetes

flux159/mcp-server-kubernetes is an MCP server that connects AI clients to Kubernetes clusters through kubectl and kubeconfig. Its main tools inspect, create, apply, patch, delete, scale, and roll out resources, retrieve logs, execute pod commands, manage contexts, forward ports, and operate Helm releases.

Run it with `npx mcp-server-kubernetes` after installing kubectl and configuring a working kubeconfig. Add that command to your MCP client, such as Claude Desktop, Claude Code, Codex, Cursor, or VS Code. Helm 3 is required only for Helm operations.

Yes, flux159/mcp-server-kubernetes works with Cursor through its MCP configuration. Add a server named `kubernetes` to the global `~/.cursor/mcp.json` or project `.cursor/mcp.json`, using `npx` as the command and `mcp-server-kubernetes` as its argument.

It uses kubectl and the kubeconfig available to the host, loading `~/.kube/config` by default. Configure a valid context and verify access with `kubectl get pods` before starting the MCP server. The `kubectl_context` tool can list, inspect, or set contexts.

Yes, it can install, upgrade, and uninstall Helm chart releases. Helm 3 must be installed and available on `PATH`. The installation and uninstallation capabilities also support template-based workflows for cases where the standard Helm operation has authentication issues.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Server Kubernetes AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/flux159-mcp-server-kubernetes?style=directory)](https://allmcps.com/mcp/flux159-mcp-server-kubernetes)
HTML Embed
<a href="https://allmcps.com/mcp/flux159-mcp-server-kubernetes"><img src="https://allmcps.com/api/badge/flux159-mcp-server-kubernetes?style=directory" alt="MCP Server Kubernetes on AllMCPs" /></a>