MCP Directory

How to add Kubernetes MCP Server to Cursor

Popular community server wrapping kubectl and Helm for cluster management via natural language. Paste the config into ~/.cursor/mcp.json and restart Cursor.

Last updated June 15, 2026 · 1.4k · stdio · no auth

Cursor config for Kubernetes MCP Server

npx -y mcp-server-kubernetes
{
  "mcpServers": {
    "kubernetes-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-kubernetes"
      ],
      "env": {
        "ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "true"
      }
    }
  }
}

Setup steps

  1. 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the Kubernetes MCP Server config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of Kubernetes MCP Server's tools to confirm it's connected.

Before you start

  • Node.js (it runs via `npx mcp-server-kubernetes`)
  • kubectl installed and on your PATH
  • Helm v3 installed if you want to use the Helm tools (optional)
  • A valid kubeconfig (default ~/.kube/config) with at least one configured context pointing at a reachable cluster (minikube, GKE, EKS, Rancher Desktop, etc.)

What Kubernetes MCP Server can do in Cursor

kubectl_get / kubectl_describe

List/retrieve resources and show detailed resource information.

kubectl_create / kubectl_apply / kubectl_delete

Create resources, apply YAML manifests, and delete resources.

kubectl_logs

Fetch pod logs.

kubectl_patch / kubectl_scale / kubectl_rollout

Update specific fields, scale workloads, and manage deployment rollouts.

kubectl_context

List and switch kubectl contexts.

kubectl_generic

Run an arbitrary kubectl command (disabled in non-destructive mode).

install_helm_chart / upgrade_helm_chart / uninstall_helm_chart

Manage Helm v3 releases.

port_forward / stop_port_forward

Start and stop port-forwarding to pods or services.

Security

It inherits your active kubeconfig context and can modify or delete cluster resources by default; set ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true and point at a non-production context when experimenting. Note CVE-2026-46519: earlier versions only enforced the non-destructive flag at tool discovery, not execution — upgrade to v3.6.0 or later, and always confirm which cluster the current context targets.

Kubernetes MCP Server + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Kubernetes MCP Server config there under the "mcpServers" key and restart the client.

Is Kubernetes MCP Server safe to use with Cursor?

It inherits your active kubeconfig context and can modify or delete cluster resources by default; set ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true and point at a non-production context when experimenting. Note CVE-2026-46519: earlier versions only enforced the non-destructive flag at tool discovery, not execution — upgrade to v3.6.0 or later, and always confirm which cluster the current context targets.

Does it need credentials of its own?

No. It uses your existing kubeconfig and current context, so the agent inherits whatever cluster permissions you already have. There is no separate API key.

How do I stop it from deleting things?

Set ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true. This disables kubectl_delete, uninstall_helm_chart, cleanup_pods, node_management, and kubectl_generic while keeping read, create, and update tools.

Is Helm required?

Only if you want the Helm tools. Core kubectl operations work without Helm; install Helm v3 to enable install/upgrade/uninstall chart tools.

View repo Full Kubernetes MCP Server page