Kubernetes MCP
MCP Server Kubernetes
MCP server for managing a Kubernetes cluster through kubectl and Helm, with a non-destructive mode
- 1,610 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- Acts with the permissions of the current kubectl context
- Can delete resources, drain nodes and run arbitrary kubectl commands
- Logs may contain sensitive data
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/mcp-server-kubernetesDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- Acts with the permissions of the current kubectl context
- Can delete resources, drain nodes and run arbitrary kubectl commands
- Logs may contain sensitive data
This is third-party code. Review the repository files before installing.
What it does
The server connects to the cluster using the current kubeconfig and gives the agent a unified kubectl toolset: get, describe, apply, create, patch, scale, rollout, logs, delete and context management. It supports installing and uninstalling Helm charts, port forwarding, cleaning up broken pods and cordoning or draining nodes. The k8s-diagnose prompt walks the agent through step-by-step pod troubleshooting. Secrets are masked in kubectl get secrets output, and OpenTelemetry tracing is opt-in.
Who it is for. DevOps engineers and developers working with Kubernetes who want to troubleshoot clusters with an agent.
Good fit when
- You need to find out why a pod is in CrashLoopBackOff
- You want a manifest applied or a Helm chart upgraded from a description
- You need a quick look at logs and resources across namespaces
- You want the agent to read and update the cluster but not delete anything
Not a fit when
- A production cluster without restricted permissions or non-destructive mode
- You need to add clusters to kubectx: that is not planned
Example request
Find out why the payments pods in the prod namespace keep restarting and suggest a fixMCP
- Transport
- stdio, sse
- Authentication
- not required
Environment variables
ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS- Disables deletion and other destructive operations
ENABLE_TELEMETRY- Enables OpenTelemetry tracing
OTEL_EXPORTER_OTLP_ENDPOINT- OTLP collector endpoint for traces
Limitations
Requires kubectl and a working kubeconfig, plus Helm v3 for Helm operations. The server acts with the permissions of the current kubectl context. Secret masking does not apply to logs. ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS disables deletion, pod cleanup, node management and kubectl_generic.
How to disable. Remove it with claude mcp remove kubernetes or delete the kubernetes block from your MCP config. To restrict actions, set ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true.
FAQ
Where does the server get cluster access?
From ~/.kube/config by default. Other options, including environment variables and custom paths, are in ADVANCED_README.md.
What stays available in non-destructive mode?
Reads, apply, create, scale, patch, rollout, Helm install and upgrade, port forwarding and context management.
How is Kubernetes MCP different from running kubectl by hand?
The server uses your current kubeconfig and gives the agent one set of kubectl tools: get, describe, apply, create, patch, scale, rollout, logs, delete, context management and Helm. A mode without destructive operations is available.
How do I connect Kubernetes MCP to a cluster?
In Claude Code: claude mcp add kubernetes -- npx mcp-server-kubernetes. The server takes access from your kubeconfig. Turn on the mode without destructive operations so the agent cannot delete resources. Risk is high.
Discussion
No questions or reviews yet.
Related
MCP serversA Go MCP server for Kubernetes and OpenShift: resources, pods, logs, Helm and Tekton straight through the cluster API
MCP server for Kubernetes: the agent reads cluster state, diagnoses pod failures and runs operations through kubectl
A Go MCP server for Kubernetes: read any cluster resource and pod logs, with apply and exec in write mode
An open-source Kubernetes UI with a built-in MCP server: the agent inspects the cluster, diagnoses breakages and operates it with RBAC in mind
A CLI and Kubernetes controller for developing, building and deploying MCP servers. For platform teams, written in Go
An MCP server and skills on top of Kubernetes network observability: an agent investigates incidents and queries cluster traffic through an eBPF-built index
README in short
MCP Server Kubernetes connects to and manages a cluster, loading kubeconfig from several sources in priority order. The README covers installation in Claude Code, Codex, Claude Desktop, VS Code and Cursor, plus an mcpb extension for Claude Desktop. It lists kubectl and Helm tools, the diagnostics prompt, non-destructive mode and OpenTelemetry integration. A request flow diagram shows stdio and SSE transports.