k6-mcp-server
Enables running load tests through k6, supporting customizable test durations and virtual user counts with real-time execution output
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@k6-mcp-server run a 60-second load test with 50 virtual users on my-api-test.js"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🚀 ⚡️ k6-mcp-server
A Model Context Protocol (MCP) server implementation for running k6 load tests.
✨ Features
Simple integration with Model Context Protocol framework
Support for custom test durations and virtual users (VUs)
Easy-to-use API for running k6 load tests
Configurable through environment variables
Real-time test execution output
Related MCP server: JMeter MCP Server
🔧 Prerequisites
Before you begin, ensure you have the following installed:
Python 3.12 or higher
k6 load testing tool (Installation guide)
uv package manager (Installation guide)
📦 Installation
Clone the repository:
git clone https://github.com/qainsights/k6-mcp-server.gitInstall the required dependencies:
uv pip install -r requirements.txtSet up environment variables (optional): Create a
.envfile in the project root:
K6_BIN=/path/to/k6 # Optional: defaults to 'k6' in system PATH🚀 Getting Started
Create a k6 test script (e.g.,
test.js):
import http from "k6/http";
import { sleep } from "k6";
export default function () {
http.get("http://test.k6.io");
sleep(1);
}Configure the MCP server using the below specs in your favorite MCP client (Claude Desktop, Cursor, Windsurf and more):
{
"mcpServers": {
"k6": {
"command": "/path/to/bin/uv",
"args": [
"--directory",
"/path/to/k6-mcp-server",
"run",
"k6_server.py"
]
}
}
}
Now ask the LLM to run the test e.g.
run k6 test for hello.js. The k6 mcp server will leverage either one of the below tools to start the test.
execute_k6_test: Run a test with default options (30s duration, 10 VUs)execute_k6_test_with_options: Run a test with custom duration and VUs

📝 API Reference
Execute K6 Test
execute_k6_test(
script_file: str,
duration: str = "30s", # Optional
vus: int = 10 # Optional
)Execute K6 Test with Custom Options
execute_k6_test_with_options(
script_file: str,
duration: str,
vus: int
)✨ Use cases
LLM powered results analysis
Effective debugging of load tests
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Available Tools
2 toolsexecute_k6_testB
Execute a k6 load test.
Args: script_file: Path to the k6 test script (.js) duration: Duration of the test (e.g., "30s", "1m", "5m") vus: Number of virtual users to simulate
Inputs: script_file (required), duration, vus.
execute_k6_test_with_optionsB
Execute a k6 load test with custom duration and VUs.
Args: script_file: Path to the k6 test script (.js) duration: Duration of the test (e.g., "30s", "1m", "5m") vus: Number of virtual users to simulate
Inputs: script_file (required), duration (required), vus (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools are essentially identical in purpose and functionality, both executing k6 load tests with the exact same parameters (script_file, duration, vus). The only difference is the tool name, which creates confusion rather than clarity. An agent would have no meaningful basis to choose between them.
Both tools follow a consistent snake_case pattern with 'execute_k6_test' as the base, which is readable. However, the second tool's name 'execute_k6_test_with_options' is redundant since the first tool already accepts options (duration and VUs), making the naming somewhat inconsistent in logic despite matching the format.
With only 2 tools, the server feels thin for a load testing domain, as it lacks operations like listing tests, getting results, or managing test configurations. The tools are redundant, so the effective count is even lower, failing to cover basic workflows beyond a single execution action.
The server is severely incomplete for k6 load testing, missing essential operations such as retrieving test results, monitoring test status, or managing test scripts. It only offers execution with no way to access outcomes, leaving agents unable to perform a full testing lifecycle.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for building and testing AI agents with multi-model experimentation and insights.
A Model Context Protocol server for Wix AI tools
AI-native mock API server with MCP. Create REST/SOAP mocks from Claude, Cursor, or Windsurf.
Related MCP Servers
- FlicenseBqualityCmaintenanceA Model Context Protocol server that allows AI assistants to execute and manage JMeter performance tests through natural language commands.674-
- FlicenseCqualityDmaintenanceA Model Context Protocol server that enables executing and interacting with JMeter tests through MCP-compatible clients like Claude Desktop, Cursor, and Windsurf.2-
- FlicenseCqualityDmaintenanceA Model Context Protocol server that enables execution of JMeter performance tests through AI assistants and MCP-compatible clients like Claude, Cursor, and Windsurf.2-
- AlicenseNot gradedqualityBmaintenanceA Model Context Protocol (MCP) server implementation that enables AI assistants to interact with Anytype's API through natural language, allowing users to manage their knowledge base through conversation.2,277 npm538MIT