SuperAPI AI Directory

k6-mcp-server

Performance testing with Grafana k6.

Open website

About this tool

k6-mcp-server is a server implementation based on the Model Context Protocol (MCP), designed specifically for running k6 load tests. It allows users to trigger k6 tests through natural language instructions via MCP clients (such as Claude Desktop, Cursor, Windsurf, etc.), thereby simplifying the performance testing process.

Main Capabilities

  • Simple integration with the Model Context Protocol framework.
  • Supports custom test duration and number of virtual users (VUs).
  • Provides an easy-to-use API for running k6 load tests.
  • Can be configured through environment variables.
  • Outputs test execution results in real time.

Usage

  1. Make sure Python 3.12 or later, the k6 load testing tool, and the uv package manager are installed.
  2. Clone the repository and install the required dependencies.
  3. Optionally create a .env file to set environment variables.
  4. Create a k6 test script (for example, test.js).
  5. Configure the server in the MCP client.
  6. Issue an instruction to the LLM, such as "run k6 test for hello.js", and the server will call one of the following tools to start the test:
    • execute_k6_test: Run the test with default options (30-second duration, 10 VUs).
    • execute_k6_test_with_options: Run the test with custom duration and VUs.

API Reference

  • Execute K6 Test
  • Execute K6 Test with Custom Options
  • LLM-Powered Result Analysis
  • Effective Load Testing Debugging

Limitations and Notes

  • Requires Python 3.12+, k6, and uv to be installed in advance.
  • Specific feature details, fees, or pricing information are not currently provided.
  • This project uses the MIT License.