Back to MCP Catalog

Kubernetes Eye MCP Server

Cloud PlatformsGo
A comprehensive tool for Kubernetes cluster management and workload diagnostics
Available Tools

resource_get

Get detailed information about a specific resource in a namespace

resource_list

List detailed 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 detailed information about a resource 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

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

workload_resource_usage

Get pod/deployment/replicaset/statefulset resource usage in a namespace (cpu, memory)

Kubernetes Eye provides a powerful interface for managing and diagnosing Kubernetes clusters through an MCP server. It offers comprehensive capabilities for resource management, workload diagnostics, and monitoring, allowing users to efficiently troubleshoot and manage their Kubernetes environments. With support for all native Kubernetes resources and custom resource definitions, this tool enables operations like listing, creating, updating, and deleting resources. It also includes specialized diagnostic capabilities for analyzing the health and configuration of pods, services, deployments, and other Kubernetes components.

Overview

Kubernetes Eye is a Model Context Protocol (MCP) server that provides comprehensive management and diagnostic capabilities for Kubernetes clusters. It allows you to perform core Kubernetes operations, diagnose workload issues, and monitor resource usage directly through your AI assistant.

Installation

Prerequisites

  • Go 1.23 or higher
  • kubectl configured with access to your Kubernetes cluster

Installation Steps

  1. Clone the repository:

    git clone https://github.com/wenhuwang/mcp-k8s-eye.git
    cd mcp-k8s-eye
    
  2. Build the binary:

    go build -o mcp-k8s-eye
    
  3. Make note of the full path to the binary for configuration.

Configuration

Kubernetes Eye supports two modes of operation:

Stdio Mode

Add the following configuration to your AI assistant:

{
  "mcpServers": {
    "k8s eye": {
      "command": "/path/to/your/mcp-k8s-eye",
      "env": {
        "HOME": "/your/home/directory"
      }
    }
  }
}

Replace /path/to/your/mcp-k8s-eye with the actual path to the binary and /your/home/directory with your home directory where the kubeconfig file is located.

SSE Mode

  1. Start the MCP SSE server:

    ./mcp-k8s-eye serve --port 8080
    
  2. Add the following configuration to your AI assistant:

    {
      "mcpServers": {
        "k8s eye": {
          "url": "http://localhost:8080/sse",
          "env": {}
        }
      }
    }
    

Usage

Once configured, you can interact with your Kubernetes cluster through your AI assistant. The tool provides various capabilities organized into three main categories:

  1. Resource Operations: Manage Kubernetes resources (get, list, create, update, delete)
  2. Diagnostics: Analyze and troubleshoot various Kubernetes components
  3. Monitoring: Track resource usage of workloads

Simply ask your AI assistant to perform Kubernetes operations, and it will use the appropriate tools from Kubernetes Eye to fulfill your requests.

Examples

Here are some example queries you can use:

  • "List all pods in the default namespace"
  • "Scale the deployment 'my-app' to 3 replicas"
  • "Diagnose why my pod 'web-frontend' is not running"
  • "Show me the logs for the 'api' container in pod 'backend'"
  • "Get resource usage for all deployments in the 'production' namespace"

The AI assistant will use the appropriate tools from Kubernetes Eye to respond to your queries with relevant information from your Kubernetes cluster.

Related MCPs

AWS CLI
Cloud PlatformsPython

Execute AWS CLI commands securely through AI assistants

Kubernetes
Cloud PlatformsGo

Connect to and manage Kubernetes clusters through natural language

Cloudflare
Cloud PlatformsTypeScript

A Model Context Protocol server for Cloudflare services

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.