# rohitg00/kubectl-mcp-server [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/rohitg00/kubectl-mcp-server  
**GitHub Stars:** 964  
**npm Downloads (last month):** 772  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/rohitg00-kubectl-mcp-server

## Description
/🏠 - A Model Context Protocol (MCP) server for Kubernetes that enables AI assistants like Claude, Cursor, and others to interact with Kubernetes clusters through natural language.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "kubectl-mcp-server": {
    "command": "npx",
    "args": ["-y","kubectl-mcp-server"]
  }
}
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/rohitg00-kubectl-mcp-server/readme_

