K6SAFE
k6 MCP server
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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
🔧 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.git
- Install the required dependencies:
uv pip install -r requirements.txt
- Set up environment variables (optional):
Create a .env file 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, d
7330d88f3270OBSERVED · 2026-10-09Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add k6-mcp-server -- uvx k6-mcp-server
{
"mcpServers": {
"k6-mcp-server": {
"command": "uvx",
"args": [
"k6-mcp-server"
]
}
}
}Exposed tools (2)
0 read · 2 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
execute_k6_test | write | Execute a k6 load test. |
execute_k6_test_with_options | write | Execute a k6 load test with custom duration and VUs. |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (1)
fastmcp, python-dotenv
Gates applied: no_behavioural_pass.
7330d88f3270full audit observations/trust-audit/mcp-server/qainsights__k6.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-09 | 7330d88f3270 | SAFE | B | 89 | first audit |
Questions
What is the K6 MCP server?
k6 MCP server
What tools does K6 expose?
2 in total: 0 read-only, 2 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is K6 safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does K6 need?
No credential environment variables were found in its source, so it appears to need none.
How does K6 run?
It speaks stdio, so it runs as a local process your client starts. It is published on PyPI as k6-mcp-server.
How current is this page?
The grade is for one exact copy of the source (7330d88f3270), read on 2026-10-09. The repository is watched and re-audited when it changes.