Data as of

Kubernetes MCP Server for VS Code: Setup & Config

VS Code: Give MCP assistants direct Kubernetes and OpenShift API access.

What you can do with Kubernetes in VS Code

Choose it for direct Kubernetes API access with native distribution and configurable operational limits.

  • Inspect Kubernetes and OpenShift resources in read-only mode.
  • Manage Helm releases through selected toolsets.
  • Start or restart Tekton pipeline and task executions.

Before you start: Kubernetes in VS Code

  • Access to a Kubernetes cluster
  • Usable kubeconfig or in-cluster credentials
  • Node.js and npm for this npx option
  • An MCP-compatible client

This is the documented Claude Desktop and Cursor launch, without the help-only flag from the input hint. Native binaries do not require Node.js or Python. Review read-only mode, toolsets, and resource restrictions before granting production access.

Kubernetes VS Code configuration

  1. Choose VS Code configuration scope

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

  2. Add Kubernetes MCP Server to VS Code

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

  3. Check Kubernetes MCP Server in VS Code

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

Config file · Workspace: .vscode/mcp.json

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

Troubleshooting Kubernetes in VS Code

  • Make npx kubernetes-mcp-server@latest (Node.js/npm) available in the workspace, container, or remote environment hosting Kubernetes MCP Server. Start through VS Code's MCP controls; inspect output and trust prompts.
  • Kubernetes MCP Server uses stdio here: VS Code must keep the configured process running; protocol output belongs on stdout and diagnostics on stderr.
  • Known limitation: Requires access credentials for a Kubernetes cluster.
  • Known limitation: Write-capable operations need deliberate restrictions for production use.
  • Known limitation: Exact tool identifiers are not stated in the supplied README excerpt.
  • General VS Code troubleshooting lives in the /clients/vscode guide.

Kubernetes MCP Server — details. VS Code guide

Frequently asked questions

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

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

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

No. The README says the native implementation communicates directly with the API rather than wrapping those commands.

Yes. Multi-cluster support uses configured clusters, and it can be disabled to retain only the current context.