Data as of

MCP Server Kubernetes for VS Code: Setup & Config

MCP Server Kubernetes lets VS Code inspect and manage clusters through kubectl-oriented tools.

What you can do with MCP Server Kubernetes in VS Code

An existing-context Kubernetes bridge spanning diagnostics, resource changes, Helm, and tracing.

  • Inspect pods and logs while diagnosing workload failures.
  • Install or upgrade Helm releases with custom values.

Before you start: MCP Server Kubernetes in VS Code

  • Node.js and npx
  • kubectl on PATH
  • A valid kubeconfig with cluster access
  • Helm v3 on PATH for Helm operations

Loads the standard kubeconfig and current kubectl context by default. Set ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS to true to disable designated destructive operations; this still permits creation and updates. Telemetry is optional and off by default.

MCP Server Kubernetes VS Code configuration

  1. Choose VS Code configuration scope

    For MCP Server Kubernetes, open Workspace: .vscode/mcp.json. Merge into servers; preserve existing inputs.

  2. Add MCP Server Kubernetes to VS Code

    Use the mcp-server-kubernetes entry below in servers. Keep MCP Server Kubernetes's documented stdio connection fields and your other VS Code entries.

  3. Check MCP Server Kubernetes in VS Code

    MCP Server Kubernetes: Start in VS Code’s MCP controls; inspect output and trust prompts.

Config file · Workspace: .vscode/mcp.json

JSON
{
  "servers": {
    "mcp-server-kubernetes": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "mcp-server-kubernetes"
      ],
      "env": {}
    }
  }
}

MCP Server Kubernetes tools available to VS Code

MCP Server Kubernetes's stored tool list documents 26 tools; compare it with VS Code's connected tool list, because the stored list is not a live check.

cleanup

Look for cleanup among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Remove resources managed by the server.

kubectl_get

Look for kubectl_get among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Retrieve Kubernetes objects by type, name, and optional namespace.

kubectl_describe

Look for kubectl_describe among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Inspect detailed information about selected Kubernetes objects.

kubectl_apply

Look for kubectl_apply among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Apply a YAML manifest supplied as text or a file.

kubectl_delete

Look for kubectl_delete among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Delete resources selected by name, labels, type, or manifest.

kubectl_create

Look for kubectl_create among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Create resources from files or supported creation subcommands.

kubectl_logs

Look for kubectl_logs among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Read logs from workloads such as pods, deployments, and jobs.

kubectl_scale

Look for kubectl_scale among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

kubectl_patch

Look for kubectl_patch among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

kubectl_rollout

Look for kubectl_rollout among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

kubectl_context

Look for kubectl_context among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

kubectl_reconnect

Look for kubectl_reconnect among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

explain_resource

Look for explain_resource among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

install_helm_chart

Look for install_helm_chart among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Install a Helm chart using standard or template-based methods.

upgrade_helm_chart

Look for upgrade_helm_chart among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Update an existing Helm release.

uninstall_helm_chart

Look for uninstall_helm_chart among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Remove a Helm release.

node_management

Look for node_management among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Cordon, drain, or uncordon cluster nodes.

port_forward

Look for port_forward among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Expose a resource port through a local forwarded port.

stop_port_forward

Look for stop_port_forward among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

Terminate an active port-forwarding process.

exec_in_pod

Look for exec_in_pod among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

list_api_resources

Look for list_api_resources among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

kubectl_generic

Look for kubectl_generic among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

ping

Look for ping among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

cleanup_pods

Look for cleanup_pods among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

helm_template_apply

Look for helm_template_apply among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

helm_template_uninstall

Look for helm_template_uninstall among VS Code's agent-mode tools after starting MCP Server Kubernetes through the MCP controls.

MCP Server Kubernetes: full stored tool descriptions

Troubleshooting MCP Server Kubernetes in VS Code

  • Make npx mcp-server-kubernetes (Node.js/npm) available in the workspace, container, or remote environment hosting MCP Server Kubernetes. Start through VS Code's MCP controls; inspect output and trust prompts.
  • MCP Server Kubernetes uses stdio here: VS Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Requires working cluster credentials and local kubectl.
  • Known limitation: Non-destructive mode still allows resource changes.
  • Known limitation: Secret masking does not cover log output.
  • General VS Code troubleshooting lives in the /clients/vscode guide.

MCP Server Kubernetes — details. VS Code guide

Frequently asked questions

For MCP Server Kubernetes, edit workspace .vscode/mcp.json. VS Code requires servers rather than mcpServers; preserve the displayed type on each entry.

VS Code's mcp-server-kubernetes example uses stdio.

MCP Server Kubernetes's VS Code configuration invokes npx mcp-server-kubernetes (Node.js/npm).

MCP Server Kubernetes's stored list contains 26 tools, including cleanup, kubectl_get, kubectl_describe. Compare those names with VS Code's connected tool list; the stored list is not a live check.

Yes. kubectl must be installed and configured with a valid kubeconfig and working cluster credentials.

Only if Helm operations are needed. The README specifies Helm v3 on PATH for those tools.