
mcp kubectl server
mcp-k8's-server
Repository Info
About This Server
mcp-k8's-server
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
🤖 AI-Powered Kubernetes Assistant with MCP
An AI-driven Kubernetes assistant built using Model Context Protocol (MCP) that enables natural language interaction with your Kubernetes cluster. It supports dynamic tooling, safe command generation, Helm integration, and real-time AI explanations — all from a clean web UI.
🚀 Key Features
🧠 Natural Language Kubernetes Control
- Convert natural language queries into safe
kubectl/helmcommands using Groq/OpenAI (LLM). - Auto-validates generated commands (
get,describe,logs,top, etc.). - Fallback mechanism for unsupported or unsafe commands.
🔧 Tool-Based Architecture
Each Kubernetes operation is modularized as a tool, invoked dynamically via MCP based on user intent.
🛠️ Available Tools
naturalLanguageKubectl— Parse and run safe Kubernetes commands.logsFetcher— Fetch pod logs.rolloutChecker— Monitor deployment rollout status.scaleDeployment— Scale deployments up/down.namespaceAnalyzer— Analyze namespaces.explain_kubectl_result— AI explanation of command outputs.kubectlExplain— Explain Kubernetes object fields.portForwardPod— Port forward from a pod to your local machine.execCommandInPod— Execute shell commands in a pod.getPodEvents— Get Kubernetes event history for a pod.monitoringTool— Check pod health, node resource usage, cluster health, etc.helmTool— Install, upgrade, or uninstall Helm charts.createPodTool— Dynamically generate and deploy pods from templates or custom specs.
🗂 Tools are located in
/toolsand registered centrally intool.ts.
🧬 Architecture
User Query (UI)
↓
/api/mcp
↓
+-------------+
| MCPServer |
+-------------+
↓ ↘
Tool Router LLM Agent (Groq/OpenAI)
↓ ↓
Tool Handler → kubectl / helm
↓ ↓
Response (Optional AI Explanation)
↓
UI Renderer
🧪 Example Prompts
General Use
- "Get all pods not in running state."
- "Show logs for pod
nginx-deployment-abc123in namespacedefault." - "Port-forward
traefikpod port 80 to local port 8080." - "Explain what
kubectl get namespacesshows."
Monitoring
- "Check if any pods are failing their liveness probe."
- "What is the current CPU and memory usage across nodes?"
- "List top resource-consuming pods."
Quick Start
Clone the repository
git clone https://github.com/bikramjitchawla/mcp-kubectl-serverInstall dependencies
cd mcp-kubectl-server
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.