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.
Connect Kubernetes
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 userFor 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.
What the Kubernetes MCP server 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 Kubernetes
- 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 Kubernetes needs
- Access to a Kubernetes or OpenShift cluster and a kubeconfig
- Node.js for the npx route, or the native binary
What the Kubernetes MCP server costs
Free and open source under Apache-2.0, with no hosted version or paid tier; you run it against your own clusters.
Current prices: github.com . We do not list prices: vendors change them often, so check the publisher's own page.
Other MCP servers for cloud and devops
- 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: 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: 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: 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.