# strowk/mcp-k8s-go [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/strowk/mcp-k8s-go  
**GitHub Stars:** 382  
**npm Downloads (last month):** 392  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/strowk-mcp-k8s-go

## Description
/🏠 - Kubernetes cluster operations through MCP

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-k8s-go": {
    "command": "npx",
    "args": ["-y","@strowk/mcp-k8s"],
    "env": {
      "KUBECONFIG": ""
    }
  }
}
```

**Requires environment variables:** `KUBECONFIG` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/strowk-mcp-k8s-go/readme_

