Mcp K8s Eye

by wenhuwang

28 196 downloads Not rated yet Apache-2.0
GitHub

About

MCP Server for kubernetes management and diagnose your cluster and applications

Details

License
Apache-2.0

Explore

- [x] Multiple transport protocols support (Stdio, SSE)
- [x] Support multiple AI Clients

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Mcp K8s Eye
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, build the binary with Go 1.23 or higher, and configure it as an MCP server in either Stdio mode (pointing to the binary and setting HOME for kubeconfig) or SSE mode (starting the SSE server and providing the URL). Use the provided tools such as resource_get, deployment_scale, pod_exec, pod_analyze, and workload_resource_usage via your AI client.

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

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 namepace (cpu, memory)

- 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

- 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 namepace (cpu, memory)

cursor tools

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

McpServers

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

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

Features

Core Kubernetes Operations

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

Diagnostics

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

Monitoring

- [x] Pod, Deployment, ReplicaSet, StatefulSet, DaemonSet workload resource usage (cpu, memory) - [ ] Node capacity, utilization (cpu, memory) - [ ] Cluster capacity, utilization (cpu, memory)

Advanced Features

- [x] Multiple transport protocols support (Stdio, SSE) - [x] 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
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.

Videos about Mcp K8s Eye

Relevant YouTube tutorials, setups, and demos