LABSCO SUMMARY
Generated from the CLI, so it never falls behind it.
A hand-maintained Kubernetes tool list goes stale the moment kubectl adds a subcommand; this one is derived from the binary on your machine, which means the coverage matches your version exactly. The flip side is that the full surface is exposed, delete included, and it inherits your kubeconfig context — so which cluster is current is the only thing standing between an assistant and production.
What it is
A kubectl plugin that turns the CLI you already have into an MCP server. Rather than hand-writing a tool per resource, it recursively traverses the kubectl command tree and registers each command with its description, usage, flags and parameters, so the assistant discovers what kubectl can do from kubectl itself. It runs over stdio.
What you get
- Every kubectl command — get, apply, delete and the rest — exposed as a tool with the prefix
kubectl___ - Each command's help text, flags and required parameters carried through, so the model can pick arguments rather than guess
- Structured responses that a model can parse instead of raw terminal output
- A stdio server invoked as
kubectl-mcp, which works anywhere the plugin is on PATH
Requirements
A working kubectl with a valid kubeconfig — the plugin runs as you, with whatever cluster access your context already has. Build with make kubectl-mcp, move the binary onto your PATH, and confirm with kubectl plugin list | grep mcp. Register it in your client's config as the kubectl-mcp command. Resource creation and other long operations have a 45-second timeout on the response while the process keeps running in the background, so watch those separately.
Setup effort
Build from source — git clone https://github.com/dims/kubectl-mcp.git
USE CASES
01
Asking about cluster state in plain language
Let the assistant pick the right get command and flags from kubectl's own help text.
02
Debugging a failing workload
Chain describe, logs and events without switching to a terminal.
03
Applying a manifest you just worked out together
Run the apply through the plugin, and follow long operations separately past the 45-second response window.
04
Using kubectl from an assistant that only speaks MCP
Register one plugin instead of maintaining a tool per Kubernetes resource.
BEFORE YOU INSTALL
What to know first
Requires
- kubectl with a working kubeconfig — the tools run as you, against your current context
- Go and make, to build the plugin
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
TERMINAL
git clone https://github.com/dims/kubectl-mcp.git
cd kubectl-mcp
make kubectl-mcp
sudo mv kubectl-mcp /usr/local/bin/
kubectl plugin list | grep mcpMCP Clients
Amazon Q
AMAZON Q · JSON
{
"mcpServers": {
"kubectl": {
"command": "kubectl-mcp",
"args": []
}
}
}