Skip to main content

K6 Load Testing MCP Server for performance testing

Project description

K6 MCP Server

A Model Context Protocol (MCP) server for running k6 load tests and stress tests.

Features

  • Load Testing: Run k6 load tests with configurable virtual users, duration, and request parameters
  • Stress Testing: Run multi-stage stress tests to gradually increase load
  • JSON Results: Get detailed test results in JSON format
  • Flexible Configuration: Support for custom HTTP methods, headers, body, and thresholds

Prerequisites

Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. Run the server:
python index.py

Tools

run_k6_load_test

Run a k6 load test against a specific URL.

Parameters:

  • url (required): Target URL for the load test
  • vus (optional): Number of virtual users (default: 10)
  • duration (optional): Test duration (default: "30s")
  • rps (optional): Requests per second limit
  • method (optional): HTTP method (default: "GET")
  • headers (optional): HTTP headers object
  • body (optional): Request body for POST/PUT requests
  • thresholds (optional): k6 thresholds for pass/fail criteria

Example:

{
  "url": "https://httpbin.org/get",
  "vus": 20,
  "duration": "1m",
  "method": "GET",
  "headers": {
    "User-Agent": "k6-test"
  }
}

run_k6_stress_test

Run a k6 stress test with multiple stages to gradually increase load.

Parameters:

  • url (required): Target URL for the stress test
  • stages (optional): Array of stages with duration and target VUs
  • method (optional): HTTP method (default: "GET")
  • headers (optional): HTTP headers object
  • body (optional): Request body for POST/PUT requests
  • thresholds (optional): k6 thresholds for pass/fail criteria

Example:

{
  "url": "https://httpbin.org/get",
  "stages": [
    {"duration": "2m", "target": 10},
    {"duration": "5m", "target": 20},
    {"duration": "2m", "target": 0}
  ]
}

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

k6_mcp_server-2.0.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

k6_mcp_server-2.0.0-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

Details for the file k6_mcp_server-2.0.0.tar.gz.

File metadata

  • Download URL: k6_mcp_server-2.0.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.4

File hashes

Hashes for k6_mcp_server-2.0.0.tar.gz
Algorithm Hash digest
SHA256 52a83dfbedd606c70c49ed0f0ae1cdc70e9232f7e10ae9d7d0446fc123a80ab8
MD5 6ff84eeede38d8b958d309da78e3467b
BLAKE2b-256 bd0414f86f1aa2c83290231f1044e600d13b5edf6a4507601852e5d5f3d91790

See more details on using hashes here.

File details

Details for the file k6_mcp_server-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for k6_mcp_server-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad967793029966dbe9b6fef852894aa4ee4a33aa017221da08e46cdb7492d807
MD5 8850cc7c27857487d9c2bc7646d4666c
BLAKE2b-256 2e56a0832e2ebf566a244045a179ac13d47fe496f9586450108f5ff8efbebcfa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page