# 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](https://k6.io/docs/get-started/installation/))
## Installation
1. Install dependencies:
```bash
pip install -r requirements.txt
```
2. Run the server:
```bash
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 test
- `vus` (optional): Number of virtual users (default: 10)
- `duration` (optional): Test duration (default: "30s")
- `rps` (optional): Requests per second limit
- `method` (optional): HTTP method (default: "GET")
- `headers` (optional): HTTP headers object
- `body` (optional): Request body for POST/PUT requests
- `thresholds` (optional): k6 thresholds for pass/fail criteria
**Example:**
```json
{
"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 test
- `stages` (optional): Array of stages with duration and target VUs
- `method` (optional): HTTP method (default: "GET")
- `headers` (optional): HTTP headers object
- `body` (optional): Request body for POST/PUT requests
- `thresholds` (optional): k6 thresholds for pass/fail criteria
**Example:**
```json
{
"url": "https://httpbin.org/get",
"stages": [
{"duration": "2m", "target": 10},
{"duration": "5m", "target": 20},
{"duration": "2m", "target": 0}
]
}
```
## License
MIT License
Raw data
{
"_id": null,
"home_page": null,
"name": "k6-mcp-server",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "k6, load-testing, performance, mcp, stress-testing",
"author": null,
"author_email": "Hyeonggeun Oh <kandy@plaintexting.com>",
"download_url": "https://files.pythonhosted.org/packages/4f/1f/7c35994cc913aa69cc2515e7c6239e28b76811e2c898177cf61d4ccf9581/k6_mcp_server-1.1.0.tar.gz",
"platform": null,
"description": "# K6 MCP Server\n\nA Model Context Protocol (MCP) server for running k6 load tests and stress tests.\n\n## Features\n\n- **Load Testing**: Run k6 load tests with configurable virtual users, duration, and request parameters\n- **Stress Testing**: Run multi-stage stress tests to gradually increase load\n- **JSON Results**: Get detailed test results in JSON format\n- **Flexible Configuration**: Support for custom HTTP methods, headers, body, and thresholds\n\n## Prerequisites\n\n- Python 3.10 or higher\n- k6 installed on your system ([Installation Guide](https://k6.io/docs/get-started/installation/))\n\n## Installation\n\n1. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n2. Run the server:\n```bash\npython index.py\n```\n\n## Tools\n\n### run_k6_load_test\n\nRun a k6 load test against a specific URL.\n\n**Parameters:**\n- `url` (required): Target URL for the load test\n- `vus` (optional): Number of virtual users (default: 10)\n- `duration` (optional): Test duration (default: \"30s\")\n- `rps` (optional): Requests per second limit\n- `method` (optional): HTTP method (default: \"GET\")\n- `headers` (optional): HTTP headers object\n- `body` (optional): Request body for POST/PUT requests\n- `thresholds` (optional): k6 thresholds for pass/fail criteria\n\n**Example:**\n```json\n{\n \"url\": \"https://httpbin.org/get\",\n \"vus\": 20,\n \"duration\": \"1m\",\n \"method\": \"GET\",\n \"headers\": {\n \"User-Agent\": \"k6-test\"\n }\n}\n```\n\n### run_k6_stress_test\n\nRun a k6 stress test with multiple stages to gradually increase load.\n\n**Parameters:**\n- `url` (required): Target URL for the stress test\n- `stages` (optional): Array of stages with duration and target VUs\n- `method` (optional): HTTP method (default: \"GET\")\n- `headers` (optional): HTTP headers object\n- `body` (optional): Request body for POST/PUT requests\n- `thresholds` (optional): k6 thresholds for pass/fail criteria\n\n**Example:**\n```json\n{\n \"url\": \"https://httpbin.org/get\",\n \"stages\": [\n {\"duration\": \"2m\", \"target\": 10},\n {\"duration\": \"5m\", \"target\": 20},\n {\"duration\": \"2m\", \"target\": 0}\n ]\n}\n```\n\n## License\n\nMIT License\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "K6 Load Testing MCP Server for performance testing",
"version": "1.1.0",
"project_urls": {
"Homepage": "https://github.com/Geun-Oh/k6-mcp-server",
"Issues": "https://github.com/Geun-Oh/k6-mcp-server/issues",
"Repository": "https://github.com/Geun-Oh/k6-mcp-server"
},
"split_keywords": [
"k6",
" load-testing",
" performance",
" mcp",
" stress-testing"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "447c2cd031c1e19d1fab627b35aa3df521b62b5b02a362da0333af9dadbebbed",
"md5": "b83dcbce3e26c5dd421d2e0542d07671",
"sha256": "dfba308f84eef35248f6f955d491eb379db54ae7557cdbf6653abb2845a6df0e"
},
"downloads": -1,
"filename": "k6_mcp_server-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b83dcbce3e26c5dd421d2e0542d07671",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8546,
"upload_time": "2025-08-12T11:34:31",
"upload_time_iso_8601": "2025-08-12T11:34:31.938940Z",
"url": "https://files.pythonhosted.org/packages/44/7c/2cd031c1e19d1fab627b35aa3df521b62b5b02a362da0333af9dadbebbed/k6_mcp_server-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4f1f7c35994cc913aa69cc2515e7c6239e28b76811e2c898177cf61d4ccf9581",
"md5": "513cd09cfb7598a54e975e8e5177b9a6",
"sha256": "81851462e454ffbb1d51e88617e314de5b79af8d8e91ace5a44ab2efff88717c"
},
"downloads": -1,
"filename": "k6_mcp_server-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "513cd09cfb7598a54e975e8e5177b9a6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 9142,
"upload_time": "2025-08-12T11:34:33",
"upload_time_iso_8601": "2025-08-12T11:34:33.153006Z",
"url": "https://files.pythonhosted.org/packages/4f/1f/7c35994cc913aa69cc2515e7c6239e28b76811e2c898177cf61d4ccf9581/k6_mcp_server-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-12 11:34:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Geun-Oh",
"github_project": "k6-mcp-server",
"github_not_found": true,
"lcname": "k6-mcp-server"
}