
Kubernetes MCP Server by Flux159: Setup for Claude, Cursor and Other Apps
Lets your assistant run kubectl and Helm for you: look at pods and logs, apply manifests, scale, roll out and delete.
This community server wraps kubectl and Helm so that your assistant can run them on your computer. It uses your kubeconfig, so it can do whatever your kubectl user can do.
By default it can change and delete resources and run commands in pods. Set the read-only variable to keep it to read tools.
Good for
- Developers who want kubectl and Helm from chat
- Platform engineers debugging pods, logs and rollouts
- Teams who want a read-only cluster view for an assistant
- Anyone switching between several clusters
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 mcp-server-kubernetes
Claude Code
- 1
Copy this prompt.
Add the mcp-server-kubernetes server to Claude Code. Run this command: claude mcp add kubernetes -- npx -y mcp-server-kubernetes 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, kubectl installed, A kubeconfig with a working cluster context, Helm 3 (only for Helm tools).
Read-only mode: Set ALLOW_ONLY_READONLY_TOOLS to true in the server environment to keep only read tools. The README documents ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS, which only removes delete, uninstall, exec and generic commands.
Needs kubectl on your PATH and a kubeconfig that already works, so check kubectl get pods first. Helm 3 is only needed for the Helm tools. The server uses your current kubeconfig context and can change contexts. To limit what it can do, add ALLOW_ONLY_READONLY_TOOLS=true (read tools only) or ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true (no delete, uninstall, exec, node drain or generic commands) to the server's environment.
Built from the package data we hold. Not yet tested by us.
Tools
Lists or reads Kubernetes resources
Gets one resource or a list of resources of any kind, like kubectl get. Secret values are masked in the output.
Try: “List the pods in the prod namespace.”
Read ·
kubectl_getDescribes a resource in detail
Shows the detailed state and recent events of a resource, like kubectl describe.
Try: “Describe the checkout deployment.”
Read ·
kubectl_describeReads logs from a pod or workload
Returns container logs, like kubectl logs.
Try: “Show the last logs from the api pod.”
Read ·
kubectl_logsExplains what a resource field means
Looks up the documentation for a resource type or field in your cluster's API.
Try: “Explain the fields of a Deployment spec.”
Read ·
explain_resourceLists the kinds your cluster supports
Returns the API resource types available in the cluster.
Try: “Which resource kinds does this cluster have?”
Read ·
list_api_resourcesSwitches or shows kubectl contexts
Lists contexts or changes the active one, so later calls go to a different cluster.
Try: “Switch to the staging cluster.”
Write ·
kubectl_contextReconnects to the cluster API
Rebuilds the API connection, for example after a cluster upgrade changed addresses.
Try: “Reconnect to the cluster.”
Read ·
kubectl_reconnectChecks the cluster connection
Verifies that the server can reach your cluster.
Try: “Is my cluster reachable?”
Read ·
pingApplies a YAML manifest
Creates or updates resources from a manifest, like kubectl apply.
Try: “Apply this deployment YAML.”
Write ·
kubectl_applyCreates resources
Creates resources, like kubectl create.
Try: “Create a namespace called demo.”
Write ·
kubectl_createEdits fields of a resource
Updates specific fields of an existing resource with a patch.
Try: “Set the image of the api deployment to v2.”
Write ·
kubectl_patchChanges the replica count
Scales a deployment or similar resource up or down.
Try: “Scale checkout to 5 replicas.”
Write ·
kubectl_scaleManages deployment rollouts
Checks status, restarts, pauses, resumes or undoes a rollout.
Try: “Restart the api deployment.”
Write ·
kubectl_rolloutDeletes Kubernetes resources
Deletes any resource, like kubectl delete.
Try: “Delete the old demo namespace.”
Delete ·
kubectl_deleteRuns any kubectl command
Runs a kubectl command you or the assistant write, so it can do anything kubectl can.
Try: “Run kubectl top nodes.”
Delete ·
kubectl_genericRuns a command inside a pod
Runs a command in a container and returns the output. It runs the program directly, without a shell, and is marked destructive.
Try: “Run ls -la /app in the api pod.”
Runs code ·
exec_in_podInstalls a Helm chart
Installs a chart into the cluster with optional values, repository and version.
Try: “Install the nginx chart in the web namespace.”
Write ·
install_helm_chartUpgrades a Helm release
Upgrades an installed release to a new chart version or values.
Try: “Upgrade the nginx release to the latest chart.”
Write ·
upgrade_helm_chartRemoves a Helm release
Uninstalls a release from the cluster.
Try: “Uninstall the nginx release.”
Delete ·
uninstall_helm_chartForwards a pod or service port to your computer
Starts a port forward from a pod or service to a local port.
Try: “Forward port 5432 from the postgres service.”
Write ·
port_forwardStops a port forward
Ends a port forward the server started.
Try: “Stop forwarding the postgres port.”
Write ·
stop_port_forwardCordons, uncordons or drains a node
Marks a node unschedulable or schedulable, or drains it by evicting its pods.
Try: “Drain node-3 for maintenance.”
Delete ·
node_managementCleans up resources the server manages
Removes the resources the server itself manages. The server treats it as destructive and turns it off in non-destructive mode.
Try: “Clean up what the server created.”
Delete ·
cleanup
Read from the source code
Permissions
high risk · 4 things to watch · 12 advisories
High risk
By default it can read, change and delete cluster resources, drain nodes and run commands inside pods, with your kubeconfig's rights. Turn on read-only mode and use a kubeconfig 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 run arbitrary kubectl
Delete, node drain, Helm uninstall, pod exec and a generic kubectl tool are all on by default. Turn on read-only mode, or at least non-destructive mode. github.com
It can switch your kubectl context
A context tool can point later commands at another cluster, such as production. Check the active context before you approve changes. github.com
Optional network mode has no sign-in
The SSE and streamable HTTP modes are named unsafe by the project. Use the default local mode. github.com
Secret masking is limited
Secrets are masked in kubectl get output, but the README says this does not cover logs. github.com
Security advisories
12 known advisories, all fixed in a newer version.
- mcp-server-kubernetes argument injection can expose Kubernetes cluster credentialscritical · Fixed in 3.9.0 · GHSA-wmg3-h8mf-wgvr
- kubectl_patch is missing the remote-transport path guard applied to every sibling tool, allowing server-side arbitrary file read via patchFilehigh · Fixed in 4.1.1 · GHSA-6963-p4fp-2wxw
- Missing DNS Rebinding Protection in SSE Transport Leads to Unauthenticated Remote Cluster Compromisehigh · Fixed in 4.0.8 · GHSA-9j3p-gvw3-h8r8
- Arbitrary Local File Read via kubectl_create --from-filehigh · Fixed in 4.0.2 · GHSA-x4x5-wv5h-jjf8
- Bare-positional flag injection in 14 kubectl/helm tools enables bearer token exfiltrationhigh · Fixed in 3.9.0 · GHSA-jjrr-53h8-h34w
Show all 12Show fewer
- MCP Server Kubernetes: Tool Access Control Bypass via Presentation-Layer Filtering Without Execution-Layer Enforcementhigh · Fixed in 3.6.0 · GHSA-cr22-wjx7-2w6m
- MCP Server Kubernetes has an Argument Injection in port_forward tool via space-splittinghigh · Fixed in 3.5.0 · GHSA-4xqg-gf5c-ghwq
- MCP Server Kubernetes vulnerable to command injection in several toolshigh · Fixed in 2.5.0 · GHSA-gjv4-ghm7-q58q
- Security Advisory: Arbitrary File Read via Unvalidated valuesFile Pathmedium · Fixed in 4.0.5 · GHSA-cmgv-rr9q-f7gw
- Incomplete fix of GHSA-6mx4-4h42-r8vh: kubectl/helm dangerous-flag guard is bypassed by the attached short-flag form -sURL, re-enabling API-server redirect and operator bearer-token exfiltrationmedium · Fixed in 4.0.6 · GHSA-c257-86m4-m579
- MCP Server Kubernetes: kubectl-generic flag injection enables Kubernetes bearer token exfiltrationmedium · Fixed in 3.7.0 · GHSA-6mx4-4h42-r8vh
- mcp-server-kubernetes has potential security issue in exec_in_pod toolmedium · Fixed in 2.9.8 · GHSA-wvxp-jp4w-w8wg
Technical details
| Turning on read-only | Set ALLOW_ONLY_READONLY_TOOLS=true in the server environment. ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true is a milder option that removes only the destructive tools. |
|---|---|
| Talks to | Your Kubernetes API server |
| Sign-in and keys | No separate sign-in. It uses your kubeconfig and the kubectl and Helm programs on your computer. |
| Scopes |
|
Questions
Is the Flux159 Kubernetes MCP server official?
No. It is a community server by Flux159, not from the Kubernetes project. A separate server from the containers organization also exists on this site.
Can I make it read-only?
Yes. Set ALLOW_ONLY_READONLY_TOOLS to true. The README documents only ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS, which keeps apply, create, scale and Helm install but removes delete, uninstall, exec, node management and generic commands.
What do I need to run it?
kubectl on your PATH and a working kubeconfig. Helm 3 is needed only for the Helm tools.
Does it need an API key?
No. It uses your kubeconfig, so it has the same access as your kubectl.
Does it run locally?
Yes. It runs on your computer and talks to your cluster through kubectl. Network modes exist but the project names them unsafe.
Does it work with several clusters?
Yes. It reads your kubeconfig contexts and has a tool to switch between them.
Is the tool list complete?
It lists the 23 tools registered in version 4.2.1. The README also mentions template-based Helm commands that are not in the registered list.
Information
updated Nov 2, 2026
- Publisher
- Community
- Package
mcp-server-kubernetes- Registry
- npm
- Transport
- stdio
- Version
- 4.2.1
- License
- MIT
- Last commit
- Oct 26, 2026
- Open issues
- 9
- Listed in
- Docker MCP Catalog
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 3Hide
- index.ts · github.com
- README.md · github.com
- mcp-server-kubernetes · npmjs.com