MCP server that exposes rich kubectl & Helm tooling so Model-Context-Protocol (MCP) clients can manage Kubernetes clusters.
https://github.com/Flux159/mcp-server-kubernetesStop context-switching between your AI chat and terminal windows. This MCP server connects Claude (or any MCP-compatible AI) directly to your Kubernetes clusters, letting you manage deployments, troubleshoot pods, and inspect cluster state through natural language commands.
You're debugging a production issue at 2 AM. Your AI assistant suggests checking pod logs and scaling a deployment, but you need to:
There's a better way.
With this MCP server, your AI can execute kubectl and Helm commands directly. Ask Claude to "scale my nginx deployment to 5 replicas" or "show me the logs for failing pods in the api namespace" and watch it happen in real-time.
What you get:
Production Debugging: "Check the health of all pods in the payment-service namespace and show me logs for any that are failing." Your AI executes the commands and provides a comprehensive status report.
Deployment Management: "Apply this YAML manifest to staging and then check if the rollout completed successfully." No more switching between chat and terminal to paste manifests and verify deployments.
Infrastructure Scaling: "The API pods are under heavy load. Scale the deployment to 10 replicas and monitor the status." Your AI handles both the scaling operation and the follow-up verification.
Cluster Exploration: "What ingress controllers are running and what services are they exposing?" Perfect for onboarding to new environments or investigating unfamiliar clusters.
Enable read-only mode when you want your AI to inspect and analyze without making changes:
{
"mcpServers": {
"kubernetes-readonly": {
"command": "npx",
"args": ["mcp-server-kubernetes"],
"env": {
"ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "true"
}
}
}
}
Your AI can still get cluster information, describe resources, view logs, and even apply configurations, but destructive operations like kubectl delete are blocked.
Works with your existing setup - no cluster modifications required. The server uses your current kubectl configuration and respects your RBAC permissions. If you can run kubectl get pods, the MCP server can too.
Claude Desktop setup:
{
"mcpServers": {
"kubernetes": {
"command": "npx",
"args": ["mcp-server-kubernetes"]
}
}
}
Command line testing:
npx mcp-chat --server "npx mcp-server-kubernetes"
k8s-diagnose promptThis isn't a toy for simple demos. It's a production-ready tool that handles the complexity of real Kubernetes environments while giving you the conversational interface you want for cluster management.
Stop copying and pasting between terminals and chat windows. Give your AI direct access to your clusters and watch your K8s productivity soar.