Data as of

Kubernetes MCP Server for Claude Code: Setup & Config

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

What you can do with Kubernetes in Claude Code

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

  • Manage Helm releases through selected toolsets.
  • Start or restart Tekton pipeline and task executions.
  • Work across kubeconfig-defined clusters from one MCP connection.

Before you start: Kubernetes in Claude 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 Claude Code configuration

  1. Choose Claude Code configuration scope

    For Kubernetes MCP Server, open Project scope: .mcp.json at the repository root. Project JSON: merge into mcpServers; user scope: use the CLI.

  2. Add Kubernetes MCP Server to Claude Code

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

  3. Check Kubernetes MCP Server in Claude Code

    Kubernetes MCP Server: Inspect claude mcp list and /mcp status.

Config file · Project scope: .mcp.json at the repository root

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

CLI (POSIX shell)
claude mcp add-json --scope project 'kubernetes-mcp-server' '{"type":"stdio","command":"npx","args":["-y","kubernetes-mcp-server@latest"],"env":{}}'

Troubleshooting Kubernetes in Claude Code

  • If Kubernetes MCP Server fails to start, check npx kubernetes-mcp-server@latest (Node.js/npm), the working directory, and Claude Code's selected scope; inspect claude mcp list and /mcp.
  • Kubernetes MCP Server uses stdio here: Claude 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 Claude Code troubleshooting lives in the /clients/claude-code guide.

Kubernetes MCP Server — details. Claude Code guide

Frequently asked questions

Register Kubernetes MCP Server with the displayed claude mcp add-json --scope project command, or merge the JSON into .mcp.json at the repository root.

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

Kubernetes MCP Server's Claude 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.

Setting a port enables streamable HTTP at /mcp and SSE at /sse.