kube-sentinel-mcp
Provides tools for scanning Kubernetes clusters for incidents and unhealthy workloads, retrieving pod diagnostics and resource metrics, running root-cause analysis, and generating guardrail-protected remediation YAML diffs and kubectl patches.
Exposes an Alertmanager webhook endpoint that consumes firing Prometheus alerts and generates incident triage summaries and diagnostics.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kube-sentinel-mcp diagnose why checkout-api is in CrashLoopBackOff and propose a GitOps-safe fix"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π‘οΈ kube-sentinel-mcp
Autonomous Kubernetes SRE & Incident Diagnosis Engine powered by Model Context Protocol (MCP)
Real-time Kubernetes incident triage, automated Root Cause Analysis (RCA), and GitOps-ready remediation patches with safety guardrails.
Key Features β’ Architecture β’ Quickstart β’ Claude Desktop / MCP Setup β’ CLI Usage β’ Simulation Mode β’ Helm Deployment
π Overview
kube-sentinel-mcp bridges AI Agents (Claude, Antigravity, Bedrock, Cursor) and Kubernetes clusters via the open Model Context Protocol (MCP).
When pods enter CrashLoopBackOff, OOMKilled, ImagePullBackOff, or fail probes:
Telemetry Correlation: Pulls container exit codes, previous crash logs, cgroup memory peaks, and Kubernetes warning events.
Automated Root Cause Analysis (RCA): Synthesizes evidence to classify the incident and score confidence.
Guardrail-Protected Remediation: Generates a unified GitOps YAML diff and
kubectlpatch command while enforcing blast-radius checks (preventing unintended writes tokube-system).Zero-Cluster Simulation: Includes pre-packaged offline incident scenarios so developers and SREs can evaluate the agent without requiring a live cloud cluster.
Related MCP server: K8gentS
ποΈ Architecture
flowchart TD
subgraph ClientLayer["AI Agents & SRE Interfaces"]
Claude["Claude Desktop / Cursor / Antigravity"]
CLI["kube-sentinel CLI"]
Prom["Prometheus Alertmanager Webhook"]
end
subgraph SentinelCore["kube-sentinel-mcp Engine"]
MCPServer["MCP Server (JSON-RPC stdio / SSE)"]
Analyzer["Incident Analyzer & Correlation Engine"]
RCA["RCA Heuristic Engine (OOM, CrashLoop, Probes)"]
Remediator["Remediation Engine & Safety Guardrails"]
ClientSwitch{"Live Cluster Reachable?"}
end
subgraph DataPlane["Kubernetes Target"]
LiveK8s["Live K8s API (In-Cluster SA / Kubeconfig)"]
Simulator["In-Memory Incident Simulator (Offline Scenarios)"]
end
ClientLayer --> MCPServer
CLI --> Analyzer
Prom --> Analyzer
MCPServer --> Analyzer
Analyzer --> ClientSwitch
ClientSwitch -- Yes --> LiveK8s
ClientSwitch -- No / Simulate --> Simulator
Analyzer --> RCA
RCA --> Remediator
Remediator -->|"Unified YAML Diff & Kubectl Command"| ClientLayer⨠Key Features
Standard MCP Protocol: Exposes 7 tools (
k8s_scan_incidents,k8s_get_pod_diagnostics,k8s_get_resource_metrics,k8s_run_rca,k8s_generate_remediation,k8s_list_simulations,k8s_simulate_scenario).Deep Incident Diagnostics: Distinguishes between cgroup Linux OOMKiller (Exit 137), missing ConfigMap/Secret environment variables (Exit 1), image pull tag typos, and probe port mismatches.
GitOps-Ready Remediation: Produces clean unified YAML diffs ready for automated Git pull requests (ArgoCD / Flux) or instant CLI hotfixes.
Safety Guardrails: Blocks automated remediation on critical system namespaces (
kube-system,kube-public,cert-manager) and verifies replica redundancy before rolling restarts.Alertmanager Webhook: Direct endpoint to consume firing Prometheus alerts and generate instant triage summaries.
Zero External Dependencies Required for Demo: Bundles full offline scenarios.
π Quickstart
1. Installation
git clone https://github.com/ekrmcakir/kube-sentinel-mcp.git
cd kube-sentinel-mcp
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install in editable mode
pip install -e ".[dev]"2. Verify Installation
kube-sentinel versionπ₯οΈ CLI Usage
Scan Cluster for Incidents
Scan an active cluster (or use --simulate for offline mode):
kube-sentinel scan --simulateOutput:
Active Incidents & Unhealthy Workloads (4 detected)
ββββββββββββββββ³βββββββββββββ³ββββββββββ³βββββββββββββββ³βββββββββββ³βββββββββββββββ
β Pod Name β Namespace β Phase β Owner β Restarts β Primary β
β β β β β β Reason β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β auth-service β auth β Running β Deployment/β¦ β 12 β CrashLoopβ¦ β
β cart-service β ecommerce β Pending β Deployment/β¦ β 0 β ImagePullβ¦ β
β payment-api β production β Running β Deployment/β¦ β 8 β OOMKilled β
β orders-api β production β Running β Deployment/β¦ β 6 β Not Ready β
ββββββββββββββββ΄βββββββββββββ΄ββββββββββ΄βββββββββββββββ΄βββββββββββ΄βββββββββββββββRun Root Cause Analysis (RCA) & Remediation
kube-sentinel diagnose --pod payment-api-7b8f94cb4d-x92zk --simulateRich Terminal Output displays:
RCA Severity & Category (
CRITICAL,OOM_KILLED, 98% confidence)Corroborated Telemetry (Linux cgroup peak memory: 256MB / 256MB, exit code 137, event details)
Safety Guardrail Audit (
PASSED- Non-system workload namespace)Unified YAML Diff (doubling memory requests & limits)
Ready-to-run
kubectlcommand
π₯οΈ SRE War-Room Web UI Dashboard
Launch the reactive, dark-mode SRE dashboard right in your browser:
kube-sentinel ui --port 8080 --simulateOpen http://localhost:8080 to inspect live anomaly feeds, memory utilization gauges, and apply 1-click GitOps patches.
π€ Claude Desktop / MCP Setup
Integrate Sentinel directly into your Claude Desktop, Cursor, or Antigravity agents.
Add to your claude_desktop_config.json:
{
"mcpServers": {
"kube-sentinel": {
"command": "/path/to/kube-sentinel-mcp/.venv/bin/kube-sentinel",
"args": ["serve", "--transport", "stdio"]
}
}
}Or run as a remote SSE service on a cluster:
kube-sentinel serve --transport sse --port 8000π§ͺ Zero-Cluster Simulation Mode
Evaluate all RCA rules without needing access to a real Kubernetes cluster:
# List available mock incident scenarios
kube-sentinel simulate
# Trigger OOMKilled scenario
kube-sentinel simulate --scenario oom-crash-payment
# Trigger missing environment variable crash loop
kube-sentinel simulate --scenario crashloop-missing-env
# Trigger image tag typo scenario
kube-sentinel simulate --scenario imagepull-typo-tagπ¦ Helm Chart Deployment
Deploy Sentinel in-cluster with read-only cluster role permissions:
helm upgrade --install kube-sentinel ./helm/kube-sentinel-mcp \
--namespace kube-system \
--set replicaCount=1π§ͺ Running Tests
pytest tests -vAll 10 unit and integration tests validate MCP tool definitions, RCA classifiers, safety guardrails, and Alertmanager ingestion.
π License
Distributed under the MIT License. Copyright (c) 2026 Ekrem Cakir.
Available Tools
7 toolsk8s_generate_remediationB
Generate a non-destructive remediation plan, unified GitOps YAML diff, and kubectl command. Includes automated safety validation guardrails (blast radius and system namespace protection).
Inputs: pod_name (required), namespace. Returns: result
k8s_get_pod_diagnosticsB
Retrieve deep diagnostic information for a specific Kubernetes pod. Fetches container states, exit codes, restart counts, tail logs, previous crash logs, and events.
Inputs: pod_name (required), namespace. Returns: result
k8s_get_resource_metricsC
Fetch CPU and Memory metrics, requests, limits, and utilization percentages for a pod.
Inputs: pod_name (required), namespace. Returns: result
k8s_list_simulationsA
List all available built-in incident simulation scenarios (OOM, CrashLoop, ImagePull, Probe failures).
Inputs: no named parameters. Returns: result
k8s_run_rcaC
Execute automated Root Cause Analysis (RCA) on an unhealthy pod. Classifies incident severity, failure category, synthesizes evidence, and assesses service impact.
Inputs: pod_name (required), namespace. Returns: result
k8s_scan_incidentsA
Scan the Kubernetes cluster or specified namespace for unhealthy workloads. Identifies pods in CrashLoopBackOff, OOMKilled, ImagePullBackOff, Error, or Pending states.
Inputs: namespace. Returns: result
k8s_simulate_scenarioB
Trigger an end-to-end incident triage on a built-in simulation scenario. Returns a complete incident report including root cause and remediation.
Inputs: scenario_id (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 7 tools
Each tool targets a distinct step in the Kubernetes incident workflow: scanning, pod diagnostics, metrics, RCA, remediation generation, and simulation listing/execution. The boundaries between diagnostics and RCA are clear because one retrieves evidence while the other analyzes and classifies it.
All tools use the same k8s_ prefix followed by a predictable verb_noun pattern, such as k8s_scan_incidents, k8s_get_pod_diagnostics, and k8s_generate_remediation. The naming is consistent throughout.
Seven tools is well-scoped for an incident triage and remediation assistant. Each tool covers a meaningful stage of the workflow without redundant or filler operations.
The surface covers scanning, deep diagnostics, metrics, RCA, remediation planning, and simulations, which is strong lifecycle coverage for incident triage. Minor gaps remain, such as no explicit tool for applying or verifying a remediation, though that may be intentional given the non-destructive design.
Maintenance
Related MCP Connectors
AI SRE: investigate production incidents across your observability stack.
Autonomous and governed SRE & MLOps control plane for AI agent platforms.
Fail-closed policy guardrails for AI agents running kubectl, terraform, helm, and argocd.
Read-only production context for AI agents: Docker/K8s health, deploys, logs, traffic, code graph
Related MCP Servers
- AlicenseBqualityDmaintenanceAI-powered Kubernetes diagnostics that analyzes pod crashes, logs, and cluster health to provide root cause analysis and actionable solutions for common issues like CrashLoopBackOff, OOM kills, and connection errors.811 npm1MIT
- FlicenseNot gradedqualityDmaintenanceA Kubernetes diagnostic agent that provides on-demand root cause analysis and human-in-the-loop remediation via Slack, using LLM reasoning with OPA-bounded security controls.1-
- FlicenseNot gradedqualityCmaintenanceEnables users to investigate infrastructure incidents in plain English, correlate observability and deploy data with runbooks, and get evidence-backed root-cause proposals with approval-gated remediation.5-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to autonomously investigate simulated production incidents by checking live service health, logs, deployments, and database status while retrieving relevant historical postmortems and runbooks to propose evidence-backed root causes.-