
How to add k6 MCP Server to Windsurf
Run k6 load tests from your MCP client and let an LLM analyze the results. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 25★ · stdio · no auth
Windsurf 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 Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the k6 MCP Server config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5k6 MCP Server's tools become available to Cascade.
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 Windsurf
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 + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the k6 MCP Server config there under the "mcpServers" key and restart the client.
Is k6 MCP Server safe to use with Windsurf?
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.