PlugWiki
Kubectl MCP Server logo

Kubectl MCP Server by rohitg00: Setup for Claude, Cursor and Other Apps

CommunityLocal
Getnpmkubectl-mcp-serverrohitg00/kubectl-mcp-serverDocs

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.

Install Kubectl MCP

Claude Code

  1. 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. 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_get

  • Shows 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_describe

  • Reads 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_logs

  • Shows 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_top

  • Explains 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_explain

  • Lists 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_resources

  • Runs 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_generic

  • Applies 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_apply

  • Edits 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_patch

  • Deletes 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_resource

  • Changes 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_scale

  • Restarts, 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_rollout

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

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

Security advisories

Technical details
Turning on read-onlyStart 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 toYour Kubernetes cluster API, and Helm chart repositories when you install or upgrade a chart
Sign-in and keysNo 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

WebsiteDocsGitHubDockerDocker MCP CatalogChangelogIssues

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 4
  1. README · github.com
  2. Toolset registry (v2.0.0) · github.com
  3. GHSA-94gr-w3q5-rfqr · osv.dev
  4. mcp_server.py · github.com

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 2, 2026.