π― Kubernetes MCP Server
LocalAbout π― Kubernetes MCP Server
A Kubernetes management project with an MCP server and an agent backed by a REST API. It supports natural-language cluster diagnostics, resource monitoring, log analysis, and Helm release management.
Key features
- 01Cluster health and diagnostics
- 02Resource and pod monitoring
- 03Log and network analysis
- 04Storage and job inspection
- 05Helm release management
Use cases
- 01Check cluster health and failing pods
- 02Find resource usage and analyze logs
- 03Review storage claims and job history
- 04Inspect or update Helm releases
MCP support
The MCP server exposes Kubernetes tools for integration with MCP hosts. The same tools are also used by the agent mode, which is backed by a REST API.
Configuration
Local server config is the same for every client. Copy it into your clientβs MCP config file.
We havenβt collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEπ― Kubernetes AI Management System
AI-Powered Kubernetes Management (MCP + Agent)
β K8s AI Management
βββ π€ MCP Server
βββ π K8s Tools
βββ π Agent mode with Rest API
β¨ Overview
This project combines the power of AI with Kubernetes management. Users can perform real-time diagnostics, resource monitoring, and smart log analysis. It simplifies Kubernetes management through conversational AI, providing a modern alternative.
π‘ Just ask questions naturally - no need to memorize commands!
ποΈ Project Structure
The project is organized into the following modules:
- agent: Agent mode backed by Rest API to analyze the cluster using natural language
- mcp-server: MCP server backed by tools which can be integrated with MCP host (like Claude desktop) to provide a full experience
- tools: Kubernetes tools for cluster analysis/management (used by both agent and mcp-server)
π Features
This AI-powered system understands natural language queries about your Kubernetes cluster. Here are some of the capabilities provided by the system which can be queried using natural language:
π₯ Cluster Health and Diagnostics
- "What's the status of my cluster?"
- "Show me all pods in the default namespace"
- "Are there any failing pods? in default namespace"
- "What's using the most resources in my cluster?"
- "Give me a complete health check of the cluster"
- "Are there any nodes not in Ready state?"
- "Show me pods in default namespace that have been running for more than 7 days"
- "Identify any pods running in default namespace with high restart counts"
π Network Analysis
- "Show me the logs for the payment service"
- "List all ingresses in the cluster"
- "Show me all services and their endpoints"
- "Check if my service 'api-gateway' has any endpoints"
- "Show me all exposed services with external IPs"
πΎ Storage Management
- "List all persistent volumes in the cluster"
- "Show me storage claims that are unbound"
- "What storage classes are available in the cluster?"
- "Which pods are using persistent storage?"
- "Are there any storage volumes nearing capacity?"
β±οΈ Job and CronJob Analysis
- "List all running jobs in the batch namespace"
- "Show me failed jobs from the last 24 hours"
- "What CronJobs are scheduled to run in the next hour?"
- "Show me the execution history of the 'backup' job"
β Helm Release Management
- "List all Helm releases"
- "Upgrade the MongoDB chart to version 12.1.0"
- "What values are configured for my Prometheus release?"
- "Rollback the failed Elasticsearch release"
- "Show me the revision history for my Prometheus release"
- "Compare values between different Helm releases"
- "Check for outdated Helm charts in my cluster"
- "What are the dependencies for my Elasticsearch chart?"
Note: The system uses AI to analyze patterns in logs, events, and resource usage to provide intelligent diagnostics and recommendations.
π οΈ Prerequisites
| Requirement | Version |
|---|---|
| β JDK | 17 or later |
| π§° Maven | 3.8 or later |
| β Minikube/Any Kubernetes cluster | Configured ~/.kube/config |
Note: The system uses the kubeconfig file from
~/.kube/config, so make sure it is properly configured.
ποΈ 1. Project Build
# Build all modules
mvn clean package
# Run the MCP server
java -jar mcp-server/target/mcp-server-1.0-SNAPSHOT.jar
# Alternatively, run the agent directly
java -jar agent/target/agent-*-fat.jar
π οΈ 2. Minikube setup
Install minikube and create a nginx deployment:
# Install minikube
brew install minikube
# Start minikube
minikube start
# Make sure kubeconfig is set
kubectl config use-context minikube
# Deploy nginx
kubectl create deployment nginx --image=nginx:latest
# Check whether nginx is running
kubectl get pods
Note: You should see
nginxpod in the output
π οΈ 3. Testing project
π€ 3.1 MCP Server integration with Claude Desktop
Refer to mcp-server/README.md for instructions on how to integrate with Claude Desktop
3.2. Agent Mode with Rest API
Refer to agent/README.md for instructions on how to run the agent
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.