LABSCO SUMMARY
It inherits your kubeconfig, so it reaches exactly what you can reach.
Because everything runs through kubectl, the cluster it touches is the one your current context points at — and switching contexts is itself one of the operations, which is worth remembering before a scale command. Cluster roles, role bindings, namespaces and service accounts are listed as upcoming, not shipped.
What it is
An MCP server for Kubernetes that wraps kubectl, so an assistant can inspect and change resources in whatever cluster your current context points at.
What you get
- Create, update, scale and delete deployments in a namespace
- List pods, namespaces, nodes, services, deployments, jobs, cronjobs, statefulsets and daemonsets
- Read pod logs and namespace events
- Add or remove labels and annotations on a pod
- Expose a deployment on a port, and port-forward a pod, deployment or service to a local port
- Show the current context, list contexts and switch between them
Requirements
Cluster access already configured through kubectl, plus Python 3.x. Your client runs kubernetes.py through uv from the project directory.
Setup effort
Build from source
USE CASES
01
Working out why a workload is unhealthy
List the pods in the namespace, then pull the logs of the failing one and the events around it.
02
Scaling something in a hurry
Say the deployment, the namespace and the replica count.
03
Rolling an image forward
Update the deployment to the new version without composing the kubectl invocation.
04
Reaching a service from your laptop
Port-forward it to local port 8080 and hit it in a browser.
BEFORE YOU INSTALL
What to know first
Requires
- uv on PATH
- Python 3.x
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
MCP Clients
Claude Desktop
CLAUDE DESKTOP · JSON
{
"mcpServers": {
"Kubernetes": {
"command": "uv",
"args": [
"--directory",
"~/mcp/mcp-k8s-server",
"run",
"kubernetes.py"
]
}
}
}