# K8gentS — Kubernetes RCA MCP Server [Health: Active]

**Category:** ☁️ Cloud Platforms  
**Repository:** https://github.com/JDoornink/K8gentS  
**GitHub Stars:** 1  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/k8gents-kubernetes-rca-mcp-server

## Description
Autonomous Kubernetes RCA agent with OPA Gatekeeper sandbox and MCP diagnostics for Claude/Cursor.

## 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/JDoornink/K8gentS), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Configure:

```sh
helm dependency update deploy/helm/k8gents
```

2. Install:

```sh
helm install k8gents deploy/helm/k8gents \
  --namespace k8gent-system \
  --create-namespace \
  --set secrets.aiApiKey="YOUR_GEMINI_KEY" \
  --set secrets.slackBotToken="xoxb-..." \
  --set secrets.slackAppToken="xapp-..." \
  --set secrets.slackChannelId="C12345678" \
  --set secrets.allowedApprovers="U123456,U789012"
```

## Documentation

## What K8gentS — Kubernetes RCA MCP Server MCP server does

K8gentS — Kubernetes RCA MCP Server monitors a Kubernetes cluster for warning events and operational failure signals, including crashed pods, `CrashLoopBackOff`, `OOMKilled`, connectivity or DNS problems, database deadlocks, and missing secrets or configuration. When it detects an anomaly, it gathers relevant operational context and sends a sanitized diagnostic prompt to an LLM reasoning engine.

The resulting analysis contains a description of the issue, three possible root causes with confidence metrics, and step-by-step resolution guidance. Slack is used to deliver these findings and to collect an approval decision for proposed remediation. The MCP diagnostic integration is described for Claude and Cursor.

## How it works

The agent watches the Kubernetes event stream and retrieves recent logs, pod descriptions, and event history when an issue requires investigation. A regex-based sanitization step removes items such as IP addresses, JWTs, API keys, and email addresses before the context reaches the LLM.

The default operating mode is read-only. If remediation is enabled and a reviewer selects the approval action in Slack, the change runs in a short-lived Kubernetes Job using a separate executor service account. OPA Gatekeeper policies are applied at API admission time to restrict that executor independently of RBAC. The documented policy prevents changes to the service account, use of `hostNetwork` or `hostPID`, activity in `kube-system`, and mutations outside pods and deployments.

Slack communication uses Socket Mode, so the deployment does not require an exposed inbound endpoint or Ingress rule. Event debouncing and hourly circuit breakers limit repeated processing and API usage.

## Setup and configuration

K8gentS — Kubernetes RCA MCP Server is packaged as a Helm chart with OPA Gatekeeper declared as a chart dependency. The documented prerequisites are Kubernetes 1.20 or newer, Helm 3, authenticated `kubectl`, a Google Gemini API key, and a Slack app configured for Socket Mode and interactive components.

Required deployment values include `AI_API_KEY`, `SLACK_BOT_TOKEN`, `SLACK_APP_TOKEN`, `SLACK_CHANNEL_ID`, and `ALLOWED_APPROVERS`. The Slack bot needs `chat:write` and `chat:write.public` scopes, must be invited to the destination channel, and requires a comma-separated list of approved Slack user IDs.

The installation process builds and pushes the agent image, updates the chart image repository, fetches chart dependencies, and installs the chart into a Kubernetes namespace. `WATCH_NAMESPACES` can limit monitoring to selected comma-separated namespaces or use `all` for cluster-wide watching. `AI_MODEL` selects a model supported by the Google GenAI SDK, while `LOG_LEVEL` controls Python logging. The documented remediation modes are `api` and `subprocess`.

## Tools and capabilities

- Monitor Kubernetes warning events and selected failure conditions.
- Collect logs, pod descriptions, and event history for diagnosis.
- Produce three ranked RCA hypotheses with confidence metrics.
- Send diagnostic results and approval controls through Slack Socket Mode.
- Expose MCP diagnostics for use with Claude and Cursor.
- Execute approved remediation in an ephemeral, policy-bounded Job.

## Limitations and notes

K8gentS — Kubernetes RCA MCP Server relies on non-deterministic LLM reasoning, so its hypotheses and confidence values are not equivalent to deterministic checks or calibrated probabilities. The project identifies confidence calibration, evaluation of novel failures, monitoring the monitoring service, and model selection as open design questions.

Remediation is not unrestricted: it requires human approval, runs under a separate executor identity, and is constrained by OPA Gatekeeper policies. The README names Claude and Cursor as MCP clients but does not specify additional client compatibility or individual MCP tool names.

_Full upstream README: https://allmcps.com/mcp/k8gents-kubernetes-rca-mcp-server/readme_

