Kubectl MCP Server logo

Kubectl MCP Server

by rohitg00

Manage Kubernetes clusters through natural-language AI interactions, with diagnostics, deployments, security audits, and Helm support.

Install Kubectl MCP Server

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": {
    "rohitg00-kubectl-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kubectl-mcp-server"
      ]
    }
  }
}

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

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

rohitg00/kubectl-mcp-server connects AI assistants to Kubernetes clusters through MCP and kubectl. It supports natural-language workflows for troubleshooting pods, deploying applications, analyzing resource use, diagnosing service connectivity, auditing security, and managing Helm charts. Reach for it when an assistant needs cluster visibility or operational actions instead of only generating kubectl commands.

Use cases

  • Diagnose crashed Kubernetes pods
  • Deploy applications with replicas and health checks
  • Analyze resource waste and potential cost savings
  • Trace service connectivity to database workloads
  • Audit RBAC, secrets, and pod security

Key features

  • Natural-language Kubernetes operations
  • Pod logs, events, and resource diagnostics
  • Application deployment and Helm management
  • Cost and resource-use analysis
  • Network connectivity tracing
  • Security and RBAC auditing

Security & health

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

ActiveLast checked 1d ago

Recent health check succeeded.

19/23 checks healthy over the last 78d

Supply-chain signal

1 high-severity advisory 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 1High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · kubectl-mcp-server (npm)

Adoption & maintenance

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

GitHub stars964Stargazers on the source repository.
npm downloads772Package downloads in the last 30 days.
Last commit5d agoMost recent push to the default branch.
Directory activity5 viewsConfig copies, upvotes, and views on AllMCPs.

How Kubectl MCP Server works

What rohitg00/kubectl-mcp-server does

rohitg00/kubectl-mcp-server exposes Kubernetes operations to MCP-compatible AI assistants. It lets an assistant inspect and manage cluster resources through conversational requests, using the local kubectl configuration and access to a Kubernetes cluster.

Typical workflows include investigating crashed pods with logs, events, and resource information; creating application deployments; reviewing resource waste and potential savings; tracing connectivity from ingress through services to pods; and checking RBAC permissions, secrets, and pod security settings. Helm chart management is also included among the supported infrastructure workflows.

The server advertises 26 default tools, expanding to 209 when all toolsets are enabled. It also provides 14 workflow prompts, eight resources, and six resource templates.

How it works

The server communicates through MCP and can run with stdio transport or stateless HTTP. In a local setup, it uses kubectl and the current Kubernetes credentials to reach the target cluster. The CLI can report server information, list available tools, and invoke a tool directly; an example calls kubectl_get for pods in the kube-system namespace.

Stateless HTTP is intended for deployments behind load balancers. When the container listens beyond localhost, startup requires OAuth or an explicit unauthenticated-mode setting. The project also describes in-cluster deployment, multi-cluster support, OAuth 2.1 authentication, per-tool scopes, read-only mode, and secret redaction.

Setup and configuration

Prerequisites are Python 3.10 or newer or uv for Python-based installation, Node.js 18 or newer for npx, kubectl, and access to a Kubernetes cluster.

Install with one of these approaches:

  • Run with npx -y kubectl-mcp-server.
  • Install globally with npm install -g kubectl-mcp-server.
  • Install from PyPI with pip install kubectl-mcp-server.
  • Run an isolated Python installation with uvx --from kubectl-mcp-server kubectl-mcp.
  • Pull the Docker image from Docker Hub or GitHub Container Registry.

For Docker stdio use, mount the kubeconfig directory read-only at /home/mcp/.kube. The HTTP container example publishes port 8000 on localhost and sets MCP_ALLOW_UNAUTHENTICATED=true; HTTP deployments exposed more broadly need the documented authentication or binding configuration.

Before connecting an assistant, verify access with kubectl cluster-info. The commands kubectl-mcp-server info and kubectl-mcp-server tools can then check the server and enumerate its tools.

Tools and capabilities

  • Kubernetes resource inspection and management through conversational requests
  • Pod crash diagnosis using logs, events, and resource analysis
  • Application deployment with replicas, services, persistent storage, and health checks
  • Cost and resource-use analysis with recommendations
  • Network and service connectivity diagnosis, including DNS resolution and service-chain tracing
  • RBAC, secret, and pod-security auditing
  • Helm chart management
  • MCP resources, resource templates, workflow prompts, and optional expanded toolsets

Limitations and notes

The server requires kubectl to be installed and configured, plus access to a Kubernetes cluster. Actions depend on the permissions available to the configured Kubernetes identity. HTTP containers listening on non-local interfaces require OAuth or an explicit unauthenticated setting, and the Docker image runs as UID 10001 with /home/mcp as its home directory.

Reviews

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

Frequently Asked Questions about Kubectl MCP Server

rohitg00/kubectl-mcp-server is an MCP server that connects AI assistants to Kubernetes clusters through kubectl. Its main tools support resource inspection and management, pod diagnosis, deployments, cost analysis, connectivity troubleshooting, security auditing, and Helm workflows through natural-language requests.

Install it with npx, pip, uvx, or Docker. Use `npx -y kubectl-mcp-server`, `pip install kubectl-mcp-server`, or `uvx --from kubectl-mcp-server kubectl-mcp`; Docker images are available from Docker Hub and GitHub Container Registry.

It requires kubectl, a configured Kubernetes context, and access to a Kubernetes cluster. Python 3.10+ or uv is needed for Python installation, while Node.js 18+ is needed for npx installation.

Yes, the project includes setup and live-demo references for Claude Desktop, Cursor, and Windsurf. These assistants can connect to the MCP server and issue natural-language requests for supported Kubernetes workflows.

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 PreviewKubectl MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/rohitg00-kubectl-mcp-server?style=directory)](https://allmcps.com/mcp/rohitg00-kubectl-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/rohitg00-kubectl-mcp-server"><img src="https://allmcps.com/api/badge/rohitg00-kubectl-mcp-server?style=directory" alt="Kubectl MCP Server on AllMCPs" /></a>