Because the execute request passes the command through, everything your kubectl can do is in reach — including delete and apply — and the server adds no authorization of its own. That makes context switching the most important tool here, not a convenience: point it at a kubeconfig scoped to the cluster and namespace you are willing to have driven, and confirm the current context before you let it act.
A Go MCP server that executes kubectl commands on your machine on behalf of an MCP client, and manages which context those commands run against.
- An execute request that runs any kubectl command and returns its output
- A request that lists the Kubernetes contexts available to you
- A request that reports the current context, and one that sets it
- Stdio by default, or HTTP transport by starting the binary with a port flag
- A single-line client config — no arguments needed once the binary is on PATH
Go 1.23 or higher to `go install` it, kubectl on your PATH, and a valid kubeconfig. The server itself implements no authentication or authorization — it runs as you, with your kubeconfig.
One command — go install github.com/BhagyaAmarasinghe/mcp-kubernetes@latest
