# kubectl-mcp-server

> kubectl-mcp-server is an open-source MCP server for cloud and infrastructure. MCP server giving AI assistants kubectl and Helm control over Kubernetes clusters. It is available on CLI, API, Self-hosted, Linux, macOS and Windows.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted, Linux, macOS, Windows
- **Website:** https://hub.docker.com/mcp/server/kubectl-mcp-server/overview
- **Repository:** https://github.com/rohitg00/kubectl-mcp-server
- **GitHub stars:** 974
- **License:** MIT
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-12-01

## About

Lets an AI assistant inspect and change Kubernetes workloads through natural language instead of raw kubectl commands. Requests such as checking pod health, listing deployments, reading events or scaling a deployment are translated into kubectl and Helm operations against the clusters in your kubeconfig.

The default install registers 26 tools covering generic resource reads and writes, port forwarding, context switching and the full Helm release lifecycle. Additional toolsets for GitOps, cert-manager, policy engines, backups, service meshes and virtual clusters can be enabled with a flag. Read-only and confirm-before-destructive safety modes are available, and Secret values are redacted from tool output.

It suits platform and DevOps engineers who already work with Kubernetes and want an assistant that can run routine cluster queries and changes from their editor or chat client. Deployment is available over stdio for desktop clients or as a stateless HTTP server behind OAuth.

## Features

- **Generic kubectl operations:** Get, describe, logs, apply, patch and scale work across any resource kind, including custom resources.
- **Helm release management:** Install, upgrade, uninstall and inspect Helm v3 releases from the assistant.
- **Read-only and confirmation modes:** Safety flags hide write tools entirely or require approval before destructive calls.
- **Secret redaction:** Secret data, bearer tokens and JWTs are replaced with placeholders in tool results.
- **Opt-in ecosystem toolsets:** Enable extra toolsets for GitOps, certificates, policies, backups, service meshes and virtual clusters.
- **Multi-cluster targeting:** Most tools accept a context parameter to query or change a specific cluster without switching.

## Good for

- Find out why a pod is crashing using its logs and recent events
- Scale or roll back a deployment from a chat with the assistant
- Audit RBAC roles and ConfigMaps across namespaces
- Install or upgrade a Helm chart in a named cluster
- Compare resources between a production and a staging namespace

## Tools

From the tool list in its README, going by the names, 2 of 26 tools delete data and 1 changes data; 5 names don't say. From the server's own tool labels and tool names; not verified by us.

- `check_pod_health` (name suggests: reads): Check the health status of a pod.
- `create_deployment` (name suggests: changes): Create a new deployment.
- `delete_resource` (name suggests: deletes): Delete a Kubernetes resource.
- `get_api_resources` (name suggests: reads): List Kubernetes API resources.
- `get_cluster_roles` (name suggests: reads): Get all cluster-wide RBAC roles.
- `get_configmaps` (name suggests: reads): Get all ConfigMaps in the specified namespace.
- `get_current_context` (name suggests: reads): Get current kubeconfig context.
- `get_deployments` (name suggests: reads): Get all deployments in the specified namespace.
- `get_events` (name suggests: reads): Get all events in the specified namespace.
- `get_logs` (name suggests: reads): Get logs from a pod.
- `get_namespaces` (name suggests: reads): Get all Kubernetes namespaces.
- `get_nodes` (name suggests: reads): Get all nodes in the cluster.
- `get_pod_events` (name suggests: reads): Get events for a specific pod.
- `get_pods` (name suggests: reads): Get all pods in the specified namespace.
- `get_rbac_roles` (name suggests: reads): Get all RBAC roles in the specified namespace.
- `get_resource_usage` (name suggests: reads): Get resource usage statistics via kubectl top.
- `get_secrets` (name suggests: reads): Get all Secrets in the specified namespace.
- `get_services` (name suggests: reads): Get all services in the specified namespace.
- `health_check` (name suggests: reads): Check cluster health by pinging the API server.
- `install_helm_chart`: Install a Helm chart.
- `kubectl_explain` (name suggests: reads): Explain a Kubernetes resource using kubectl explain.
- `port_forward`: Forward local port to pod port.
- `scale_deployment`: Scale a deployment.
- `switch_context`: Switch current kubeconfig context.
- `uninstall_helm_chart` (name suggests: deletes): Uninstall a Helm release.
- `upgrade_helm_chart`: Upgrade a Helm release.

## FAQ

### Which tools are enabled by default?

The core and helm toolsets, which provide 26 tools. Other toolsets must be enabled explicitly.

### Can kubectl-mcp-server run without write access to the cluster?

Yes. A read-only safety mode hides and blocks every tool that changes state.

### How is the server installed?

It can be run with npx, installed from PyPI with pip or uvx, or started as a Docker container.

### Does kubectl-mcp-server protect Secret values?

Secret data, stringData, bearer tokens and JWTs are redacted in every tool result by default.

### Is kubectl-mcp-server free?

Yes. kubectl-mcp-server is open source, so you can use and self-host it for free.

### What are the best alternatives to kubectl-mcp-server?

The closest alternatives to kubectl-mcp-server are k8s-mcp-server, mcp-k8s, Helm MCP, K8s MCP Server (Go) and MCP Kubernetes.

## Where this comes from

- Description: written from the project's README and the project's website.

## Alternatives

- [k8s-mcp-server](https://ai-powered.com/mcp/k8s-mcp-server): k8s-mcp-server is an open-source MCP server for developer tools.
- [mcp-k8s](https://ai-powered.com/mcp/mcp-k8s): mcp-k8s is an open-source MCP server for cloud and infrastructure.
- [Helm MCP](https://ai-powered.com/mcp/helm-mcp-2): Helm MCP is an open-source MCP server for cloud and infrastructure.
- [K8s MCP Server (Go)](https://ai-powered.com/mcp/k8s-mcp-server-go): K8s MCP Server (Go) is an open-source MCP server for developer tools.
- [MCP Kubernetes](https://ai-powered.com/mcp/mcp-kubernetes): MCP Kubernetes is an open-source MCP server for developer tools.
- [mcp-k8s-go](https://ai-powered.com/mcp/mcp-k8s-go): mcp-k8s-go is an open-source MCP server for cloud and infrastructure.
- [Amazon EKS MCP Server](https://ai-powered.com/mcp/amazon-eks-mcp-server): Amazon EKS MCP Server is a free MCP server for cloud and infrastructure.
- [MCP Openshift](https://ai-powered.com/mcp/mcp-openshift): MCP Openshift is an open-source MCP server for cloud and infrastructure.

---
Source: https://ai-powered.com/mcp/kubectl-mcp-server
