Labsco
MCP SERVER

MCP Kubernetes

by BhagyaAmarasinghe

Run kubectl from the assistant and switch contexts without leaving the conversation.

Containers, Kubernetes & Cluster Operations
Summary
Full kubectl, with your permissions and no extra guard rails.

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.

What it is

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.

What you get
  • 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
Requirements

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.

Setup effort

One command — go install github.com/BhagyaAmarasinghe/mcp-kubernetes@latest