# WhiteCapData-Dev

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/Michael-WhiteCapData/WhiteCapData-Dev  
**GitHub Stars:** 2  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/whitecapdata-dev

## Description
Operate a k3s / Kubernetes cluster from your AI agent — safe-by-default MCP server.

## Tools
Capabilities this server exposes over MCP:

- **cluster_summary** — Summarize overall cluster health in a single call.

    Start here when triaging a cluster: it returns node and pod totals plus the
    full list of unhealthy pods, giving the fastest picture of what is wrong
    before drilling in with `list_pods`, `pod_logs`, or `node_health`. Read-only.
    Returns a JSON object with node counts, pod phase totals, and unhealthy-pod
    details (name, namespace, phase, restart count).
    
- **list_pods** — List pods with phase, restart count, and node, unhealthy pods sorted first.

    Use after `cluster_summary` to enumerate pods, optionally scoped to one
    namespace, then feed a pod name into `pod_logs`. Read-only. Returns a JSON
    array of pod objects.
    
- **list_deployments** — List deployments with their ready/desired replica counts and namespace.

    Use to check rollout health or to find a deployment to `restart_deployment`
    or `scale_deployment`. A deployment whose ready count is below its desired
    count is still rolling out or degraded. Read-only. Returns a JSON array.
    
- **list_events** — Return recent cluster events, most relevant first (Warnings before Normal).

    Use to find out *why* something is unhealthy: scheduling failures, image-pull
    errors, failed probes, and OOM kills all surface here. Pair this with
    `cluster_summary` when a pod is failing but the reason is not obvious.
    Read-only. Returns a JSON array of up to `limit` events.
    
- **pod_logs** — Return the last `tail` lines of a single pod's logs as plain text.

    Use this to investigate a specific pod after `cluster_summary` or `list_pods`
    flags it as unhealthy (CrashLoopBackOff, restarts, errors). Reads the current
    container's stdout/stderr only — it does not follow/stream or fetch
    previous-container logs. Returns the raw log text, or an error message if the
    pod or namespace does not exist.
    
- **node_health** — Report per-node readiness, kubelet version, capacity, and pressure conditions.

    Use to diagnose node-level problems — NotReady nodes, or memory/disk/PID
    pressure — when pods are stuck Pending or being evicted. Read-only. Returns a
    JSON array with one object per node.
    
- **restart_deployment** — Trigger a rolling restart of a deployment (like `kubectl rollout restart`).

    Use to recycle a deployment's pods after a config/secret change or to clear a
    stuck state, without changing the replica count. Mutating: rejected unless
    read-only mode is off and the namespace is in the mutable-namespace allowlist.
    Returns a JSON status object describing the triggered rollout.
    
- **scale_deployment** — Scale a deployment to a specific replica count.

    Use to manually scale a workload up or down. Mutating: rejected unless
    read-only mode is off, the namespace is allowlisted, and `replicas` is within
    the operator's configured 0..max bound. Returns a JSON status object with the
    applied replica count.
    
- **delete_pod** — Delete a single pod so its controller recreates it.

    Use to force-recreate a wedged pod (managed by a Deployment, StatefulSet,
    etc.) without restarting the whole deployment. Mutating: rejected unless
    read-only mode is off and the namespace is allowlisted. Returns a JSON status
    object.
    
- **server_info** — Report the server's effective configuration.

    Returns the target kube context, the read-only flag, the mutable-namespace
    allowlist, and the maximum replica bound. Use this to confirm what the server
    is permitted to do before attempting a mutation, or to understand why a
    mutating call was rejected. Read-only. Returns a JSON object.
    

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "whitecapdata-dev": {
    "command": "uvx",
    "args": ["whitecapdata-dev"]
  }
}
```

## Documentation

## What WhiteCapData-Dev MCP server does

WhiteCapData-Dev MCP server exposes Kubernetes and k3s cluster operations as MCP tools for agents such as Claude Code, Claude Desktop, and Cursor. It connects directly to the Kubernetes API using the kubeconfig selected by the process, or an in-cluster service account when run inside Kubernetes. The server can inspect cluster state without invoking kubectl.

Read tools provide several levels of operational visibility:

- `cluster_summary` reports node and pod totals along with unhealthy pods.
- `list_pods` lists pods, optionally scoped to one namespace, with unhealthy entries first.
- `list_deployments` shows ready and desired replica counts.
- `list_events` returns recent events with warnings prioritized.
- `pod_logs` retrieves the tail of a pod's logs.
- `node_health` reports node readiness, kubelet state, capacity, and pressure.
- `server_info` shows the active context, read-only status, and mutation allowlist.

The write tools are `restart_deployment`, `scale_deployment`, and `delete_pod`. A deployment restart triggers a rollout restart. Scaling sets a deployment to a requested replica count, while pod deletion relies on the pod's controller to recreate it.

## How it works

The WhiteCapData-Dev MCP server communicates over MCP using stdio. The process reads Kubernetes connection details from the normal kubeconfig setup, including the configured context, or uses in-cluster authentication when applicable. It then makes API calls directly against the target cluster.

Mutations are checked before an API request is sent. The read-only setting can reject all write tools. When writes are enabled, the target namespace must be included in the configured mutable namespace list unless the list uses `*`. Scaling is additionally limited to zero through the configured maximum replica count. Kubernetes RBAC remains an additional boundary: the identity represented by the kubeconfig or service account still determines which API operations are permitted.

## Setup and configuration

Install with Python 3.11 or newer using either `uvx whitecapdata-dev` or `pip install whitecapdata-dev`. A reachable cluster and usable kubeconfig are required unless the process runs in-cluster with a service account.

The server accepts these optional environment variables:

- `HOMELAB_MCP_CONTEXT` selects the kubeconfig context; the current context is the default.
- `HOMELAB_MCP_READONLY` accepts `1` or `true` to disable mutations. Its default is `0`.
- `HOMELAB_MCP_MUTABLE_NAMESPACES` defines namespaces where writes are allowed. The default is `default,apps,monitoring,ci`; `*` permits all namespaces.
- `HOMELAB_MCP_MAX_REPLICAS` sets the upper bound for scaling and defaults to `10`.

It can also run in Docker with the kubeconfig mounted into the container. The documented container invocation starts in read-only mode.

## Tools and capabilities

The WhiteCapData-Dev MCP server is suited to agent-assisted diagnosis: an agent can summarize health, inspect unhealthy pods, compare deployment readiness, review warning events, read recent logs, and examine node pressure in separate calls. It can then perform narrowly scoped recovery actions when configuration allows them.

Restarting a deployment, changing its replica count, or deleting a pod requires both mutation access and an allowed namespace. `scale_deployment` also enforces the configured replica ceiling. These controls are application-level checks and do not replace cluster RBAC.

## Limitations and notes

The server does not deploy a backend service; it depends on access to the target Kubernetes API and the permissions of the selected identity. A missing, unreachable, or insufficiently authorized kubeconfig or service account will limit or prevent operations.

Write safety depends on the configured read-only flag, namespace list, and replica maximum. Setting the namespace allowlist to `*` broadens mutation scope, while read-only mode blocks every mutating tool. The project targets Python 3.11 or newer, and its tests use fakes and mocked APIs rather than requiring a live cluster.

_Full upstream README: https://allmcps.com/mcp/whitecapdata-dev/readme_

