MCP Server

by Hades-gsl

88 downloads Not rated yet
GitHub

About

MCP Server is a tool for injecting faults and performing stress tests on Kubernetes pods and hosts using Chaos Mesh.

Explore

- Pod Fault Injection: Simulate pod failures, pod kills, and container kills.
- Pod Stress Testing: Simulate CPU and memory stress tests on pods.
- Host Stress Testing: Simulate CPU and memory stress tests on hosts.
- Host Disk Faults: Simulate disk fill, read payload, and write payload faults on hosts.
- Network Faults: Simulate network partition and bandwidth limitations.
- Log Retrieval: Retrieve logs for specific services and containers.
- Load Test Monitoring: Parse and retrieve aggregated load test results.

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

Run the MCP server using the following command:

uv run python server.py

You can specify the transport method by adding the --transport argument. By default, the transport parameter is set to sse.

Before starting, make sure you have uv installed. You can install uv here .

uv venv
source .venv/bin/activate
uv sync

You can intall it here.

Claude Desktop / Cursor

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

{
    "mcpServers": {
        "mcp server": {
            "mcp-server-hades-gsl": {
                "command": "uv",
                "args": [
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-server-hades-gsl": {
        "command": "uv",
        "args": [
            "venv"
        ]
    }
}

MCP Server is a tool for injecting faults and performing stress tests on Kubernetes pods and hosts using Chaos Mesh. It also provides utilities for retrieving logs and monitoring load test results.

Features

- Pod Fault Injection: Simulate pod failures, pod kills, and container kills.
- Pod Stress Testing: Simulate CPU and memory stress tests on pods.
- Host Stress Testing: Simulate CPU and memory stress tests on hosts.
- Host Disk Faults: Simulate disk fill, read payload, and write payload faults on hosts.
- Network Faults: Simulate network partition and bandwidth limitations.
- Log Retrieval: Retrieve logs for specific services and containers.
- Load Test Monitoring: Parse and retrieve aggregated load test results.

Project Structure

- fault_inject.py: Contains functions for injecting faults and performing stress tests.
- kube.py: Provides utilities for interacting with Kubernetes, such as retrieving pod logs.
- server.py: Implements the MCP server and exposes tools for fault injection and log retrieval.
- test.py: Contains test cases and examples for using the fault injection and logging utilities.
- services.json: Defines the services in the cluster, including their namespaces, labels, and containers.

Installation

Prerequisites:

Before starting, make sure you have uv installed. You can install uv here .

1. Clone the repository:

git clone https://github.com/Hades-gsl/mcp_server.git
cd mcp_server

2. Build and set up the virtual environment using uv:

uv venv
source .venv/bin/activate

3. Install dependencies:

uv sync

4. Install Chaos Mesh in your Kubernetes cluster.

You can intall it here.

Usage

Run the MCP server using the following command:

uv run python server.py

You can specify the transport method by adding the --transport argument. By default, the transport parameter is set to sse.

Service Infomation

Write the services.json file to show the services in your cluster. You can write anything useful, the more detailed the better.

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.