MCP K8s Go logo

MCP K8s Go

by strowk

Connects MCP clients to Kubernetes for context, resource, node, event, log, and pod command operations.

Install MCP K8s Go

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "strowk-mcp-k8s-go": {
      "command": "npx",
      "args": [
        "-y",
        "@strowk/mcp-k8s"
      ],
      "env": {
        "KUBECONFIG": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @strowk/mcp-k8s

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 8d ago.

Overview

The strowk/mcp-k8s-go MCP server connects MCP clients to Kubernetes clusters through a Go-based server. It can inspect contexts, namespaces, resources, nodes, events, pods, and logs, and can also create or modify resources and run commands in pods. Use it when an AI client needs Kubernetes operations through an MCP interface, with optional read-only mode and context restrictions. It reads Kubernetes configuration from the usual kubeconfig location or the KUBECONFIG environment variable.

Use cases

  • Inspect Kubernetes contexts and namespaces
  • Review pod logs and cluster events
  • List and examine Kubernetes resources
  • Create or modify cluster resources
  • Run commands inside Kubernetes pods

Key features

  • Kubernetes context and namespace discovery
  • Resource listing, retrieval, creation, and modification
  • Node, pod, event, and log access
  • Pod command execution
  • Read-only mode and context allowlisting
  • Default secret masking

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

19/20 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · @strowk/mcp-k8s (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars382Stargazers on the source repository.
npm downloads392Package downloads in the last 30 days.
Last commit10mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP K8s Go works

What strowk/mcp-k8s-go MCP server does

The strowk/mcp-k8s-go MCP server exposes Kubernetes cluster operations to MCP-compatible clients. It supports discovering available Kubernetes contexts and namespaces, listing nodes and pods, and retrieving events or pod logs. It also provides access to Kubernetes resources, including custom mappings for common objects such as pods, services, and deployments.

Beyond inspection, the server can create and modify Kubernetes resources and execute commands inside Kubernetes pods. Those write and execution capabilities make it suitable for operational workflows, but they also mean deployments should be configured with appropriate cluster permissions and restrictions.

How it works

The server runs as a local MCP process and communicates with the client using its configured command. It then uses Kubernetes configuration and credentials to access the cluster contexts available to that process. Clients can select a context exposed as an MCP resource and use the available tools to query or change cluster state.

The project is implemented in Go and is distributed in several forms: an npm package with prebuilt binaries, GitHub release binaries, a Docker image, and source code that can be built with Go. The Docker example mounts a kubeconfig into the container and publishes images for Linux amd64 and arm64.

The strowk/mcp-k8s-go MCP server can be inspected with the MCP Inspector through its npm package.

Setup and configuration

Installation options include Smithery, mcp-get, npm, GitHub releases, a Go build, and Docker. The npm route installs @strowk/mcp-k8s globally or runs it with npx. A downloaded release provides the mcp-k8s-go executable. Building from source requires Go. Docker users must provide the container with access to a Kubernetes configuration file.

KUBECONFIG optionally selects the Kubernetes configuration file. When it is absent, the server uses ~/.kube/config. Command-line options provide additional controls:

  • --allowed-contexts=<ctx1,ctx2,...> limits access to named contexts; without it, all contexts are allowed.
  • --readonly disables tools that write changes to the cluster.
  • --mask-secrets controls secret masking and is enabled by default; --mask-secrets=false disables it.
  • --help and --version display command information.

A client configuration can start the installed executable directly, invoke the npm package with npx, or run the Docker image with an interactive standard-input stream.

Tools and capabilities

The strowk/mcp-k8s-go MCP server supports these documented operations:

  • List Kubernetes contexts.
  • List namespaces.
  • List, retrieve, create, and modify Kubernetes resources.
  • List nodes and pods.
  • Retrieve Kubernetes events.
  • Retrieve pod logs.
  • Run a command in a Kubernetes pod.

The --readonly option is available when a client should inspect a cluster without being able to use write-capable tools.

Limitations and notes

The server depends on valid Kubernetes configuration and permissions.

Secret output is masked by default, but that behavior can be disabled with a command-line option. Pod command execution and resource mutation should therefore be treated as privileged operations.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP K8s Go

strowk/mcp-k8s-go is an MCP server that connects AI clients to Kubernetes clusters through kubeconfig. Its main tools list contexts, namespaces, nodes, pods, and resources; retrieve events and pod logs; create or modify resources; and run commands inside pods. It also supports read-only operation and context restrictions.

Install it with npm, a GitHub release binary, Go, Docker, Smithery, or mcp-get. The npm package can be installed globally as `@strowk/mcp-k8s` or launched with `npx`; release binaries provide `mcp-k8s-go`. Docker users mount their kubeconfig into the container.

Set `KUBECONFIG` to the path of your Kubernetes configuration file, or let the server use `~/.kube/config` by default. With Docker, mount the host kubeconfig at `/home/nonroot/.kube/config` as shown in the documented configuration.

Start the server with the `--readonly` option. This disables tools that can write changes to the Kubernetes cluster, while inspection capabilities remain available.

Yes, it works with Claude Desktop through a configured command such as `mcp-k8s`, `mcp-k8s-go`, `npx @strowk/mcp-k8s`, or Docker.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP K8s Go AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/strowk-mcp-k8s-go?style=directory)](https://allmcps.com/mcp/strowk-mcp-k8s-go)
HTML Embed
<a href="https://allmcps.com/mcp/strowk-mcp-k8s-go"><img src="https://allmcps.com/api/badge/strowk-mcp-k8s-go?style=directory" alt="MCP K8s Go on AllMCPs" /></a>