MCP Server that can connect to a Kubernetes cluster and manage it.
MCPKubernetesClaude.mov
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": ["mcp-server-kubernetes"]
}
}
}
The server will automatically connect to your current kubectl context. Make sure you have:
- kubectl installed and in your PATH
- A valid kubeconfig file with contexts configured
- Access to a Kubernetes cluster configured for kubectl (e.g. minikube, Rancher Desktop, GKE, etc.)
You can verify your connection by asking Claude to list your pods or create a test deployment.
If you have errors, open up a standard terminal and run kubectl get pods
to see if you can connect to your cluster without credentials issues.
- Connect to a Kubernetes cluster
- List all pods
- List all services
- List all deployments
- Create a pod
- Delete a pod
- List all namespaces
- Port forward to a pod
- Get logs from a pod for debugging
- Choose namespace for next commands (memory)
- Support Helm for installing charts
git clone https://github.com/Flux159/mcp-server-kubernetes.git
cd mcp-server-kubernetes
bun install
bun run test
Authentication / adding clusters to kubectx.