๐ŸŽฏ Kubernetes MCP Server

๐ŸŽฏ Kubernetes MCP Server

AI-powered MCP server understands natural language queries about your Kubernetes cluster

hariohmprasath

Research & Data
Visit Server

README

๐ŸŽฏ Kubernetes AI Management System

Spring Boot Kubernetes Kotlin License

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 nginx pod 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.

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python
Nefino MCP Server

Nefino MCP Server

Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.

Official
Python
Vectorize

Vectorize

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Official
JavaScript
Mathematica Documentation MCP server

Mathematica Documentation MCP server

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

Local
Python
kb-mcp-server

kb-mcp-server

An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded

Local
Python
Research MCP Server

Research MCP Server

The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.

Local
Python