Labsco
MCP SERVER

Kubectl MCP Server

by rohitg00

Run a Kubernetes cluster through conversation — debug crashed pods, walk Helm releases, audit RBAC, chase idle spend, and reach Flux, Argo, Istio, Velero and cert-manager without leaving the chat.

Containers, Kubernetes & Cluster Operations
Summary
The cluster question you would have needed four CLIs to answer.

Beyond kubectl itself it reaches Helm, Flux, Argo, Istio, Velero, cert-manager, KEDA, Cilium and KubeVirt — so "why is this pod pending and did the last backup work" is one conversation instead of four terminal tabs.

What it is

A large Kubernetes control surface exposed over MCP. It uses your existing kubectl configuration, so cluster access is whatever your kubeconfig already grants.

What you get
  • Core objects: pods, deployments, statefulsets, daemonsets, jobs and replicasets, with `get_logs`, `get_previous_logs`, `get_pod_events`, `check_pod_health`, `exec_in_pod` and `cleanup_pods`
  • Diagnostics as first-class tools rather than recipes — `diagnose_pod_crash`, `detect_pending_pods`, `get_evicted_pods`, `diagnose_network_connectivity`, `check_dns_resolution`, `trace_service_chain` and `compare_namespaces`
  • Security posture: `audit_rbac_permissions`, `check_secrets_security`, `get_pod_security_info` and `get_admission_webhooks`
  • Cost work: `get_resource_recommendations`, `get_idle_resources`, `get_cost_analysis`, `get_overprovisioned_resources`, `get_namespace_cost_allocation` and `optimize_resource_requests`
  • The full Helm surface — releases, charts, repos, install, upgrade, rollback, template and chart development
  • Ecosystem coverage that usually needs its own CLI: GitOps with Flux and Argo, cert-manager, Kyverno and Gatekeeper policy, Velero backup and restore, KEDA, Cilium and Hubble, Argo Rollouts and Flagger, Cluster API, KubeVirt, Istio and Kiali, plus kind and vCluster
  • MCP resources for reading state — `kubeconfig://contexts`, `cluster://info`, `cluster://nodes`, `namespace://list` and `manifest://` URIs per object type, with secret data masked
  • Interactive UI dashboards including `show_pods_dashboard_ui`, `show_events_timeline_ui` and `show_cluster_overview_ui`
Requirements

Kubectl installed and configured, and access to a cluster. Either Python 3.9+ for the pip install or Node.js 14+ to run it straight through npx with no install step. A Docker image is published on both Docker Hub and the GitHub Container Registry; mount your kubeconfig read-only into the container and choose stdio or an HTTP transport. The interactive dashboards need the UI extra at install time.

Setup effort

One command — npx -y kubectl-mcp-server