Server facts
mcp-k8s-go
GitHub stars
383
Last commit
Nov 18, 2026
Runtime
go
License
MIT
Project
- Author
- strowk
- Repository
- github.com/strowk/mcp-k8s-go
- License
- MIT
- Category
- Cloud & DevOps
Tech
- Runtime
- go
- Transports
- stdio
- Remote access
- No
- Authentication
- Kubernetes kubeconfig (KUBECONFIG / ~/.kube/config)
Activity
- GitHub stars
- 383
- Last commit
- Data as of
Tags
- Kubernetes
- mcp
- server
Overview
Platform engineers searching for `k8s go mcp` can connect Claude Desktop and other `stdio` MCP clients straight to Kubernetes clusters using `strowk/mcp-k8s-go` (Golang, MIT license), continuously integration-tested from Kubernetes v1.34.13 up to v1.37.2 (including releases v1.35.10 and v1.36.6). Installation adapts to your environment: run prebuilt binaries through npm (`npx @strowk/mcp-k8s` or global npm install), download standalone `mcp-k8s-go` binaries from GitHub Releases with no runtime prerequisite, compile from source with `go install`, or pull multi-arch Docker Hub images (`mcpk8s/server:latest` for `linux/amd64` and `linux/arm64`) with your local kubeconfig mounted into the container's nonroot home directory. Authentication reads `KUBECONFIG` (defaulting to `~/.kube/config`), and interactive browsing works directly with the MCP Inspector CLI.
Combining MCP prompts, resources, and tools, the server lists contexts and namespaces, lists pods and cluster nodes, inspects Kubernetes events and pod logs, runs commands inside pods, and lists, gets, creates, or modifies arbitrary Kubernetes resources (including custom mappings for deployments, services, and pods). Built-in safety flags guard production clusters: `--allowed-contexts=<ctx1,ctx2>` restricts accessible contexts, `--readonly` disables every mutating tool, and `--mask-secrets` defaults to `true` so secret values stay redacted unless explicitly turned off (`--mask-secrets=false`).
Install & configure
Requirements
- Valid Kubernetes `KUBECONFIG` (defaults to `~/.kube/config`) with cluster access
- Distribution choice: Node.js (`npx @strowk/mcp-k8s`), standalone GitHub binary (`mcp-k8s-go`), Go (`go install`), or Docker (`mcpk8s/server:latest`)
- Optional safety flags (`--allowed-contexts=...`, `--readonly`, `--mask-secrets=true` default)
npx @strowk/mcp-k8sAdd `mcp_k8s` to `claude_desktop_config.json` running `npx @strowk/mcp-k8s` (or installed `mcp-k8s` / `mcp-k8s-go` binary with `["--allowed-contexts=dev,prod", "--readonly"]`). For Docker, run `docker run -i -v ~/.kube/config:/home/nonroot/.kube/config --rm mcpk8s/server:latest` (adjusting Windows Git Bash volume paths as `//c/Users/<username>/.kube/config`).
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp_k8s": {
"command": "npx",
"args": [
"@strowk/mcp-k8s"
]
}
}
}Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp_k8s": {
"command": "npx",
"args": [
"@strowk/mcp-k8s"
]
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"mcp_k8s": {
"type": "stdio",
"command": "npx",
"args": [
"@strowk/mcp-k8s"
]
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp_k8s": {
"command": "npx",
"args": [
"@strowk/mcp-k8s"
]
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"mcp_k8s": {
"type": "stdio",
"command": "npx",
"args": [
"@strowk/mcp-k8s"
]
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Use cases
- Select a specific Kubernetes context as an MCP resource in Claude Desktop and inspect `kube-system` pod logs and cluster events for errors.
- Lock down cluster diagnostics in production by combining `--allowed-contexts=dev,prod`, `--readonly`, and default-on `--mask-secrets`.
- List, inspect, create, or modify Kubernetes pods, services, deployments, and arbitrary resources or run commands inside pods during incident triage.
- Deploy a multi-arch (`linux/amd64`, `linux/arm64`) container or single compiled Go binary without requiring Python or Node.js runtimes on operator workstations.
Strengths
- Ships as prebuilt npm wrapper (`@strowk/mcp-k8s`), standalone GitHub Release binaries, Go source install, and multi-arch `linux/amd64`/`linux/arm64` Docker images.
- Built-in cluster safety controls: `--readonly` blocks write tools, `--allowed-contexts` scopes cluster access, and `--mask-secrets` redacts secrets by default.
- Covers contexts, namespaces, nodes, pods, logs, events, pod command execution, and arbitrary resource CRUD across MCP prompts, resources, and tools.
- Actively integration-tested against Kubernetes v1.34.13, v1.35.10, v1.36.6, and v1.37.2.
Limitations
- If `--allowed-contexts` is omitted, every context present in `KUBECONFIG` is accessible by default.
- The root README lists high-level MCP features rather than documenting exact individual tool names and parameter schemas.
- Windows Docker setups using Git Bash may require rewriting `~/.kube/config` mounts to `//c/Users/<username>/.kube/config`.
mcp-k8s-go setup notes
- mcp-k8s-go's stdio example needs a client that launches local processes.