mcp-k8s

by beastpu

133 downloads
Not rated
GitHub

About

mcp tools for k8s resources management using cursor agent

Details

Author
beastpu
Downloads
133
Categories
Cloud Service

- Kubernetes cluster connection and management
- Node management: view, cordon, uncordon, restart
- Pod management: view, delete, log retrieval, command execution
- OpenKruise resource management: view, describe, scale CloneSets and AdvancedStatefulSets
- ConfigMap management
- Multi-cluster context switching

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
    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

Build from source using go build -o k8s, then run in SSE mode with ./k8s -mode=sse -address=:8686 or in stdio mode with ./k8s -mode=stdio. For Cursor IDE, configure mcp.json with the SSE endpoint URL.

Claude Desktop / Cursor

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

{
    "mcpServers": {
        "mcp-k8s": {
            "k8s": {
                "type": "http",
                "url": "http://127.0.0.1:8686/sse"
            }
        }
    }
}

McpServers

{
    "k8s": {
        "type": "http",
        "url": "http://127.0.0.1:8686/sse"
    }
}

mcp-k8s

Overview

mcp-k8s is a lightweight Kubernetes management tool providing sse and stdio mode for Kubernetes cluster management. It simplifies Kubernetes resources operation in cursor IDE.

Key Features

- Kubernetes cluster connection and management - Kubernetes node management (view, cordon, uncordon, restart) - Pod management (view, delete, log retrieval, command execution) - OpenKruise resource management (view, describe, and scale CloneSets and AdvancedStatefulSets) - ConfigMap management - Multi-cluster context switching

Requirements

- Go 1.18+ - Kubernetes cluster - Valid kubeconfig file

Build Instructions

In the project root directory, run:
go build -o k8s

Usage

The application supports two running modes: - stdio mode: For command-line interaction - SSE mode: Starts an HTTP server for API access

Start in SSE mode:

./k8s -mode=sse -address=:8686

Start in stdio mode:

./k8s -mode=stdio

Cursor mcp.json

{
  "mcpServers": {
    "k8s": {
     "url": "http://127.0.0.1:8686/sse"
    }
  }
}

Project Structure

- biz/: Business logic code - clientset/: Kubernetes client related code - pod/: Pod operations - node/: Node management - context/: Cluster context management - kruise/: OpenKruise resource management - configmap/: ConfigMap management - main.go: Application entry point
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.