home / mcp / chaos mesh mcp server
Provides AI-assisted access to Chaos Mesh for creating, validating, and managing chaos experiments via natural language conversations.
Configuration
View docs{
"mcpServers": {
"ernestolee13-chaos-mesh-mcp": {
"command": "python",
"args": [
"-m",
"chaos_mesh_mcp.server"
]
}
}
}You can interact with Chaos Mesh through a dedicated MCP server that lets you create, manage, and validate chaos experiments using natural language. This makes it easy to perform resilience testing and automated chaos operations from conversational interfaces.
You use an MCP client to talk to the Chaos Mesh MCP server. The server exposes a set of tools to create chaos experiments, validate your environment, and manage ongoing experiments. Start by configuring your MCP client with the server connection details, then issue natural language requests like creating a NetworkChaos delay, listing active experiments, or checking chaos type requirements.
Prerequisites to run the MCP server are: kubectl installed and configured, a Kubernetes cluster accessible via kubectl (v1.15+), and Chaos Mesh installed in the cluster (v2.6+ recommended). You may also need Python and pip for the MCP server runtime.
Install Chaos Mesh in your cluster if it is not already present. The following sequence uses Helm to install Chaos Mesh version 2.8.0 into the chaos-mesh namespace.
# Using Helm (Recommended)
helm repo add chaos-mesh https://charts.chaos-mesh.org
helm install chaos-mesh chaos-mesh/chaos-mesh \
--namespace chaos-mesh \
--create-namespace \
--version 2.8.0
# Verify installation
kubectl get pods -n chaos-mesh
# Should see: chaos-controller-manager, chaos-daemon, chaos-dashboardInstall the MCP server runtime so you can start interacting with Chaos Mesh via natural language automation.
Option 1: Install from GitHub (Recommended)
pip install git+https://github.com/ernestolee13/chaos-mesh-mcp.gitOption 2: Install from Source
git clone https://github.com/ernestolee13/chaos-mesh-mcp.git
cd chaos-mesh-mcp
pip install -e .Runs comprehensive checks to ensure kubectl is available, the cluster is reachable, Chaos Mesh is installed, CRDs exist for all chaos types, and required components are running.
Verifies the prerequisites and component requirements for a specific chaos type, ensuring the requested chaos can be executed.
Retrieves detailed requirements for a chosen chaos type, including any external dependencies or agent requirements.
Fetches detailed status information for a given chaos experiment, including phase, start time, and observed events.
Lists all currently running chaos experiments across namespaces with their status.
Deletes a specified chaos experiment from the cluster.
Pauses a running chaos experiment to halt progression without deleting it.
Resumes a paused chaos experiment from where it left off.
Retrieves Kubernetes events related to chaos experiments for debugging and auditing.
Injects network latency to simulate delays between pods or services.
Introduces packet loss to mimic unreliable network conditions.
Creates network partitions to test resilience against split-brain scenarios.
Corrupts network packets to test data integrity under adverse conditions.
Applies CPU stress to containers to evaluate performance under load.
Applies memory pressure to containers to simulate OOM-like scenarios.
Applies both CPU and memory stress simultaneously.
Permanently kills pods to test recovery mechanisms.
Temporarily makes pods unavailable without killing them.
Kills specific containers within pods to test intra-pod resilience.
Injects I/O latency to simulate slow disk operations.
Returns error codes for file operations to test error handling.
Modifies file attributes such as permissions and size.
Injects data corruption into read/write operations.
Aborts HTTP connections to simulate network failures.
Adds latency to HTTP requests and responses.
Replaces HTTP message content, including headers and body.
Appends or modifies content in HTTP messages.
Returns DNS errors for specified domain patterns.
Returns random IP addresses for DNS queries.
Applies CPU stress on physical or virtual machines.
Applies memory pressure on physical or virtual machines.
Fills disk space on physical or virtual machines.
Kills processes on physical or virtual machines.
Skews the system clock on physical or virtual machines.