# 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/5d/10/89f145ee9cde7350d818a307f3b5cbb2e4d55255f13da58d293b41136f04/k6_mcp_server-2.2.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": "2.2.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": "7fa6ddff007ecef6b36bc90f140806a8ca92aa799b4089f53637103f7f43b956",
"md5": "ac506090a660849be153eb1c7e3b6312",
"sha256": "40e58b293f1a856b5a72b0fd3368ea547beed8deaf79df52e89c8b99fde27424"
},
"downloads": -1,
"filename": "k6_mcp_server-2.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ac506090a660849be153eb1c7e3b6312",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 9043,
"upload_time": "2025-09-02T05:07:23",
"upload_time_iso_8601": "2025-09-02T05:07:23.517884Z",
"url": "https://files.pythonhosted.org/packages/7f/a6/ddff007ecef6b36bc90f140806a8ca92aa799b4089f53637103f7f43b956/k6_mcp_server-2.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5d1089f145ee9cde7350d818a307f3b5cbb2e4d55255f13da58d293b41136f04",
"md5": "0e00838506015fc2a5206aea98cabac0",
"sha256": "dc991ab9baa4613ef3413f1ef4dab4a2f09b2f55e8a996c708554b0731fa7f80"
},
"downloads": -1,
"filename": "k6_mcp_server-2.2.0.tar.gz",
"has_sig": false,
"md5_digest": "0e00838506015fc2a5206aea98cabac0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 9643,
"upload_time": "2025-09-02T05:07:24",
"upload_time_iso_8601": "2025-09-02T05:07:24.680858Z",
"url": "https://files.pythonhosted.org/packages/5d/10/89f145ee9cde7350d818a307f3b5cbb2e4d55255f13da58d293b41136f04/k6_mcp_server-2.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-02 05:07:24",
"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"
}