Server facts
kubectl-mcp-server
Project
- Author
- rohitg00
- Repository
- github.com/rohitg00/kubectl-mcp-server
- License
- MIT
- Category
- Cloud & DevOps
Tech
- Runtime / language
- pythonPython
- Transports
- stdio
- Remote available
- No
- Authentication
- Not specified
Activity
- GitHub stars
- 964
- Last commit
- Data as of
Tags
- Cluster Management
- Devops
- Helm
- Kubectl
- Kubernetes
Overview
kubectl-mcp-server brings Kubernetes operations into MCP conversations. The README describes a broad tool catalog for inspecting pods, logs, events, deployments, services, storage, configuration, and cluster health. Diagnostic workflows investigate crashes, pending workloads, DNS, and connectivity, while management operations can create, scale, restart, patch, or delete resources. Helm support includes release inspection, chart discovery, repositories, installation, upgrades, and rollback. Context tools help select among configured clusters, making the same interface relevant beyond a single namespace or environment.
The recommended launch uses npx, with Node.js 14 or newer listed for that path. A Python installation requires Python 3.9 or newer, and Docker examples provide stdio or SSE deployment options. Every path still needs kubectl installed and configured plus access to a Kubernetes cluster. The README also describes RBAC validation, secret masking, a non-destructive mode, and OAuth 2.1 support, rather than implying that all operations are inherently read-only. Resource and cost tools help identify idle or overprovisioned workloads. Optional dashboard dependencies add interactive views, and the catalog includes integrations for GitOps, certificates, policy engines, and backups. This breadth is useful for an assistant-led operations workflow, but actual usefulness depends on the configured cluster access and the prerequisites of whichever optional features are selected.
Install & configure
Requirements
- Node.js 14+ for the npx method
- kubectl installed and configured
- Access to a Kubernetes cluster
npx -y kubectl-mcp-serverThe README recommends this npx launch for MCP clients. Python installation instead requires Python 3.9+. Optional UI features have a separate dependency extra. Docker can use stdio or --transport sse. The tool list here is a selection of explicitly named README operations, not the entire catalog.
Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"kubectl-mcp-server": {
"command": "npx",
"args": [
"-y",
"kubectl-mcp-server"
],
"env": {}
}
}
}Config file · Project: .cursor/mcp.json
User: ~/.cursor/mcp.json
The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"kubectl-mcp-server": {
"command": "npx",
"args": [
"-y",
"kubectl-mcp-server"
],
"env": {}
}
}
}Config file · Workspace: .vscode/mcp.json
For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.
{
"servers": {
"kubectl-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"kubectl-mcp-server"
],
"env": {}
}
}
}Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"kubectl-mcp-server": {
"command": "npx",
"args": [
"-y",
"kubectl-mcp-server"
],
"env": {}
}
}
}Config file · Project scope: .mcp.json at the repository root
The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.
{
"mcpServers": {
"kubectl-mcp-server": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"kubectl-mcp-server"
],
"env": {}
}
}
}Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.
Tools
Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.
| Tool | What it does |
|---|---|
| get_pods | List pods for a Kubernetes namespace. |
| get_logs | Retrieve logs from a pod. |
| get_pod_events | Inspect events associated with a pod. |
| diagnose_pod_crash | Investigate pod failures using diagnostic information. |
| create_deployment | Create a Kubernetes deployment. |
| scale_deployment | Change the replica count of a deployment. |
| kubectl_rollout | Manage deployment rollout operations. |
| diagnose_network_connectivity | Investigate service and workload connectivity problems. |
| check_dns_resolution | Check DNS behavior relevant to cluster connectivity. |
| audit_rbac_permissions | Analyze Kubernetes role and permission configuration. |
| check_secrets_security | Inspect secrets for security concerns. |
| helm_list | List Helm releases in the cluster. |
| install_helm_chart | Install an application from a Helm chart. |
| helm_rollback | Return a Helm release to an earlier revision. |
| get_current_context | Report the selected Kubernetes context. |
| switch_context | Select another configured Kubernetes context. |
| list_contexts | List configured Kubernetes contexts. |
| get_resource_recommendations | Suggest resource settings based on workload analysis. |
| get_idle_resources | Find resources that appear idle. |
| get_cost_analysis | Analyze cluster resource costs. |
| get_overprovisioned_resources | Identify workloads with excessive resource allocation. |
| delete_resource | Delete a selected Kubernetes resource. |
| show_cluster_overview_ui | Present an optional interactive cluster overview. |
Names, permissions, and defaults can change. Check the current upstream documentation before granting access.
Use cases
- Investigate a crashed pod using logs and events.
- Create, scale, or roll back deployments.
- Inspect Helm releases and manage chart installations.
- Review RBAC and secret-security findings.
- Identify idle workloads and oversized resource requests.
Strengths
- Broad coverage of inspection and mutation workflows.
- Includes Helm and Kubernetes context operations.
- Documents non-destructive mode and secret masking.
- Offers npx, Python, and Docker setup paths.
Limitations
- Needs kubectl configuration and working cluster access.
- The tool catalog includes destructive resource operations.
- Interactive dashboards require optional dependencies.
Frequently asked questions
Independent listing, not an affiliation or security review. Grant the least access needed and verify the upstream instructions before running code.