Kubernetes MCP Server
Lets your AI agent manage Kubernetes and OpenShift: list, read and change resources, view pod logs and use Helm.
2.2k stars on GitHubby Containers (containers organization)License Apache-2.0Updated 18 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add kubernetes -- npx -y kubernetes-mcp-server
Ready! Now test it
Restart the app and paste one of these requests in the chat:
List all pods in the production namespace and show which are not running.
Show the logs for the checkout pod.
What it is
This server connects your agent directly to the Kubernetes API, without needing kubectl or helm installed. It can work with any resource, pods, namespaces, events, Helm releases and Tekton pipelines. It supports several clusters from your kubeconfig.
What it can do
- Generic create, get, list and delete for any resource
- Pods: list, get, delete, logs, top, exec and run
- Namespaces and events
- Helm: install, list and uninstall releases
- Tekton pipelines and tasks
- OpenShift projects
- Optional OpenTelemetry tracing
When to use
- βΊWhen a deployment is failing and you want the agent to look at pods, events and logs.
- βΊWhen you want to install or check a Helm release.
- βΊWhen you work with more than one cluster.
What you need
npx kubernetes-mcp-server@latest, uvx, or a native binary.Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
kubernetes-specialistHelps your agent write Kubernetes manifests, Helm charts, and security rules, and debug pods that crash or use too many resources.kubernetesHelps your agent deploy and debug Kubernetes workloads with kubectl, covering pods, deployments, logs and resource limits.installHelps your agent install Kubeshark on a Kubernetes cluster, from a quick command-line setup to a full Helm configuration.Frequently asked questions
Do I need kubectl installed?
No. It is a native Go implementation that talks to the Kubernetes API directly.
Can I make it read-only?
Yes, with read_only = true in the TOML config. The readme says Kubernetes RBAC is the real access control to rely on.
Does it work on Windows?
Yes. It is distributed as a native binary for Linux, macOS and Windows, plus npm, Python and container versions.
Can I limit which tools are loaded?
Yes, with the toolsets option, for example core, config, helm and kubevirt.
Can it block access to Secrets?
The example config shows a denied_resources entry for Secret. The readme calls it a best-effort guardrail.
Does it support several clusters?
Yes, those defined in your kubeconfig files.
If it does not work
- βΊCheck that your kubeconfig works by running a basic query against your cluster first.
- βΊIf using npx or uvx, make sure Node.js or uv is installed.
- βΊUse a dedicated read-only ServiceAccount for safer setups, as the Kubernetes setup guide suggests.
5 new skills a week. 1 minute to read.