One command to give Claude Code full understanding of your infrastructure
opsmate launches MCP servers that connect Claude Code directly to Kubernetes, Docker, Prometheus, and your infra files. 30 DevOps tools. Zero copy-paste. Single binary.
Why?
You're debugging a production incident at 2 AM. You switch between kubectl, Prometheus dashboards, Docker logs, and ChatGPT — copy-pasting context back and forth. The AI doesn't know your cluster state. You waste precious time explaining what you're looking at.
opsmate fixes this. One command — and Claude Code can see your pods, query your metrics, read your logs, and lint your configs. It acts on live infrastructure, not stale copy-paste.
> Why is pod nginx-7b5f9 crashing?
[k8s_get_pods] [k8s_get_pod_logs] [k8s_describe] [prom_query]
Root cause: The container exceeds its 128Mi memory limit (~240Mi actual).
Recommended fix:
kubectl set resources deployment/nginx --limits=memory=512Mi
Terminal UI
opsmate launches a native terminal interface (TUI) built with bubbletea. Claude Code runs under the hood — you get streaming responses, tool-use indicators, and multi-turn conversations right in your terminal.
# Go install (recommended)
go install github.com/paffin/opsmate/cmd/opsmate@latest
# Or download binary
curl -sSL https://raw.githubusercontent.com/paffin/opsmate/main/scripts/install.sh | bash
# Or build from source
git clone https://github.com/paffin/opsmate && cd opsmate && go build -o opsmate ./cmd/opsmate
Prerequisites:Claude Code installed and authenticated.
* Destructive operations require confirmation and can be disabled with --readonly
Real-World Scenarios
Scenario 1: "Why is my pod crashing?"
> My nginx deployment keeps restarting, help me figure out why
Claude: Let me investigate...
[k8s_get_pods] → Found pod nginx-7b5f9 in CrashLoopBackOff
[k8s_get_pod_logs] → OOMKilled detected
[k8s_describe] → limits.memory: 128Mi
[prom_query] → container_memory_usage avg: 240Mi
Root Cause: OOMKilled — container uses ~240Mi but limit is 128Mi
Recommended actions:
1. Increase memory limit: kubectl set resources deploy/nginx --limits=memory=512Mi
2. Check for memory leaks in nginx config
Apply fix #1? [y/N]
Scenario 2: "Audit my Dockerfile"
> Analyze the Dockerfile in ./app/
Claude: Let me review it...
[file_lint ./app/Dockerfile]
Found 5 issues:
[!] CRITICAL: Running as root (no USER instruction)
[~] WARNING: Using latest tag (FROM node:latest)
[~] WARNING: No HEALTHCHECK defined
[i] INFO: Consider multi-stage build to reduce image size
[i] INFO: .dockerignore not found
Want me to generate a fixed version?
Scenario 3: "Give me a cluster overview"
> Show me what's happening in production
Claude: Collecting cluster status...
[k8s_get_nodes] → 3 nodes, all Ready
[k8s_top nodes] → CPU: 45%, Memory: 62%
[k8s_get_pods] → 47 pods, 2 not Running
[prom_alerts] → 1 firing: HighMemoryUsage on node-2
Cluster Overview:
Nodes: 3/3 healthy (CPU: 45%, Mem: 62%)
Pods: 45/47 running (2 pending in staging)
Alerts: 1 firing — HighMemoryUsage on node-2 (87%)
node-2 memory is at 87%. Want me to investigate which pods
are consuming the most memory?