
mcp-server-kubernetes
MCP server letting AI assistants run kubectl, Helm and pod operations on a cluster
The repository was last updated 13 days ago and is published under MIT.
mcp-server-kubernetes is an open-source MCP server for developer tools. It is available on CLI, macOS, Linux, Windows, VS Code and Self-hosted.
- Pricing
- Open source
- Platforms
- CLI, macOS, Linux
- What it can do
- Can delete data (3 tools)
- GitHub stars
- 1.6K
- Last commit
- Language
- TypeScript
Similar MCP servers
About mcp-server-kubernetes
Gives AI clients such as Claude Code, Cursor and VS Code a bridge into an existing Kubernetes cluster. It reads kubeconfig from the standard location and from other configured sources, then exposes cluster operations as MCP tools that the assistant can call during a conversation.
Beyond the core kubectl verbs, the server covers Helm installs and upgrades, port forwarding to pods and services, node cordon, drain and uncordon, and cleanup of pods stuck in failure states. A non-destructive mode disables deletes and arbitrary commands, and a read-only mode limits the assistant to inspection tools. Secret values are masked in get output.
It suits platform and DevOps engineers who want an assistant to inspect workloads, debug failing pods and make routine changes. Optional OpenTelemetry tracing can export tool-call spans to an OTLP backend.
Tools this server provides (25)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 3 of 25 tools delete data and 4 change data; 14 names don't say.
From the server's own tool labels and tool names; not verified by us.
- kubectl_getName suggests: reads
- Get or list Kubernetes resources.
- kubectl_describeName suggests: reads
- Describe Kubernetes resources.
- kubectl_createName suggests: changes
- Create Kubernetes resources.
- kubectl_apply
- Apply YAML manifests.
- kubectl_deleteName suggests: deletes
- Delete Kubernetes resources.
- kubectl_logs
- Get logs from resources.
- kubectl_context
- Manage kubectl contexts.
- explain_resourceName suggests: reads
- Explain Kubernetes resource schemas.
- list_api_resourcesName suggests: reads
- List API resources.
- kubectl_scale
- Scale resources.
- kubectl_patchName suggests: changes
- Update fields of a resource.
- kubectl_rollout
- Manage deployment rollouts.
- kubectl_generic
- Execute any kubectl command.
- ping
- Verify connection to the cluster.
- port_forward
- Port forward to pods and services.
- stop_port_forwardName suggests: changes
- Stop an active port forward.
- helm_template_apply
- Install a Helm chart via template apply.
- helm_template_uninstallName suggests: deletes
- Uninstall a Helm chart via template.
- install_helm_chart
- Install a Helm chart.
- upgrade_helm_chart
- Upgrade a Helm chart.
- uninstall_helm_chartName suggests: deletes
- Uninstall a Helm chart.
- cleanup_pods
- Clean up problematic pods.
- node_management
- Cordon, drain and uncordon nodes.
- exec_in_podName suggests: changes
- Run a command inside a pod.
- cleanup
- Clean up managed resources.
What it does
- Unified kubectl tools
- Get, describe, apply, create, patch, scale and roll out resources through named MCP tools.
- Helm chart operations
- Install, upgrade and uninstall charts with custom values, repositories and versions.
- Port forwarding
- Open port forwards to pods and services so local tools can reach cluster workloads.
- Pod cleanup and node management
- Clear pods in states such as Evicted or CrashLoopBackOff and cordon, drain or uncordon nodes.
- Non-destructive and read-only modes
- Environment flags block deletes and arbitrary commands, or restrict the server to read-only tools.
- Secret masking and tracing
- Masks secret values in get output and can export tool-call traces via OpenTelemetry.
Good for
- Asking an assistant to list failing pods and explain why they crash
- Scaling or rolling back a deployment from within a chat session
- Installing or upgrading a Helm chart without leaving the editor
- Giving an assistant read-only cluster access for auditing
- Draining a node before maintenance with a guided command
Pricing
Open source
Free and open source under MIT; installed locally via npx.
Prices change. Check npmjs.com before you buy.
More servers for the same service
mcp-server-kubernetes FAQ
Which MCP clients can use mcp-server-kubernetes?
The README gives setup steps for Claude Code, Codex CLI, Claude Desktop, VS Code, Cursor and Muse Code, plus the mcp-chat client.
Does mcp-server-kubernetes need kubectl installed?
Yes. kubectl must be on the PATH and a working kubeconfig must be present; Helm v3 is needed only for Helm operations.
Can I stop the assistant from deleting resources?
Setting ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true disables delete and similar tools, and ALLOW_ONLY_READONLY_TOOLS=true limits it to read-only tools.
What license is mcp-server-kubernetes released under?
The project is released under the MIT license.
Is mcp-server-kubernetes free?
Yes. mcp-server-kubernetes is open source, so you can use and self-host it for free.
What are the best alternatives to mcp-server-kubernetes?
The closest alternatives to mcp-server-kubernetes are k8s-mcp-server, kubectl-mcp-server, mcp-k8s, Helm MCP and Kubernetes MCP Server.
Where this comes from
- Description: written from the project's README.


