mcp-k8s-go is an MCP server that provides Large Language Model clients direct access to Kubernetes clusters using Go-based tools and resources. DevOps engineers, platform teams, and site reliability engineers use this server to inspect, troubleshoot, and administer container workloads directly through natural language interfaces like Claude Desktop. It connects locally via standard kubeconfig credentials or Docker containers to interact with multiple cluster contexts and namespaces. By exposing cluster primitives, the server enables users to list, inspect, create, and modify standard Kubernetes resources, including pods, services, and deployments. Operators can fetch real-time pod logs, inspect cluster events, monitor node statuses, and run diagnostic commands within active containers. To support production environments safely, mcp-k8s-go features configuration flags for read-only access, secret data masking, and context restriction. It helps teams diagnose failures, monitor cluster health, and manage resources without writing complex kubectl commands manually.
Category: Cloud & Infrastructure
Tags: containers, golang, infrastructure, k8s, kubernetes
npm install -g @strowk/mcp-k8s. 2. Open your claude_desktop_config.json file in a text editor. 3. Add mcp_k8s to the mcpServers section using the executable name and any desired runtime arguments: json { "mcpServers": { "mcp_k8s": { "command": "mcp-k8s", "args": [ "--readonly", "--mask-secrets" ] } } } 4. Alternatively, use Docker by mapping your local kubeconfig: pass command docker with args ["run", "-i", "-v", "~/.kube/config:/home/nonroot/.kube/config", "--rm", "mcpk8s/server:latest"]. 5. Save the configuration and restart Claude Desktop.Part of MCP Servers
mcp-k8s-go is an open source Model Context Protocol server written in Golang. It connects LLM clients to your Kubernetes clusters, allowing AI agents to query resources, check pod logs, execute commands, and manage cluster objects using your existing kubeconfig configuration.
You can install it using several methods. You can install it globally using npm via npm install -g @strowk/mcp-k8s, run it with npx @strowk/mcp-k8s, pull the official Docker image mcpk8s/server:latest, download prebuilt binaries from GitHub releases, or build it from source using Go.
It provides tools to list contexts, namespaces, nodes, and pods across your clusters. It allows you to get events, stream pod logs, run commands inside containers, and get, create, or modify any Kubernetes resource like deployments and services.
Yes. The server includes a --readonly flag that disables all tools capable of writing changes to the cluster. You can also use the --allowed-contexts flag to limit access to specific development or staging contexts, and secrets are masked by default.
Yes, mcp-k8s-go is open source software. The source code, release binaries, and contribution guidelines are maintained publicly on GitHub under an open source license.