---
title: "Kubernetes MCP server: pods, resources and Helm for AI agents"
canonical_url: https://cookiesforai.app/mcp/kubernetes
last_updated: 2026-10-03T10:04:47+02:00
type: mcp
summary: "The Kubernetes MCP server gives AI agents direct access to Kubernetes and OpenShift clusters: list and edit any resource, read pod logs, exec into pods, view events and install Helm charts."
install: "{\"mcpServers\": {\"kubernetes\": {\"command\": \"npx\", \"args\": [\"-y\", \"kubernetes-mcp-server@latest\"]}}}"
related:
  - "https://cookiesforai.app/mcp/aws"
  - "https://cookiesforai.app/mcp/cloudflare"
  - "https://cookiesforai.app/mcp/sentry"
  - "https://cookiesforai.app/mcp/terraform"
---

# Kubernetes MCP server

The Kubernetes MCP server gives AI agents direct access to Kubernetes and OpenShift clusters: list and edit any resource, read pod logs, exec into pods, view events and install Helm charts.

| Fact | Value |
|---|---|
| Publisher | containers (GitHub organization) |
| Source | https://github.com/containers/kubernetes-mcp-server |
| License | Apache-2.0 |
| GitHub stars | 2,140 on 2026-10-02 |
| Last code push | 2026-10-01 |
| Page updated | 2026-10-03 |
| Official MCP Registry | io.github.containers/kubernetes-mcp-server |
| Documented clients | Claude Code, Claude Desktop, VS Code, VS Code Insiders, Cursor, Goose CLI |
| Category | Cloud and DevOps |
| Free tier | Free |
| Cost | Free and open source under Apache-2.0, with no hosted version or paid tier; you run it against your own clusters. |
| Current prices | https://github.com/containers/kubernetes-mcp-server |
| Facts checked | 2026-10-02 |

## Connect

Claude Desktop or any client with a JSON config:

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

VS Code:

```
code --add-mcp '{"name":"kubernetes","command":"npx","args":["kubernetes-mcp-server@latest"]}'
```

Claude Code, read-only with a dedicated kubeconfig (from the project's guide):

```
claude mcp add-json kubernetes-mcp-server '{"command":"npx","args":["-y","kubernetes-mcp-server@latest","--config","'"${HOME}"'/.config/kubernetes-mcp-server.toml"],"env":{"KUBECONFIG":"'${HOME}'/.kube/mcp-viewer.kubeconfig"}}' -s user
```

For the Claude Code route, first create ~/.config/kubernetes-mcp-server.toml containing read_only = true, and a ServiceAccount kubeconfig as the project's Kubernetes setup guide describes. Runtime flags such as --read-only are no longer accepted; settings go in the TOML file.

## Ask your coding agent

```text
Connect the Kubernetes MCP server to my coding agent using its documented setup: https://github.com/containers/kubernetes-mcp-server.
```

## What it does

kubernetes-mcp-server is a community MCP server from the containers GitHub organization that connects AI agents to Kubernetes and OpenShift clusters. Through it an agent can create, read, update and delete any resource, list pods across namespaces, read pod logs and resource usage, exec into a pod, run a container image, view events, and install, list or uninstall Helm releases.

kubernetes-mcp-server is written in Go and talks to the Kubernetes API directly instead of wrapping kubectl or helm, so it needs no other tools installed. It ships as a single binary for Linux, macOS and Windows, an npm package, a Python package and a container image. It reads your kubeconfig, follows changes to it, and can work with several clusters at once.

Tools come in toolsets: core and config are on by default, while helm, kcp, kiali, kubevirt, netobserv and tekton are optional. A TOML config sets read_only = true and can deny specific resource types. The project's own Claude Code guide uses read-only mode with a dedicated ServiceAccount. The repo had 2,139 GitHub stars on 2026-10-01, more than the runner-up, Flux159/mcp-server-kubernetes, with 1,594.

## When to use it

- A pod keeps crashing and you want the agent to read its logs and events.
- You want a quick inventory of what runs in a namespace.
- You want the agent to install or remove a Helm release in a dev cluster.
- You want to troubleshoot a failing Tekton PipelineRun.

## When to pick something else

- Production clusters with an admin kubeconfig: the server can delete resources and exec into pods, so use read_only = true and a limited ServiceAccount.
- An official server: no Kubernetes or CNCF project publishes one. The runner-up community option is Flux159/mcp-server-kubernetes (1,594 GitHub stars on 2026-10-01, MIT), which wraps kubectl and helm.

## What it needs

- Access to a Kubernetes or OpenShift cluster and a kubeconfig
- Node.js for the npx route, or the native binary

## Related

### Other MCP servers for cloud and devops

- [AWS](https://cookiesforai.app/mcp/aws): The AWS MCP servers give AI agents access to AWS: a managed AWS MCP Server for API calls and docs, plus more than 50 open-source servers for services like CDK, EKS, Lambda and DynamoDB.
- [Cloudflare](https://cookiesforai.app/mcp/cloudflare): The Cloudflare MCP servers give AI agents access to a Cloudflare account through hosted endpoints: read Workers logs and builds, manage bindings, check DNS analytics, search the docs and render web pages.
- [Sentry](https://cookiesforai.app/mcp/sentry): The Sentry MCP server gives AI coding agents access to your Sentry account: search errors and events, read issue details and stack traces, look at performance data and triage issues while fixing code.
- [Terraform](https://cookiesforai.app/mcp/terraform): The Terraform MCP server gives AI agents current Terraform Registry data on providers, modules and policies, and with a token manages HCP Terraform and Terraform Enterprise workspaces, runs and plans.

