Kubernetes

Inspect and manage Kubernetes clusters, pods, and deployments.

Works with: Claude DesktopClaude CodeCursor

Community server · details last checked

Quick install
npx -y k8s-mcp-server

How to install the Kubernetes MCP server

Add this to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": [
        "-y",
        "k8s-mcp-server"
      ]
    }
  }
}

Add this to your Claude Code MCP configuration:

npx -y k8s-mcp-server

Add this to your Cursor MCP configuration:

{
  "mcpServers": {
    "kubernetes": {
      "command": "npx",
      "args": [
        "-y",
        "k8s-mcp-server"
      ]
    }
  }
}

Built by ContextBoltThis directory is built by ContextBolt: MCP-native memory and SEO tools that run alongside Kubernetes in the same client.

Explore ContextBolt

The Kubernetes MCP server gives an agent access to cluster state: pods, deployments, services, events and logs. Debugging Kubernetes is largely a matter of gathering the right five pieces of information from four different commands, which makes it a natural fit for something that can run all of them and read the output.

What it actually does

The server uses your kubeconfig to talk to a cluster and exposes inspection operations as tools. Claude can list workloads and their status, describe individual resources, read recent events and pull container logs. The advantage over running the commands yourself is that it can chase a thread: see a pod restarting, read its logs, check the events on its node, and tell you what connects them.

Practical patterns:

  • ‘Why is this deployment not coming up?’
  • ‘Which pods have restarted in the last hour, and what do their logs say?’
  • ‘Compare the resource limits on these two deployments.‘

Why use it

The tedious part of cluster debugging is the fetching, not the thinking. You know roughly what to look at; getting it takes six commands and careful reading. Handing that to an agent shortens the loop between symptom and hypothesis considerably, particularly for the sort of intermittent problem where you need to look at a lot of things quickly.

Gotchas

The server acts against whatever context your kubeconfig currently selects, and the classic failure is being pointed at production while you think you are on staging. Check before you start. Give it a read-only service account unless you have a specific reason not to; an agent with delete permissions on a cluster is a risk with no corresponding upside for diagnosis. Log volume also adds up fast in the context window, so ask for specific pods rather than everything in a namespace.

Built by ContextBolt

This directory is built by ContextBolt

We build MCP-native tools that give your AI the context it cannot reach on its own. Bookmarks turns your saved posts into agent-queryable memory. SEO puts live keyword and ranking data inside Claude. Both run alongside Kubernetes in the same client.

Explore the products →

Kubernetes MCP server: FAQs

Does it replace kubectl?

No. It is a faster route to a diagnosis, not a replacement for the tool you use to change things. Most people keep both.

Which cluster does it talk to?

Whichever context your kubeconfig points at. That is worth checking before every session, since the failure mode is acting on the wrong cluster.

Can it delete resources?

Depending on your credentials, yes. A read-only service account is strongly preferable for anything pointed at production.

Is it good at reading logs?

Pulling logs for a failing pod and correlating them with recent events is the single best thing it does.