kube-assistant-mcp
Generates minimal, valid Helm chart skeletons for Kubernetes applications, including Deployment and Service templates.
Provides tools for scanning Kubernetes clusters for failing pods, diagnosing issues through logs and events, applying guarded fixes (e.g., restart, memory patch), and generating deployment manifests.
Click on "Install 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-assistant-mcpDiagnose pod api-7f8c9d in production and suggest a 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-assistant-mcp
Agentic Kubernetes troubleshooting — as a CLI and as an MCP server.
kube-assistant-mcp connects a local LLM (via Ollama) or a hosted one (OpenAI-compatible) to your Kubernetes cluster. It scans for failing Pods (CrashLoopBackOff, OOMKilled, ImagePullBackOff, ...), correlates logs + events, explains the root cause in plain language, and proposes concrete, runnable fixes — or generates ready-to-use Deployment/Helm manifests.
It ships two ways to use it:
CLI —
kube-assistant scan / diagnose / fix / generateMCP server — the same capabilities exposed as tools for Cursor or Claude Desktop, so an AI agent can diagnose and (with your explicit confirmation) fix your cluster in natural language.
$ kube-assistant scan -n production
┏━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┓
┃ Namespace ┃ Pod ┃ Issue ┃ Restarts ┃ Severity ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━┩
│ production │ api-7f8c9d │ CrashLoopBackOff │ 14 │ critical │
│ production │ worker-2 │ OOMKilled │ 3 │ high │
└────────────┴──────────────┴──────────────────┴──────────┴──────────┘Why
Debugging a failing Pod is a repetitive, mechanical loop: describe → logs --previous → get events → guess → fix. This tool automates the mechanical part and hands the LLM only the relevant, structured context it needs to actually help — instead of dumping a whole terminal session into a chat window.
Related MCP server: k8s-mcp-server
Features
Detection — classifies container states (
waiting/terminatedreasons) into known failure types with a severity score.Log analysis — regex-based pattern matching for common root causes (OOM, connection refused, DNS failure, missing env vars, permission errors, bad config, port conflicts, unhandled exceptions) — works even with the LLM turned off.
LLM diagnosis — sends a compact, structured JSON payload (issue + log tail + recent events) to Ollama or an OpenAI-compatible endpoint and gets back a plain-language explanation plus a list of concrete fixes.
Guarded auto-fix — every mutating action (pod restart, resource patch) is dry-run by default and requires an explicit
confirm=True/--yesbefore it touches the cluster.Manifest generation — emits a Deployment+Service YAML pair, or a minimal, valid Helm chart skeleton.
MCP server — built with FastMCP; drop it into Cursor or Claude Desktop and diagnose your cluster conversationally.
Installation
Option A — from PyPI
pip install kube-assistant-mcp
kube-assistant doctor # checks Python/kubectl/cluster/Ollama and tells you what's missingOption B — from source (one command)
git clone https://github.com/yonatani94/kube-assistant-mcp
cd kube-assistant-mcp
make setup # creates a venv, installs everything, runs the doctor check
source .venv/bin/activateEither way, kube-assistant doctor is the entry point: it verifies Python 3.10+,
kubectl + cluster connectivity, and your configured LLM backend (Ollama or
OpenAI) in one shot, and tells you exactly what to install or run next —
no guessing required.
Requires Python 3.10+ and a working kubeconfig (the same one kubectl uses).
For LLM-powered diagnosis, either run Ollama locally
(ollama pull llama3.1) or export OPENAI_API_KEY and pass --llm-backend openai.
New to any of this? See PREREQUISITES.md for full install instructions (Python, kubectl, Ollama) and a hardware/model-size guide.
CLI usage
# List every failing pod in the cluster (or one namespace)
kube-assistant scan -n production
# Deep-dive: logs + events + LLM root-cause explanation + fix suggestions
kube-assistant diagnose api-7f8c9d -n production
# Same, but skip the LLM call and only use the rule-based fixes
kube-assistant diagnose api-7f8c9d -n production --no-llm
# Preview a fix (default: dry-run, no cluster mutation)
kube-assistant fix api-7f8c9d -n production --strategy restart
# Actually apply it (still asks for interactive confirmation unless -y)
kube-assistant fix api-7f8c9d -n production --strategy restart --no-dry-run
# Raise a Deployment's memory limit
kube-assistant fix api-7f8c9d -n production --strategy memory-patch \
--deployment api --memory-limit 1Gi --no-dry-run
# Generate a plain manifest or a Helm chart
kube-assistant generate myapp --image myrepo/myapp:1.4.0 --kind manifest
kube-assistant generate myapp --image myrepo/myapp:1.4.0 --kind helmUsing it as an MCP server (Cursor / Claude Desktop)
Start it directly:
kube-assistant serveOr point your MCP client config at it. Example for Claude Desktop
(claude_desktop_config.json):
{
"mcpServers": {
"kube-assistant": {
"command": "kube-assistant",
"args": ["serve"]
}
}
}Exposed tools: list_failing_pods, get_pod_logs, diagnose_pod, apply_fix (dry-run by default, needs confirm=true), generate_manifest.
Configuration
Env var | Default | Purpose |
|
|
|
|
| Model name |
|
| Ollama endpoint |
| — | Required when backend= |
Architecture
CLI (Typer) ──┐
├──> K8sClient (kubernetes python client)
MCP (FastMCP)─┘ │
▼
LogAnalyzer (regex patterns)
│
▼
RuleBasedFixer + LLMClient (Ollama / OpenAI)
│
▼
AutoFixer (dry-run gated apply)
│
▼
ManifestGenerator (YAML / Helm)Development
git clone https://github.com/yonatani94/kube-assistant-mcp
cd kube-assistant-mcp
make setup
pytestThe test suite mocks the Kubernetes API and the LLM backend, so pytest runs with no cluster and no network access.
Safety notes
This tool can delete Pods and patch Deployments. It is designed defensively:
Every write path defaults to
dry_run=True.A mutation only happens when the caller passes both
dry_run=Falseandconfirm=True(CLI:--no-dry-run+ interactive confirm or--yes; MCP:confirm=true).It never deletes namespaces, PVCs, or Secrets.
Still, review the generated plan before confirming, especially in production namespaces.
License
MIT — see LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAn MCP server that enables AI assistants to interact with Kubernetes clusters by translating natural language into kubectl and Helm operations. It allows users to query, manage, and diagnose Kubernetes resources and cluster states through a seamless integration.Last updated19Apache 2.0
- Alicense-qualityBmaintenanceAn MCP server that lets AI assistants safely inspect and operate on Kubernetes clusters through natural conversation.Last updatedMIT
- Alicense-qualityDmaintenanceA lightweight MCP server that enables natural language interaction with Kubernetes clusters, allowing management of pods, deployments, namespaces, and cluster resources through conversational queries or API endpoints.Last updated1MIT
- FlicenseAqualityCmaintenanceAI-powered MCP server for enterprise OpenShift/Kubernetes cluster management, providing diagnostic tools, RAG knowledge retrieval, and autonomous remediation recommendations.Last updated9
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yonatani94/kube-assistant-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server