# Kubernetes

An MCP server that connects to the Kubernetes cluster you already use and hands the agent kubectl tools: pods, logs, manifests.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: flux159
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/flux159/mcp-server-kubernetes
- Updated: 2026-10-29
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/kubernetes

## What it does

It runs as `npx mcp-server-kubernetes` and drives the `kubectl` already on your machine. The agent gets `kubectl_get`, `kubectl_describe`, `kubectl_create`, `kubectl_apply`, `kubectl_delete`, `kubectl_logs`, `kubectl_context` and `explain_resource`. So listing pods, pulling container logs or applying a manifest no longer means a second terminal window.

By default the server reads `~/.kube/config`, and it can pull kubeconfig from several sources in priority order. On Claude a single command registers it: `claude mcp add kubernetes -- npx mcp-server-kubernetes`. Cursor takes the entry in `~/.cursor/mcp.json` or a project `.cursor/mcp.json`.

Put `kubectl` in `PATH` and have a kubeconfig whose contexts actually work. Try `kubectl get pods` first; when that call fails, the server's tools fail the same way. Helm v3 belongs in `PATH` only if you plan to touch Helm releases.

## 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
- list pods and their state without switching to a terminal
- read container logs from a pod that keeps restarting
- apply a manifest from `deploy.yaml` to the current context
- move between kubectl contexts across clusters
- look up what a resource field means with `explain_resource`

## Example prompts
- List every pod in `default` and describe the ones that aren't in Running
- Grab the logs from the `api` container in that pod
- Switch to the `staging` context and apply `deploy.yaml`

## Similar
- [kubernetes-ops](https://affpapa.org/en/nevibecode/skills/kubernetes-ops.md) — skill · 454 installs
- [agent-kubernetes-specialist](https://affpapa.org/en/nevibecode/skills/agent-kubernetes-specialist.md) — skill · 101 installs
- [huawei-cloud-cce-kubernetes-event-analyzer](https://affpapa.org/en/nevibecode/skills/huawei-cloud-cce-kubernetes-event-analyzer.md) — skill · 162 installs
- [Azure Kubernetes Service (AKS)](https://affpapa.org/en/nevibecode/mcp/azure-kubernetes-service-aks.md) — MCP server
- [k8s-diagnostics](https://affpapa.org/en/nevibecode/skills/k8s-diagnostics.md) — skill · 1 install
- [k8s-debug](https://affpapa.org/en/nevibecode/skills/k8s-debug.md) — skill · 939 installs

---
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
