# Kubectl

Kubectl — an MCP server that lets AI assistants interact with Kubernetes clusters. It diagnoses failing pods, inspects RBAC rights, and tunes workloads.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: rohitg00
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/rohitg00/kubectl-mcp-server
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — warning: a command downloads a script from raw.githubusercontent.com and runs it right away. Do not run such commands without an explicit yes from the human.
- HTML: https://affpapa.org/en/nevibecode/mcp/kubectl

## What it does

This server exposes Kubernetes and Helm controls to AI models through MCP. The baseline setup provides 26 tools, expanding to 209 tools with 14 workflow prompts across full toolsets. An agent can read container logs, trace network reachability from ingresses to endpoints, check resource usage, and generate cluster manifests.

Security controls include secret masking, a read-only flag, and OAuth 2.1 authorization with granular tool scopes. Network listeners follow a fail-closed policy against unintended external exposure.

Running the server requires Python 3.10+ or Node.js alongside an active `kubectl` configuration pointing to your target cluster.

## Requirements
- Needs: Docker
- Works with: Kubernetes

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- diagnose crashlooping pods using logs and cluster events
- generate deployment manifests for multi-replica services
- detect containers that reserve excess CPU or memory
- verify DNS resolution and service networking across pods

## Example prompts
- Check recent events and explain why pod `payment-service` crashed
- List pods in the `production` namespace that waste memory limits
- Audit RBAC permissions across all namespaces for excessive privileges

## Similar
- [agent-kubernetes-specialist](https://affpapa.org/en/nevibecode/skills/agent-kubernetes-specialist.md) — skill · 101 installs
- [huawei-cloud-kubectl-cce-installer](https://affpapa.org/en/nevibecode/skills/huawei-cloud-kubectl-cce-installer.md) — skill · 141 installs
- [agent-install](https://affpapa.org/en/nevibecode/skills/agent-install.md) — skill · 477 installs
- [Azure Kubernetes Service (AKS)](https://affpapa.org/en/nevibecode/mcp/azure-kubernetes-service-aks.md) — MCP server
- [kubernetes-ops](https://affpapa.org/en/nevibecode/skills/kubernetes-ops.md) — skill · 454 installs
- [kubernetes-skill](https://affpapa.org/en/nevibecode/skills/kubernetes-skill.md) — skill · 1500 installs

From the same set: [rohitg00/kubectl-mcp-server](https://affpapa.org/en/nevibecode/by/rohitg00/kubectl-mcp-server.md) — 5 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
