
Kubectl MCP Server by rohitg00: Setup for Claude, Cursor and Other Apps
Lets Claude, Cursor and other assistants inspect and change your Kubernetes clusters and Helm releases, using your own kubeconfig.
Kubectl MCP Server runs on your computer and uses the kubectl and Helm tools and the clusters in your kubeconfig. It starts with 26 tools for reading, changing and deleting cluster resources and Helm releases. About 180 more are opt-in groups for areas such as cost, security audits and Argo CD.
It is a community project by rohitg00, not made by the Kubernetes project. Add the read-only flag if you only want the assistant to look. Without it, the assistant can delete resources and run commands inside your pods.
Good for
- DevOps engineers who debug crashing pods and failed rollouts by chat
- Developers who want to read logs and deploy to a dev cluster without remembering kubectl flags
- Platform teams who need a read-only view of production for an assistant
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install Kubectl MCP
Claude Code
- 1
Copy this prompt.
Add the Kubectl MCP server to Claude Code. Run this command: claude mcp add kubectl -- npx -y kubectl-mcp-server Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js, Python 3.10+, kubectl, Helm.
Read-only mode: Add --read-only to the server arguments (after kubectl-mcp-server).
The npx command starts a Python program, so Python 3.10 or newer and kubectl must be on your PATH (Helm for the Helm tools). Add --read-only to the args to hide every tool that changes the cluster.
Built from the package data we hold. Not yet tested by us.
Tools
Lists Kubernetes resources of any kind
Reads resources such as pods, deployments, services or custom resources, in one namespace or all of them. It returns what kubectl get would show.
Try: “Show all pods in the kube-system namespace.”
Read ·
kubectl_getShows the full details and events of one resource
Pulls the detailed description of a single resource, including its recent events. Useful when you need to know why something is not starting.
Try: “Describe the nginx deployment in the default namespace.”
Read ·
kubectl_describeReads container logs from a pod
Fetches the log output of a pod or one of its containers. You can ask for the earlier run of a restarted container.
Try: “Show the last logs from the payments pod.”
Read ·
kubectl_logsShows CPU and memory use of pods and nodes
Reports live resource use for pods or nodes. It needs the metrics server running in the cluster.
Try: “Which pods use the most memory right now?”
Read ·
kubectl_topExplains what a resource field means
Looks up the built-in API documentation for a resource type or field, so the assistant can write a correct manifest.
Try: “Explain the fields of a Deployment's rollout strategy.”
Read ·
kubectl_explainLists the resource types your cluster supports
Returns every API resource type the cluster knows about, including those added by custom resource definitions.
Try: “What resource types does this cluster support?”
Read ·
get_api_resourcesRuns any read-only kubectl command
Runs a kubectl command the other tools do not cover. The README says it only allows read verbs and blocks credential, connection and raw-output flags.
Try: “Run kubectl auth can-i list secrets in the staging namespace.”
Runs code ·
kubectl_genericApplies a YAML manifest to the cluster
Creates or updates resources from a manifest you or the assistant provide. This changes your live cluster.
Try: “Apply this deployment manifest to the staging namespace.”
Write ·
kubectl_applyEdits fields of an existing resource
Changes part of a resource with a strategic, merge or JSON patch, without sending the whole manifest.
Try: “Patch the api deployment to use image tag 1.4.2.”
Write ·
kubectl_patchDeletes a resource from the cluster
Removes a named resource such as a pod, deployment or config map. The deletion happens in the live cluster.
Try: “Delete the stuck test-runner pod in the ci namespace.”
Delete ·
delete_resourceChanges the replica count of a workload
Scales a deployment, stateful set or similar workload up or down. Scaling to zero stops all its pods.
Try: “Scale the frontend deployment to 5 replicas.”
Write ·
kubectl_scaleRestarts, pauses or rolls back a workload
Runs rollout actions on a workload: restart, status, history, undo, pause and resume.
Try: “Restart the checkout deployment and tell me when it is ready.”
Write ·
kubectl_rolloutRuns a command inside a running pod
Executes any command you give it inside a pod's container, with a 60 second limit, and returns the output. It can run arbitrary commands in your cluster.
Try: “Run 'ls /app' inside the api-7d9 pod.”
Runs code ·
exec_in_podLists the clusters in your kubeconfig
Shows the Kubernetes contexts in your kubeconfig and which one is active.
Try: “Which clusters can you reach?”
Files ·
list_contextsChecks that the cluster is reachable and healthy
Runs a quick health check against the chosen cluster context.
Try: “Is the production cluster healthy?”
Read ·
health_checkWorks out why a pod keeps crashing
Collects the pod's status, events and logs and returns an analysis of the likely cause.
Try: “Why is the nginx-deployment pod crashing?”
Read ·
diagnose_pod_crashFinds pods stuck in Pending and says why
Looks for pods that are not scheduled and reports the reasons the cluster gives, such as missing resources or taints.
Try: “Which pods are stuck pending, and why?”
Read ·
detect_pending_podsReports which operators and CLIs are installed
Detects add-ons such as Flux, Argo CD, cert-manager, Kyverno and Istio plus local command-line tools, and says which optional toolsets would cover them.
Try: “What Kubernetes add-ons are installed on this cluster?”
Read ·
detect_ecosystemLists Helm releases
Shows the Helm releases installed in a namespace or across the cluster.
Try: “List all Helm releases in the monitoring namespace.”
Read ·
helm_listShows the status of one Helm release
Reports whether a release is deployed, failed or pending, with its last update.
Try: “What is the status of the grafana release?”
Read ·
helm_statusReads the values or manifest of a release
Fetches stored information about a release, such as the values it was installed with.
Try: “Show the values used for the prometheus release.”
Read ·
helm_getShows the revision history of a release
Lists the past revisions of a release so you can see what changed and when.
Try: “Show the revision history of the api release.”
Read ·
helm_historyInstalls a Helm chart as a new release
Installs a chart into a namespace with the values you give. This adds new resources to the cluster.
Try: “Install the bitnami redis chart in the cache namespace with 3 replicas.”
Write ·
install_helm_chartUpgrades an existing Helm release
Moves a release to a newer chart or new values. The tool is marked destructive in its annotations.
Try: “Upgrade the grafana release to the latest chart.”
Write ·
upgrade_helm_chartRemoves a Helm release and its resources
Uninstalls a release, which removes the resources the chart created.
Try: “Uninstall the old-staging release from the staging namespace.”
Delete ·
uninstall_helm_chartRolls a release back to an earlier revision
Reverts a Helm release to a previous revision, replacing what is running now.
Try: “Roll the checkout release back to revision 4.”
Write ·
helm_rollback
Read from the source code
Permissions
high risk · 5 things to watch · 1 advisory
High risk
With its default tools the assistant can read, change and delete things in every cluster in your kubeconfig, including running commands inside pods. Start the server with the read-only flag unless you want it to make changes, and point it at a context with limited rights.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only modeHow to turn it on
Watch out for
It can delete resources and uninstall releases
delete_resource and uninstall_helm_chart act on the live cluster. Start the server with --read-only, or use a kubeconfig context that only has the rights you want to give the assistant. github.com
exec_in_pod runs any command in your pods
The assistant can run arbitrary commands inside any container it can reach. Read-only mode removes this tool. github.com
It acts with your full kubeconfig access
The server uses whichever context is active and can switch between your clusters if the multicluster toolset is on. Check the active context before you ask for changes. github.com
Opt-in toolsets add up to 209 tools
Only the core and helm toolsets are on by default. Extra toolsets such as backup, kind and rollouts add more delete and write tools, so turn on only the ones you need. github.com
Secrets are redacted in results
The README says Secret data, tokens and JWTs are replaced with [REDACTED] in tool output. HTTP mode binds to 127.0.0.1 by default. github.com
Technical details
| Turning on read-only | Start the server with --read-only (or set MCP_SAFETY_MODE=read-only). Every tool whose readOnlyHint is false is hidden and rejected. --disable-destructive blocks deletes but allows create and update. |
|---|---|
| Talks to | Your Kubernetes cluster API, and Helm chart repositories when you install or upgrade a chart |
| Sign-in and keys | No account or API key. It uses the clusters and credentials already in your kubeconfig. |
Questions
Is the kubectl MCP server official?
No. It is a community project by rohitg00 (MIT license), not made by the Kubernetes project or the CNCF.
Can I run it read-only?
Yes. Start it with the read-only flag and every tool that changes state is hidden and blocked. A separate flag allows creates and updates but blocks deletes.
Does it need an API key?
No. It uses the clusters and sign-in details already in your kubeconfig, and needs kubectl and Helm on your machine.
Does it run locally or in the cloud?
Locally. The npx command starts a Python program on your computer that talks to your cluster. The project also documents an HTTP mode and a Helm chart for running it inside a cluster.
How many tools does it have?
26 are on by default. The README says 209 exist when every optional group is turned on, and the list here shows only the default 26.
Is the older version affected by a security flaw?
Yes. Versions before 1.2.0 have a critical code-execution advisory (CVE-2025-65719). The current release is not listed as affected, so update if you installed it a while ago.
How do I add it to Claude Code or Cursor?
Use the matching tab in the install box above. Restart the app afterwards so it loads the tools.
Information
updated Nov 2, 2026
- Publisher
- Community
- Package
kubectl-mcp-server- Registry
- npm
- Transport
- stdio
- Auth
- None
- License
- MIT
- Last commit
- Oct 22, 2026
- Open issues
- 8
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 4Hide
- README · github.com
- Toolset registry (v2.0.0) · github.com
- GHSA-94gr-w3q5-rfqr · osv.dev
- mcp_server.py · github.com