MCP server · Infrastructure

CommunityNot tested yet (sources checked)Read-writeApache-2.0Updated November 2026

Kubernetes MCP Server (containers)

Community server by Red Hat engineers for Kubernetes and OpenShift: up to 22 default tools that read, apply, delete and exec. Shown here: read_only.

Quick verdict

The Kubernetes MCP server to start with. Give it its own kubeconfig for a service account bound to the view role, never a cluster-admin context, run it with read_only and a single context, and allow writes only on a disposable or staging cluster with a role scoped to the namespaces it may change.

  • Maintainercontainers organisation (Red Hat engineers) (community)
  • Security scopeRead-write
  • Transportsstdio, streamable-http
  • Install channelnpm · kubernetes-mcp-server
  • EvidenceNot tested yet (sources checked)
  • LicenseApache-2.0 · Open source

A community MCP server for Kubernetes and OpenShift, maintained by Red Hat engineers in the containers GitHub organisation and not by the Kubernetes project. It is a Go binary that talks to the Kubernetes API directly, using your kubeconfig, and acts with whatever permissions that identity has. Its default tools list namespaces, pods, events, nodes and any resource kind, read pod and node logs and resource usage, and, with writes allowed (the default), create or update any resource by server-side apply, delete any resource, scale workloads, delete pods, run a pod from any image, and execute commands inside containers. Optional toolsets add Helm install and uninstall, KubeVirt, Tekton, Kiali and observability tools. The configuration shown here starts the server with a settings file that sets read_only, which the publisher describes as registering only tools annotated read-only and calls a best-effort guardrail, pins a dedicated kubeconfig for a read-only service account, limits the server to that file's current context, and turns off the tool that prints kubeconfig contents. The service account's RBAC is the real limit. Flux159's mcp-server-kubernetes and Microsoft's AKS server are different servers that OpenSourcesAI has not reviewed.

MCP security best practices

Install Kubernetes MCP Server (containers)

Runs locally with npx; the package runs a native binary for Linux, macOS or Windows and states no minimum Node.js version. Since v0.0.68 the server takes settings only from a TOML file, not from flags such as --read-only, so create the file named in --config with these four lines: read_only = true; kubeconfig = '<the dedicated kubeconfig path>'; cluster_provider_strategy = "disabled"; disabled_tools = ["configuration_view"]. The kubeconfig line pins the file so an inherited KUBECONFIG cannot replace it; the last line turns off a tool that returns the kubeconfig, token included. read_only registers only tools annotated read-only; the publisher calls it a best-effort guardrail, and the service account's RBAC is the real limit. Build the dedicated kubeconfig with the publisher's Kubernetes setup guide: a ServiceAccount bound to the view ClusterRole (for one namespace, a RoleBinding to --clusterrole=view) and a short-lived token, which you must renew when it expires. Never point it at a cluster-admin context. To allow writes, use a separate configuration on a disposable or staging cluster with a role limited to the namespaces it may change.

npx -y kubernetes-mcp-server@latest

Config entry (mcpServers)
{
  "mcpServers": {
    "kubernetes-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "kubernetes-mcp-server@latest",
        "--config",
        "<PATH_TO_KUBERNETES_MCP_SERVER_TOML>"
      ],
      "env": {
        "KUBECONFIG": "<PATH_TO_DEDICATED_KUBECONFIG>"
      }
    }
  }
}

Credentials

NameRequiredWhat it is for
KUBECONFIGRequiredPath to a dedicated kubeconfig for a least-privilege service account, never your everyday kubeconfig or a cluster-admin context. The publisher's setup guide creates one: a ServiceAccount bound to the built-in view ClusterRole and a short-lived token. Not a secret itself, but the file it points to holds the cluster credential. Set the same path as kubeconfig in the TOML file so an inherited KUBECONFIG cannot override it.

Verified configurations

Not run by us yet. This profile is Not tested yet (sources checked): the install channel, config entry, credentials and license were checked against the source and upstream metadata, but no configuration has been installed, discovered and executed in a recorded environment. When one is, it appears here with the eight scope dimensions below.

Best for

Platform engineers and developers who want an assistant to inspect a cluster while debugging (pods, events, logs, resource state) through a dedicated read-only identity, and teams that later want it to apply or roll back changes on a disposable or staging cluster under review.

Why use it

It is the only Kubernetes server with a Registry identity matching its own packages, released often by several maintainers with a published security process. It talks to the API directly, so it needs no kubectl or helm on the machine, works with any conformant cluster and OpenShift, and documents the setup a cautious team wants: a dedicated read-only service account with a short-lived token, a read-only setting, tool deny lists and confirmation prompts for destructive calls.

Tradeoffs

Writes are on by default: started without read_only it can apply any manifest, delete any resource, scale to zero, delete pods, run arbitrary images and execute commands inside containers, with the full permissions of the kubeconfig identity, and by default across every context in that kubeconfig. Run it against your everyday kubeconfig and an assistant has cluster-admin if you do. Its switches are best-effort guardrails by the publisher's own description; only the identity's RBAC is a boundary. read_only still reads anything that identity can read, including Secrets if the role allows them, and pod logs, events and resource specs that can hold credentials or personal data, all of which reach the model. Since v0.0.68 settings live only in a TOML file, so the read-only setup needs a file next to the client config, and older guides that pass --read-only no longer start. Service account tokens expire and must be renewed. Cluster data is untrusted input that can carry prompt injection. It is a community project, not a Kubernetes or CNCF release.

Upstream state

npm package published · repository active · in the official MCP Registry (active). Lifecycle is derived from a committed upstream snapshot at build time, never authored by hand.

Official MCP Registry name: io.github.containers/kubernetes-mcp-server

Editorial details

EditorCJ ZwartLast updatedNovember 2026Sourcescontainers/kubernetes-mcp-server README: install, toolsets, tools; containers/kubernetes-mcp-server LICENSE (Apache-2.0); Configuration reference: read_only, cluster authorization, kubeconfig, tool filtering; Configuration changes: runtime CLI flags removed, TOML and environment mapping; Kubernetes setup guide: dedicated read-only ServiceAccount and kubeconfig; Claude Code setup guide: npx with --config and read_only; Source (v0.1.3): read_only and tool filters; Source (v0.1.3): pod tools and their annotations, including exec and run; SECURITY.md: private reporting, latest-release fixes, Red Hat downstream handling; Kubernetes docs: RBAC user-facing roles (view excludes Secrets); npm: kubernetes-mcp-server; Official MCP Registry: io.github.containers/kubernetes-mcp-server

Grade B: Not tested yet (sources checked). Re-review is due by 2027-05-14. Config entries, credential names and package status can change upstream; verify against the source repository before granting an agent access.

Sources

Related guides

All MCP servers →