
k6 MCP Server
Run k6 load tests from your MCP client and let an LLM analyze the results.
Add to your client
Copy the config for your MCP client and paste it into its config file.
git clone https://github.com/qainsights/k6-mcp-server.gitPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"k6-mcp-server": {
"command": "/path/to/bin/uv",
"args": [
"--directory",
"/path/to/k6-mcp-server",
"run",
"k6_server.py"
]
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Python 3.12 or higher
- k6 load testing tool installed (https://grafana.com/docs/k6/latest/set-up/install-k6/)
- uv package manager (https://github.com/astral-sh/uv)
About k6 MCP Server
k6 MCP Server is a Model Context Protocol server that lets an LLM run k6 load tests on your behalf. After cloning the repo and installing dependencies with the uv package manager, you configure it in your MCP client and ask the LLM to run a test against a k6 JavaScript script. The server invokes the local k6 binary with the requested virtual users and duration, returning real-time output for analysis and debugging.
Tools & capabilities (2)
execute_k6_testRun a k6 test with default options (30s duration, 10 virtual users). Parameters: script_file (str), and optional duration (str, default '30s') and vus (int, default 10).
execute_k6_test_with_optionsRun a k6 test with custom duration and virtual users. Parameters: script_file (str), duration (str), vus (int).
When to use it
- LLM-powered analysis of k6 load test results
- Effective debugging of load tests through conversation
- Kicking off k6 load tests with custom virtual users and durations directly from an MCP client
Security notes
The server runs k6 against arbitrary local test scripts and target URLs. Only run trusted test scripts, and be mindful that load tests generate real traffic against the targets you specify.
k6 MCP Server FAQ
Which MCP clients does it work with?
Any MCP client that supports stdio servers, including Claude Desktop, Cursor, and Windsurf.
Do I need k6 installed separately?
Yes. The k6 load testing tool must be installed and available on your system. You can optionally set the K6_BIN environment variable to point to a custom k6 binary path; otherwise it defaults to 'k6' in the system PATH.
How do I control the number of virtual users and the test duration?
Use execute_k6_test for the defaults (30s, 10 VUs), or execute_k6_test_with_options to pass a custom duration and vus count.
Alternatives to k6 MCP Server
Compare all alternatives →Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).
Up-to-date, version-specific library documentation injected into your coding agent.
Code intelligence engine that indexes repos into a persistent knowledge graph for AI coding agents.
Compare k6 MCP Server with: