
How to add k6 MCP Server to Cursor
Run k6 load tests from your MCP client and let an LLM analyze the results. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 14, 2026 · 25★ · stdio · no auth
Cursor config for k6 MCP Server
git clone https://github.com/qainsights/k6-mcp-server.git{
"mcpServers": {
"k6-mcp-server": {
"command": "/path/to/bin/uv",
"args": [
"--directory",
"/path/to/k6-mcp-server",
"run",
"k6_server.py"
]
}
}
}Setup steps
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the k6 MCP Server config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of k6 MCP Server's tools to confirm it's connected.
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)
What k6 MCP Server can do in Cursor
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).
Security
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 + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the k6 MCP Server config there under the "mcpServers" key and restart the client.
Is k6 MCP Server safe to use with Cursor?
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.
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.