Kubectl MCP Tool
by rohitg00
The Kubectl MCP Tool is a Model Context Protocol (MCP) server for Kubernetes. It enables AI assistants to interact with Kubernetes clusters through natural language.
Last updated: N/A
What is Kubectl MCP Tool?
The Kubectl MCP Tool is a server that implements the Model Context Protocol (MCP) to allow AI assistants like Claude and Cursor to interact with Kubernetes clusters using natural language. It acts as an intermediary, translating natural language commands into kubectl operations.
How to use Kubectl MCP Tool?
First, install the tool using pip. Then, configure your AI assistant (Claude, Cursor, Windsurf) to connect to the MCP server by providing the server's command and environment variables, including the path to your kubeconfig file. Alternatively, use the provided install.sh script for automatic configuration.
Key features of Kubectl MCP Tool
Connect to a Kubernetes cluster
List and manage pods, services, deployments, and nodes
Process natural language queries for kubectl operations
Cluster health and resource utilization monitoring
RBAC validation and security context auditing
Multiple transport protocols support (stdio, SSE)
Integration with multiple AI assistants
Use cases of Kubectl MCP Tool
Interacting with Kubernetes clusters using natural language via AI assistants
Automating Kubernetes tasks through natural language commands
Troubleshooting Kubernetes issues using natural language diagnostics
Monitoring Kubernetes cluster health and resource utilization with natural language queries
FAQ from Kubectl MCP Tool
What is MCP?
What is MCP?
MCP stands for Model Context Protocol, a standardized interface for AI assistants to interact with applications and services.
What AI assistants are supported?
What AI assistants are supported?
Currently, Claude, Cursor, and Windsurf are explicitly supported, but the tool is designed to be extensible to other MCP-compatible AI assistants.
How do I configure the tool for my AI assistant?
How do I configure the tool for my AI assistant?
You need to configure your AI assistant to connect to the MCP server by providing the server's command and environment variables, including the path to your kubeconfig file. Refer to the README for specific instructions for each AI assistant.
What are the prerequisites for using this tool?
What are the prerequisites for using this tool?
You need Python 3.9+, kubectl installed and configured, access to a Kubernetes cluster, and pip.
How do I verify the installation?
How do I verify the installation?
After installation, run kubectl-mcp --help
to check CLI mode. The primary command available is kubectl-mcp serve
which starts the MCP server.