Kubernetes MCP

Talks to the Kubernetes API directly instead of shelling out to kubectl, so an agent can list contexts, read pod logs, and apply manifests without parsing command output.

Official Go stdio

What it does

Talks to the Kubernetes API directly instead of shelling out to kubectl, so an agent can list contexts, read pod logs, and apply manifests without parsing command output. Handles multi-cluster configuration. The blast radius is your cluster, so point it at a scratch namespace first.

Install

Terminal
npx -y kubernetes-mcp-server@latest

Client configuration

Paste this into your MCP client config (Claude Desktop, Cursor, or any client that reads mcpServers), then restart the client.

mcp.json
{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": [
        "-y",
        "kubernetes-mcp-server@latest"
      ]
    }
  }
}

When to use it

Reach for this when the task needs kubernetes inside the agent loop. Skip it if a plain shell command or a one-off script is enough — every server you add costs context and adds a failure mode.

Other Go servers

  • GitHub — Official GitHub server covering repositories, issues, pull requests, code search, and Actions
  • Terraform MCP — Reads Terraform provider documentation and registry metadata so an agent writes HCL against the real schema instead of inventing arguments