Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-k8s-eye

MCP.Pizza Chef: wenhuwang

mcp-k8s-eye is an MCP server designed for Kubernetes cluster management and workload diagnostics. It supports core Kubernetes operations such as connecting to clusters, managing native and custom resources, and performing pod and deployment management. It also provides detailed diagnostics for pods, services, deployments, statefulsets, and cronjobs, enabling real-time analysis of cluster health and resource utilization.

Use This MCP server To

Connect to and manage Kubernetes clusters via MCP List, get, create, update, and delete Kubernetes resources Execute commands and fetch logs from pods Scale deployments dynamically within the cluster Diagnose pod status and container resource utilization Analyze service configurations and endpoint readiness Monitor deployment replica availability Inspect statefulset services and persistent volume claims Perform cronjob diagnostics for scheduled workloads

README

mcp-k8s-eye

mcp-k8s-eye is a tool that can manage kubernetes cluster and analyze workload status.

Features

Core Kubernetes Operations

  • Connect to a Kubernetes cluster
  • Generic Kubernetes Resources management capabilities
    • Support all navtie resources: Pod, Deployment, Service, StatefulSet, Ingress...
    • Support CustomResourceDefinition resources
    • Operations include: list, get, create, update, delete
  • Pod management capabilities (exec, logs)
  • Deployment management capabilities (scale)
  • Describe Kubernetes resources
  • Explain Kubernetes resources

Diagnostics

  • Pod diagnostics (analyze pod status, container status, pod resource utilization)
  • Service diagnostics (analyze service selector configuration, not ready endpoints, events)
  • Deployment diagnostics (analyze available replicas)
  • StatefulSet diagnostics (analyze statefulset service if exists, pvc if exists, available replicas)
  • CronJob diagnostics (analyze cronjob schedule, starting deadline, last schedule time)
  • Ingress diagnostics (analyze ingress class configuration, related services, tls secrets)
  • NetworkPolicy diagnostics (analyze networkpolicy configuration, affected pods)
  • ValidatingWebhook diagnostics (analyze webhook configuration, referenced services and pods)
  • MutatingWebhook diagnostics (analyze webhook configuration, referenced services and pods)
  • Node diagnostics (analyze node conditions)
  • Cluster diagnostics and troubleshooting

Monitoring

  • Pod, Deployment, ReplicaSet, StatefulSet, DaemonSet workload resource usage (cpu, memory)
  • Node capacity, utilization (cpu, memory)
  • Cluster capacity, utilization (cpu, memory)

Advanced Features

  • Multiple transport protocols support (Stdio, SSE)
  • Support multiple AI Clients

Tools Usage

Resource Operation Tools

  • resource_get: Get detailed resource information about a specific resource in a namespace
  • resource_list: List detailed resource information about all resources in a namespace
  • resource_create_or_update: Create or update a resource in a namespace
  • resource_delete: Delete a resource in a namespace
  • resource_describe: Describe a resource detailed information in a namespace
  • deployment_scale: Scale a deployment in a namespace
  • pod_exec: Execute a command in a pod in a namespace`
  • pod_logs: Get logs from a pod in a namespace

Diagnostics Tools

  • pod_analyze: Diagnose all pods in a namespace
  • deployment_analyze: Diagnose all deployments in a namespace
  • statefulset_analyze: Diagnose all statefulsets in a namespace
  • service_analyze: Diagnose all services in a namespace
  • cronjob_analyze: Diagnose all cronjobs in a namespace
  • ingress_analyze: Diagnose all ingresses in a namespace
  • networkpolicy_analyze: Diagnose all networkpolicies in a namespace
  • validatingwebhook_analyze: Diagnose all validatingwebhooks
  • mutatingwebhook_analyze: Diagnose all mutatingwebhooks
  • node_analyze: Diagnose all nodes in cluster

Monitoring Tools

  • workload_resource_usage: Get pod/deployment/replicaset/statefulset resource usage in a namepace (cpu, memory)

Requirements

  • Go 1.23 or higher
  • kubectl configured

Installation

# clone the repository
git clone https://github.com/wenhuwang/mcp-k8s-eye.git
cd mcp-k8s-eye

# build the binary
go build -o mcp-k8s-eye

Usage

Stdio mode

{
  "mcpServers": {
    "k8s eye": {
      "command": "YOUR mcp-k8s-eye PATH",
      "env": {
        "HOME": "USER HOME DIR"
      },
    }
  }
}

env.HOME is used to set the HOME directory for kubeconfig file.

SSE mode

  1. start your mcp sse server
  2. config your mcp server
{
  "mcpServers": {
    "k8s eye": {
      "url": "http://localhost:8080/sse",
      "env": {}
    }
  }
}

cursor tools

cursor tools

mcp-k8s-eye FAQ

How does mcp-k8s-eye connect to Kubernetes clusters?
It uses standard Kubernetes APIs to securely connect and manage clusters.
Can mcp-k8s-eye manage custom Kubernetes resources?
Yes, it supports CustomResourceDefinition (CRD) resources for full cluster management.
What diagnostic capabilities does mcp-k8s-eye provide?
It analyzes pod status, container utilization, service selectors, deployment replicas, and more.
Does mcp-k8s-eye support pod log retrieval and command execution?
Yes, it supports pod exec and log fetching for troubleshooting.
Can I scale deployments using mcp-k8s-eye?
Yes, it provides deployment scaling operations directly through the MCP interface.
Is mcp-k8s-eye limited to native Kubernetes resources?
No, it supports both native and custom resources for comprehensive management.
How does mcp-k8s-eye help with service diagnostics?
It analyzes service selector configurations, endpoint readiness, and related events.
What Kubernetes workload types does mcp-k8s-eye diagnose?
It diagnoses pods, services, deployments, statefulsets, and cronjobs.
Is mcp-k8s-eye suitable for real-time cluster monitoring?
Yes, it provides real-time diagnostics and status analysis for Kubernetes workloads.
Can mcp-k8s-eye describe or explain Kubernetes resources?
Describe and explain features are planned but not yet implemented.