# kaka-milan-22/kops [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/kaka-milan-22/kops  
**GitHub Stars:** 1  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/kaka-milan-22-kops

## Description
Read-only kubectl for Claude Code: returns structured JSON, hardcoded safe verbs (no mutation path even with malicious input), Secret/ConfigMap values never returned, plus one-shot cluster triage & inventory.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/kaka-milan-22/kops), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/kaka-milan-22/kops.git
```

2. Install:

```sh
cd kops
```

3. Install:

```sh
uv sync
```

4. Add to Claude Code:

```sh
claude mcp add -s user kops -- uv --directory /path/to/kops run kops
```

5. Add to Claude Code:

```sh
claude mcp add -s user -e KUBECONFIG=/path/to/qa-cluster.yaml \
  kops-qa -- uv --directory /path/to/kops run kops
```

## Documentation

## What kaka-milan-22/kops does

kaka-milan-22/kops connects an MCP client to a Kubernetes cluster through the local `kubectl` command. It is designed for inspection rather than administration: every exposed operation is read-only, and there is no tool path for changing resources or opening an interactive container session.

The server provides six tools:

- `k8s_get` retrieves resources and reduces each result to diagnostic fields suited to agent use.
- `k8s_describe` returns the text produced by `kubectl describe` for one resource.
- `k8s_logs` reads pod logs with controls for tail length, age, and previous containers.
- `k8s_events` finds recent events using namespace, kind, and name filters.
- `k8s_triage` performs a combined health scan for problem pods, warning events, unhealthy nodes, and stale deployments.
- `k8s_inventory` builds a broader cluster or namespace snapshot for documentation and audit work.

## How it works

kaka-milan-22/kops runs as a stdio MCP process and invokes `kubectl` with argument lists rather than shell command strings. The active kubeconfig context is used by default. A context argument can select another Kubernetes context, while a separate server registration with `KUBECONFIG` provides stronger configuration isolation for another cluster.

Resource results are summarized instead of returning full Kubernetes objects. Depending on kind, summaries can include readiness, replica counts, images, resource requests and limits, node addresses, service ports, ingress hosts, labels, and failure reasons. CPU values are normalized to millicores and memory to binary units. The inventory groups results by namespace and includes counts for pods, nodes, workloads, services, configuration objects, and supported optional resources.

The two aggregate tools reduce repeated requests. Triage fans out several checks concurrently, while inventory gathers more than a dozen categories concurrently and assembles them locally. Pod lists are intentionally omitted from inventory because they can become large; use triage or `k8s_get` for pod detail.

## Setup and configuration

Install `uv` and ensure `kubectl` is available on `PATH`. Clone the repository, enter its directory, and run `uv sync`. Start the server with `uv run kops`, or register that command in Claude Code using the absolute repository path. Claude Code then exposes names such as `mcp__kops__k8s_get` and `mcp__kops__k8s_triage`.

For another cluster, create a separate MCP entry and set its `KUBECONFIG` value to the desired kubeconfig file. The repository also documents MCP Inspector and `mcp dev` workflows for interactive testing, plus a protocol smoke test that performs initialization before requesting the tool list.

## Limitations and notes

kaka-milan-22/kops never returns ConfigMap data or Secret values. Inventory includes only metadata such as names, key lists, and ages for those objects. Actual configuration content must be obtained separately with explicit permission.

Names, namespaces, containers, and selectors are validated before execution. Kubectl calls have a 30-second timeout; describe output is capped at 30 KB, logs at 50 KB, and requested log tails at 1,000 lines. Unsupported or absent optional resource kinds may be skipped by aggregate operations. The server depends on the caller's Kubernetes permissions and the availability of the configured cluster context.

_Full upstream README: https://allmcps.com/mcp/kaka-milan-22-kops/readme_

