K8s AIops logo

K8s AIops

Governed Kubernetes operations over MCP with audit logging, dry runs, budgets, undo records, and read-only diagnostics.

Install K8s AIops

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "k8s-aiops": {
      "command": "uvx",
      "args": [
        "k8s-aiops"
      ],
      "env": {
        "K8S_AIOPS_CONFIG": "YOUR_VALUE_HERE",
        "K8S_AIOPS_HOME": "YOUR_VALUE_HERE",
        "K8S_AUDIT_APPROVED_BY": "YOUR_VALUE_HERE",
        "K8S_AUDIT_RATIONALE": "YOUR_VALUE_HERE",
        "KUBECONFIG": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

k8s AIops MCP server exposes governed Kubernetes operations to AI agents through MCP and a standalone CLI. It connects to clusters through the user's kubeconfig, including standard Kubernetes, k3s, EKS, GKE, AKS, kind, and minikube. Every call is recorded in a local SQLite audit database, while writes support dry-run previews, budget controls, risk labels, and undo metadata where an inverse exists. Reach for it when an agent needs Kubernetes read and write access with traceable operations and read-only pod or workload diagnostics.

Use cases

  • Inspect Kubernetes workloads and cluster health through an AI agent
  • Preview and audit deployment scaling or restart operations
  • Track reversible cluster changes with recorded undo metadata
  • Diagnose pod health and workload readiness without modifying resources
  • Connect agents to multiple kubeconfig contexts with named targets

Key features

  • 55 governed MCP tools for common Kubernetes resources and operations
  • Local SQLite audit log with risk-tier labels and outcome summaries
  • Dry-run previews, runaway budget protection, and undo descriptors
  • Kubeconfig-based access for Kubernetes, k3s, EKS, GKE, AKS, kind, and minikube
  • Read-only pod-health and workload-readiness diagnostics
  • CLI and standalone MCP server modes

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

18/20 checks healthy over the last 111d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · k8s-aiops (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit1mo agoMost recent push to the default branch.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How K8s AIops works

What k8s AIops does

k8s AIops provides Kubernetes operations for AI agents through MCP and a command-line interface. Its coverage includes pods, deployments, statefulsets, daemonsets, replicasets, jobs and cronjobs, services, ingresses, endpoints, configmaps, secrets by names and keys only, persistent volumes and claims, storage classes, nodes, namespaces, events, and rollout actions.

The package also includes cluster health reporting, pod and node descriptions, pod and node resource views, and read-only diagnostics. The pod-health and workload-readiness diagnostics produce root-cause findings ordered from the most serious issue first.

Operations are wrapped by a bundled governance layer. Each call is written to ~/.k8s-aiops/audit.db by default, with audit data relocatable through K8S_AIOPS_HOME. Audit entries include a descriptive risk tier, and destructive operations capture prior state plus an inverse action when one is available.

How it works

Authentication and authorization remain with Kubernetes. The server uses a selected kubeconfig context, so client certificates, bearer tokens, and EKS, GKE, or AKS exec plugins are handled by the kubeconfig rather than by a separate credential store. Named targets can map friendly names to kubeconfig contexts and optional default namespaces.

The governance layer is a safety and traceability mechanism, not an authorization policy. It does not provide a read-only mode, policy file, or approval gate. Kubernetes RBAC and the connected ServiceAccount determine whether an operation is permitted. A read-only RBAC context causes attempted writes to fail at the API server.

Write tools accept dry_run=True and return a preview without changing the cluster or recording an undo action. A runaway budget guard limits excessive activity. Audit rows contain outcome summaries instead of complete API responses, and API text is sanitized by removing control and format characters and applying truncation.

Setup and configuration

Install the standalone package with uv tool install k8s-aiops, then run k8s-aiops init to register named kubeconfig targets. The current kubeconfig context can also be used directly with commands such as k8s-aiops doctor or k8s-aiops pod list.

A configuration file at ~/.k8s-aiops/config.yaml can define targets with a name, context, optional namespace, and optional alternate kubeconfig path. Credentials are not stored in this file. Start the MCP transport with the k8s-aiops mcp command; a typical client configuration passes K8S_AIOPS_CONFIG in the server environment.

MCP clients may start servers with a clean environment. Set relevant variables, including KUBECONFIG for a non-default kubeconfig location and audit-related settings such as K8S_AIOPS_HOME, K8S_AUDIT_APPROVED_BY, and K8S_AUDIT_RATIONALE, in the client's environment block rather than relying on shell exports.

Claude Code can install the combined skill and MCP server through the AIops-tools marketplace. An OpenClaw plugin is also available; its MCP package is fetched with uv, so uvx must be available on PATH.

Tools and capabilities

The MCP tool set covers common Kubernetes lifecycle and inspection tasks, including:

  • Listing, inspecting, scaling, restarting, and deleting supported workloads.
  • Managing services, ingresses, endpoints, configmaps, secrets metadata, storage resources, namespaces, nodes, and events.
  • Checking rollout status and history, then undoing, pausing, resuming, or changing an image.
  • Describing pods and nodes, viewing pod and node resource usage, and generating a cluster health summary.
  • Running read-only pod-health and workload-readiness diagnostics.
  • Previewing writes with dry-run responses and retaining audit and undo information for executed changes.

Limitations and notes

Coverage focuses on common cluster operations and is not exhaustive. End-to-end verification has been performed against a live kind cluster, while the diagnostics and RCA tools have been mock-tested. The project is community-maintained and is not affiliated with or endorsed by Kubernetes, the Cloud Native Computing Foundation, or k3s/Rancher.

k8s AIops does not provide an encrypted secret store and does not save cluster credentials. Secret operations expose names and keys only. Real writes stop before contacting the platform if a required pending audit row cannot be committed; reads and previews can continue with a warning. Risk labels and budget controls do not replace Kubernetes authorization.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about K8s AIops

k8s AIops is an MCP server that connects AI agents to Kubernetes clusters through kubeconfig and exposes governed tools for reading resources, changing workloads, managing rollouts, inspecting health, and running read-only diagnostics. It records calls in a local audit database and supports dry-run previews, budget protection, and undo metadata.

Install it as a standalone package with `uv tool install k8s-aiops`, then run `k8s-aiops init` or start `k8s-aiops mcp` directly. Claude Code and OpenClaw also provide plugin installation paths that bundle the MCP server with its related skill.

k8s AIops connects through kubeconfig. Select the current context or define named targets in `~/.k8s-aiops/config.yaml`; authentication can use client certificates, tokens, or EKS, GKE, and AKS exec plugins supplied by the kubeconfig.

Yes. Every MCP write tool accepts `dry_run=True` and returns a preview without changing the cluster or recording an undo action. CLI write commands also support `--dry-run`.

No. Kubernetes RBAC and the permissions of the selected context or ServiceAccount decide whether writes succeed. The server adds audit logging, risk labels, budget protection, dry runs, and undo recording, but it does not provide a policy file or approval gate.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewK8s AIops AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/k8s-aiops?style=directory)](https://allmcps.com/mcp/k8s-aiops)
HTML Embed
<a href="https://allmcps.com/mcp/k8s-aiops"><img src="https://allmcps.com/api/badge/k8s-aiops?style=directory" alt="K8s AIops on AllMCPs" /></a>