kubectl-mcp-server
rohitg00 · rohitg00/kubectl-mcp-server
An MCP server that enables AI agents to control and manage Kubernetes infrastructure through natural language conversations.
Published in CNCF Landscape: A MCP server for Kubernetes.
Preview
What you can do with it
- Debug crashed Kubernetes pods by asking the AI agent.
- Deploy new applications to Kubernetes clusters via natural language commands.
- Optimize Kubernetes costs and audit security settings with AI assistance.
Safety check
Usable, but read the notes first.
- ●npm package runs a script automatically on install.
package.json - ●Installer downloads a remote script and pipes it to the shell.
README.md
Automated scan of the repo files. Always review code you run.
From the README
kubectl-mcp-server
Control your entire Kubernetes infrastructure through natural language conversations with AI. Talk to your clusters like you talk to a DevOps expert. Debug crashed pods, optimize costs, deploy applications, audit security, manage Helm charts, and visualize dashboards, all through natural language. Part of CNCF Landscape, Next to Terraform
Installation
Quick Start with npx (Recommended - Zero Install)
# Run directly without installation - works instantly!
npx -y kubectl-mcp-server
# Or install globally for faster startup
npm install -g kubectl-mcp-server
Or install with pip (Python)
# Standard installation
pip install kubectl-mcp-server
# With interactive UI dashboards (recommended)
pip install kubectl-mcp-server[ui]
📑 Table of Contents
- What Can You Do?
- Why kubectl-mcp-server?
- Live Demos
- Installation
- Getting Started
- Quick Setup with Your AI Assistant
- All Supported AI Assistants
- Complete Feature Set
- Using the CLI
- Advanced Configuration
- Optional Features
- Enterprise
- Integrations & Ecosystem
- In-Cluster Deployment
- Multi-Cluster Support
- Architecture
- Agent Skills
- Development & Testing
- Contributing
- Support & Community
What Can You Do?
Simply ask your AI assistant in natural language:
💬 "Why is my pod crashing?"
- Instant crash diagnosis with logs, events, and resource analysis
- Root cause identification with actionable recommendations
💬 "Deploy a Redis cluster with 3 replicas"
- Creates deployment with best practices
- Configures services, persistent storage, and health checks
💬 "Show me which pods are wasting resources"
- AI-powered cost optimization analysis
- Resource recommendations with potential savings
💬 "Which services can't reach the database?"
- Network connectivity diagnostics with DNS resolution
- Service chain tracing from ingress to pods
💬 "Audit security across all namespaces"
- RBAC permission analysis
- Secret security scanning and pod security policies
💬 "Show me the cluster dashboard"
- Interactive HTML dashboards with live metrics
- Visual timeline of events and resource usage
253 powerful tools | 8 workflow prompts | 8 data resources | Works with all major AI assistants
Why kubectl-mcp-server?
- 🚀 Stop context-switching - Manage Kubernetes directly from your AI assistant conversations
- 🧠 AI-powered diagnostics - Get intelligent troubleshooting, not just raw data
- 💰 Built-in cost optimization - Identify waste and get actionable savings recommendations
- 🔒 Enterprise-ready - OAuth 2.1 auth, RBAC validation, non-destructive mode, secret masking
- ⚡ Zero learning curve - Natural language instead of memorizing kubectl commands
- 🌐 Universal compatibility - Works with Claude, Cursor, Windsurf, Copilot, and 15+ other AI tools
- 📊 Visual insights - Interactive dashboards and browser automation for web-based tools
- ☸️ Production-grade - Deploy in-cluster with kMCP, 216 passing tests, active maintenance
From debugging crashed pods to optimizing cluster costs, kubectl-mcp-server is your AI-powered DevOps companion.
Live Demos
Claude Desktop
Cursor AI
Windsurf
Installation
Quick Start with npx (Recommended - Zero Install)
# Run directly without installation - works instantly!
npx -y kubectl-mcp-server
# Or install globally for faster startup
npm install -g kubectl-mcp-server
Or install with pip (Python)
# Standard installation
pip install kubectl-mcp-server
# With interactive UI dashboards (recommended)
pip install kubectl-mcp-server[ui]
Install from GitHub Release
# Install specific version directly from GitHub release (replace {VERSION} with desired version)
pip install https://github.com/rohitg00/kubectl-mcp-server/releases/download/v{VERSION}/kubectl_mcp_server-{VERSION}-py3-none-any.whl
# Example: Install v1.19.0
pip install https://github.com/rohitg00/kubectl-mcp-server/releases/download/v1.19.0/kubectl_mcp_server-1.19.0-py3-none-any.whl
# Or install latest from git
pip install git+https://github.com/rohitg00/kubectl-mcp-server.git
Prerequisites
- Python 3.9+ (for pip installation)
- Node.js 14+ (for npx installation)
- kubectl installed and configured
- Access to a Kubernetes cluster
Docker
# Pull from Docker Hub
docker pull rohitghumare64/kubectl-mcp-server:latest
# Or pull from GitHub Container Registry
docker pull ghcr.io/rohitg00/kubectl-mcp-server:latest
# Run with stdio transport
docker run -i -v $HOME/.kube:/root/.kube:ro rohitghumare64/kubectl-mcp-server:latest
# Run with HTTP transport
docker run -p 8000:8000 -v $HOME/.kube:/root/.kube:ro rohitghumare64/kubectl-mcp-server:latest --transport sse
Getting Started
1. Test the Server (Optional)
Before integrating with your AI assistant, verify the installation:
# Check if kubectl is configured
kubectl cluster-info
# Test the MCP server directly
kubectl-mcp-server info
#