# Repository Briefing: rohitg00/kubectl-mcp-server
> Source: https://repoforai.com/repo/rohitg00/kubectl-mcp-server (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/rohitg00/kubectl-mcp-server
- **Official Docs / Website**: https://hub.docker.com/mcp/server/kubectl-mcp-server/overview
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A (85/100 · Maintenance 26/35 · Adoption 19/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v2.0.0 (2026-10-22) — https://github.com/rohitg00/kubectl-mcp-server/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Docker, Self-Hosted, MCP, CLI
- **Momentum**: 974 ★ total (+0 24h / +0 7d) · 188 forks
- **Topics**: `ai`, `deployment`, `devops`, `genai`, `kubernetes`, `kubernetes-cluster`, `kubernetes-tools`, `llms`, `mcp`, `mcp-server`, `npm`, `pypi`
- **When to Use**: Best for: Platform and SRE teams that want assistants to correlate Kubernetes logs, events, manifests, and Helm releases across explicitly selected contexts, starting with a read-only rollout. Skip if: You need deterministic CI execution, deep coverage of a single controller, or cannot put least-privilege cluster credentials and a review of returned data in place.

## Overview
```text
### Architecture & Core Mechanics
kubectl-mcp-server is a Python MCP adapter between an AI client and Kubernetes. The Python entry point is `kubectl_mcp_tool.mcp_server`; the server uses `fastmcp>=4.1,<5`, and the dependency manifest also includes Pydantic, FastAPI, Uvicorn, Starlette, and the Kubernetes Python client. The core toolset wraps kubectl operations, and a separate toolset exposes Helm v3. Tool calls accept a Kubernetes context, so the client can select a cluster without changing the shared current context.

v2.0.0 supports stdio for client-launched processes and stateless Streamable HTTP under MCP 2026-07-28 for shared deployments, with negotiation for older clients. HTTP replicas do not need to share MCP session state, but they still need consistent tool configuration, authorization policy, and cluster access. Extensions are grouped into opt-in toolsets. With `--tool-search`, enabled tools beyond the defaults can be discovered through `search_tools` and invoked through `call_tool`; the same read-only, scope, and redaction controls apply.

### Key Capabilities & Differentiators
The default registry contains 26 tools across `core` and `helm`, down from 281 in the previous default. Generic get and describe operations cover built-in and custom resource kinds; logs and pod diagnostics support incident triage. The same default surface includes operations such as apply, patch, delete, and exec, so a smaller catalog does not mean read-only access. Helm v3 tools cover release lifecycle operations alongside resource inspection.

There are also 14 workflow prompts, 8 browsable resources, and 6 resource templates. Clients can browse contexts, namespaces, and cluster metadata or fetch named workload manifests; the Secret template masks data. Operators can opt into specific integrations such as GitOps, cert-manager, Velero, KEDA, or Cilium, and `detect_ecosystem` identifies installed operators and corresponding toolsets. Workflow prompts guide the assistant; they are not a substitute for reviewing a diagnosis or proposed change.

### Trade-offs & Limitations
Compared with direct kubectl and Helm, the MCP layer is useful when an assistant needs to correlate events, logs, manifests, and releases without repeated manual handoffs. It adds a client integration and an authorization layer to maintain, and model-selected actions are less predictable than a fixed CI step. Start with the default toolsets to limit tool-schema overhead, then add only what operators need. For work centered on a single controller, evaluate alternatives such as Argo CD MCP, Flux Operator MCP, or Kyverno MCP rather than assuming the general-purpose adapter covers the same depth.

Treat OAuth scopes, read-only mode, per-call confirmation, Secret redaction, and flag-injection guards as defense in depth, not substitutes for Kubernetes RBAC. Start with narrowly scoped Kubernetes credentials, require explicit context selection for sensitive work, and review both the enabled tools and the data returned to the client. A read-only kubeconfig mount prevents writes to the mounted files, not writes to the cluster. Secret redaction also does not make logs or arbitrary resource output safe to share.

### Hardware & Deployment Guide
For local stdio, run through `npx` with Node.js 18+, or install with `pip` or `uvx` using the documented Python 3.10+ baseline. Non-container setups need configured kubectl and access to a Kubernetes cluster; ensure Helm is available if you expose Helm tools. The Docker build uses Python 3.13 slim, fetches kubectl v1.37.1 and Helm v3.22.1, and verifies kubectl's SHA-256. The image runs as UID 10001 with `HOME=/home/mcp`; for local credentials, make sure that UID can read the kubeconfig mounted at `/home/mcp/.kube:ro` and that any files or credential helpers it references are available inside the container.

For shared HTTP, configure OAuth rather than relying on the explicit unauthenticated override, which is suitable only for deliberate loopback testing. Helm charts and deployment files provide an in-cluster path; use a dedicated, scoped service account there. Upgrade from v1.24.0 before rebuilding: its open-ended `fastmcp>=3.0.0b1` constraint can resolve to FastMCP 4 and fail at import, whereas v2.0.0 specifies `fastmcp>=4.1,<5`, adopts stateless transport, and tightens network exposure.
```

## Key Capabilities
```text
- Transport: v2.0.0 supports stdio and stateless Streamable HTTP under MCP 2026-07-28.
- Tool surface: The default registry contains 26 core and Helm tools; optional toolsets stay unregistered unless enabled.
- Discovery: With --tool-search, the server advertises the default tools plus search_tools and call_tool for on-demand discovery.
- MCP primitives: 14 workflow prompts, 8 resources, and 6 resource templates expose workflows and cluster data separately from tools.
- Access controls: OAuth 2.1 per-tool scopes, read-only mode, per-call confirmation, and Secret redaction complement Kubernetes RBAC.
- Operator CLI: info, tools, and call support direct verification; --json output and JSON arguments via stdin support scripting.
```

## Quick Start / Clone
```bash
# Run directly without installation - works instantly!
npx -y kubectl-mcp-server

# Or install globally for faster startup
npm install -g kubectl-mcp-server
```
