K6 Load Testing MCP Server for performance testing
Project description
K6 MCP Server
A Model Context Protocol (MCP) server for running k6 load tests and stress tests.
Features
- Load Testing: Run k6 load tests with configurable virtual users, duration, and request parameters
- Stress Testing: Run multi-stage stress tests to gradually increase load
- JSON Results: Get detailed test results in JSON format
- Flexible Configuration: Support for custom HTTP methods, headers, body, and thresholds
Prerequisites
- Python 3.10 or higher
- k6 installed on your system (Installation Guide)
Installation
- Install dependencies:
pip install -r requirements.txt
- Run the server:
python index.py
Tools
run_k6_load_test
Run a k6 load test against a specific URL.
Parameters:
url(required): Target URL for the load testvus(optional): Number of virtual users (default: 10)duration(optional): Test duration (default: "30s")rps(optional): Requests per second limitmethod(optional): HTTP method (default: "GET")headers(optional): HTTP headers objectbody(optional): Request body for POST/PUT requeststhresholds(optional): k6 thresholds for pass/fail criteria
Example:
{
"url": "https://httpbin.org/get",
"vus": 20,
"duration": "1m",
"method": "GET",
"headers": {
"User-Agent": "k6-test"
}
}
run_k6_stress_test
Run a k6 stress test with multiple stages to gradually increase load.
Parameters:
url(required): Target URL for the stress teststages(optional): Array of stages with duration and target VUsmethod(optional): HTTP method (default: "GET")headers(optional): HTTP headers objectbody(optional): Request body for POST/PUT requeststhresholds(optional): k6 thresholds for pass/fail criteria
Example:
{
"url": "https://httpbin.org/get",
"stages": [
{"duration": "2m", "target": 10},
{"duration": "5m", "target": 20},
{"duration": "2m", "target": 0}
]
}
License
MIT License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
k6_mcp_server-2.1.0.tar.gz
(9.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file k6_mcp_server-2.1.0.tar.gz.
File metadata
- Download URL: k6_mcp_server-2.1.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79cf6bc71a35fac6f0361a563122f3a519815e291be31b59eb6d730b90e78c1f
|
|
| MD5 |
1f6010ea15c874ba9259411deff95002
|
|
| BLAKE2b-256 |
a93cd8c42ba4fd22dc0e36698b7ae5747a6c99bd2168c7d30ce84d32cba565d6
|
File details
Details for the file k6_mcp_server-2.1.0-py3-none-any.whl.
File metadata
- Download URL: k6_mcp_server-2.1.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e47adb1e374cf9fe9a3f0349f88beb452aae89ac37c820278b5cc1e6b4864de
|
|
| MD5 |
b86377d17ef6895191cd07cda2c7c4ce
|
|
| BLAKE2b-256 |
a32e1edc14dec34abd297eeaeb133cea1337f5086bca672c1d8dc581321f1bfe
|