trackmcp
Back to directory
Michael-WhiteCapData

WhiteCapData-Dev

View on GitHub

WhiteCapData-Dev — operate a k3s / Kubernetes cluster from your AI agent via MCP. pip install whitecapdata-dev

2 stars PythonOthers Updated Aug 10, 2026
claudedevopshomelabk3skubernetesmcpmodel-context-protocolpython

Documentation

WhiteCapData-Dev

Operate a k3s / Kubernetes cluster straight from your AI agent — safe by default.

CI
PyPI
Python
MCP
License: MIT

An MCP server that lets an agent (Claude Code, Claude Desktop, Cursor, …) inspect and operate a Kubernetes / k3s cluster — your homelab box, a dev cluster, whatever your kubeconfig points at — without shelling out to `kubectl`. It talks to the Kubernetes API directly using your existing kubeconfig (or an in-cluster service account).

The design goal is safe by default: reads are always on; every mutating action (restart / scale / delete) is gated *before the API call* by a read-only switch and a namespace allowlist, so an over-eager agent can't touch `kube-system` or nuke a deployment you didn't sandbox.

> Name note: the PyPI package is `whitecapdata-dev` (the `homelab-k8s`-style name was taken); the import package and tools are k8s/homelab-focused as described here.


Why you'd want this

  • 🩺 One-call health. `cluster_summary` gives node + pod totals and the unhealthy pods, so the agent starts triage with real data.
  • 🔒 Safe by default. Mutations are blocked unless the namespace is on your allowlist; flip `HOMELAB_MCP_READONLY=1` to make the whole server read-only.
  • 🧰 The operations you actually do. Pods, deployments, events, logs, node health, rollout-restart, scale, delete-pod.
  • 🪶 No bespoke backend. Uses the standard Kubernetes API + your kubeconfig — nothing to deploy server-side.
  • Tested. Pure logic is unit-tested with fakes; guard logic is tested against a mocked API. No cluster needed to run the suite.

Requirements

  • A reachable cluster and a working kubeconfig (the same one `kubectl` uses), or run it in-cluster with a service account.
  • Python 3.11+ (or just `uvx`).

Install

bash
uvx whitecapdata-dev          # run directly
# or
pip install whitecapdata-dev  # then run: whitecapdata-dev

Claude Code

bash
claude mcp add homelab -- uvx whitecapdata-dev

Claude Desktop / Cursor

jsonc
{
  "mcpServers": {
    "homelab": {
      "command": "uvx",
      "args": ["whitecapdata-dev"],
      "env": {
        "HOMELAB_MCP_MUTABLE_NAMESPACES": "default,apps,monitoring",
        "HOMELAB_MCP_READONLY": "0"
      }
    }
  }
}

Run with Docker

A `Dockerfile` is included. The server speaks MCP over stdio and reaches

your cluster through a mounted kubeconfig. Run interactively (`-i`), starting read-only:

bash
docker build -t whitecapdata-dev .
docker run --rm -i \
  -v "$HOME/.kube/config:/home/app/.kube/config:ro" \
  -e HOMELAB_MCP_READONLY=1 \
  whitecapdata-dev

Tools

ToolKindDescription
`cluster_summary`readNode/pod health totals + unhealthy pods
`list_pods`readPods (optionally one namespace), unhealthy first
`list_deployments`readDeployments with ready/desired replicas
`list_events`readRecent events, Warnings first
`pod_logs`readTail a pod's logs
`node_health`readPer-node readiness, kubelet, capacity, pressure
`restart_deployment`writeRollout-restart (allowlisted namespaces)
`scale_deployment`writeScale to N replicas (0..max, allowlisted)
`delete_pod`writeDelete a pod; its controller recreates it (allowlisted)
`server_info`readEffective config (context, read-only, allowlist)

Configuration

VariableDefaultDescription
`HOMELAB_MCP_CONTEXT`current-contextkubeconfig context to use
`HOMELAB_MCP_READONLY``0``1`/`true` disables all mutating tools
`HOMELAB_MCP_MUTABLE_NAMESPACES``default,apps,monitoring,ci`Namespaces mutations may touch; `*` = all
`HOMELAB_MCP_MAX_REPLICAS``10`Upper bound for `scale_deployment`

Safety model

1. Read-only switch — `HOMELAB_MCP_READONLY=1` rejects every mutating tool up front.

2. Namespace allowlist — mutating tools refuse any namespace not in `HOMELAB_MCP_MUTABLE_NAMESPACES` (default a homelab-friendly set; `*` opts into all).

3. Bounded scale — `scale_deployment` clamps to `0..HOMELAB_MCP_MAX_REPLICAS`.

The cluster's own RBAC still applies on top — this server can only do what the kubeconfig identity is permitted to do.

Development

bash
git clone https://github.com/Michael-WhiteCapData/WhiteCapData-Dev
cd WhiteCapData-Dev
uv pip install -e ".[dev]"
ruff check .
pytest          # no cluster required — APIs are faked/mocked

See CONTRIBUTING.md.

License

MIT © Michael Tierney

Frequently asked questions

What is WhiteCapData-Dev?

WhiteCapData-Dev is WhiteCapData-Dev — operate a k3s / Kubernetes cluster from your AI agent via MCP. pip install whitecapdata-dev

How do I install WhiteCapData-Dev?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is WhiteCapData-Dev open source?

Yes — it is hosted on GitHub at https://github.com/Michael-WhiteCapData/WhiteCapData-Dev and has 2 stars.

Related MCP tools

IBMmcp-context-forge

An AI Gateway, registry, and proxy that sits in front of any MCP, A2A, or REST/gRPC APIs, exposing a unified endpoint with centralized discovery, guardrails and management. Optimizes Agent & Tool calling, and supports plugins.

4,422 Python
agentsaiapi-gateway+17
OpenOSINTOpenOSINT

AI-powered OSINT agent with interactive REPL, MCP server, and CLI. 19 tools. Works with Claude, GPT-4, or local models. For authorized security research only.

1,523 Python
ai-agentanthropicclaude+16
riponcmprojectmem

Open-source coding agent memory. Records issues, attempts, fixes and decisions, then warns your agent before it repeats an approach that already failed. Native MCP server for Claude Code, Cursor, Antigravity and Codex. 100% local, no cloud, no telemetry. MIT.

796 Python
ai-agentsai-memoryai-tools+17
jgravellejcodemunch-mcp

Cut AI token costs 95%+ on code exploration. The leading MCP server for precise, symbol-level GitHub code retrieval via tree-sitter AST. Works with Claude Code, Cursor & any MCP client. 313B+ tokens saved.

2,651 Python
claudeclaude-codeai-coding+17
mukul975cve-mcp-server

Production-grade MCP server giving Claude 27 security intelligence tools across 21 APIs — CVE lookup, EPSS scoring, CISA KEV, MITRE ATT&CK, Shodan, VirusTotal, and more.

1,383 Python
cisa-kevclaude-aicve+15
pipeboard-cometa-ads-mcp

Meta Ads (Facebook/Instagram) MCP server for Claude, ChatGPT, Perplexity & Cursor — the Meta node of Pipeboard’s 5-platform family (+ Google, TikTok, Snap, Reddit). Hosted remote MCP, badged Meta Business Partner, free plan — no self-hosting required.

1,233 Python
advertisingai-agentschatgpt+7

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP