Kubernetes MCP (kubectl)

Wraps kubectl so an agent can list resources, read logs, and inspect events.

Community TypeScript stdio

What it does

Wraps kubectl so an agent can list resources, read logs, and inspect events. Unlike the direct-API Kubernetes server, this one shells out to the CLI you already have configured, which means it inherits every context in your kubeconfig. Pin the context explicitly, and do not enable write verbs on a cluster that runs anything real.

Install

Terminal
npx -y mcp-server-kubernetes

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": {
    "kubectl": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-kubernetes"
      ]
    }
  }
}

Use it for

Reading pod state and events when a deployment misbehaves

Skip it if

Apply or delete operations in a cluster you care about

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 TypeScript servers

  • Filesystem — Gives an agent scoped read, write, and search access to directories you explicitly allow
  • Memory — A persistent knowledge graph stored in a local JSON file, exposed through entities, relations, and observations
  • Sequential Thinking — Gives the model a scratchpad for structured, revisable reasoning: numbered thoughts that can branch, revise, and conclude