• EXECUTION
  • MONITORING
  • CONTROL
  • HUMAN

How to orchestrate k6 test executions with your AI

Connect your Grafana k6 Cloud account to your AI client to manage your testing lifecycle through chat.

Ask AI about this page

Short answer

Can I run k6 tests using my AI?

Yes. You can trigger new load tests, check the status of current runs, or kill active tests immediately. This gives you direct control over your testing environment through your agent. Here is how it works.

Test management outcomes

What you can do

What happens when you give your AI a command.

EXECUTION

New tests start

Your AI triggers a fresh load test run. You get confirmation that the execution is live.

MONITORING

Run status visibility

The AI pulls a list of all current and past executions. You can see exactly what is running right now.

CONTROL

Immediate test stops

If a test goes wrong, your AI kills the active run. This prevents wasted resources or runaway load.

HUMAN

Manual oversight

The AI handles the heavy lifting of command execution. You stay in charge of when to scale or pivot.

The workflow

What your AI does when <the thing arrives>.

The AI acts as the bridge between your chat and the Grafana k6 Cloud environment.

  1. Identify active runs

    Before taking action, your AI checks the current state of your testing environment to find the right target.

    list_runs
  2. Launch a test

    When you ask to begin a specific scenario, the AI sends the command to start the load generation.

    start_test_run
  3. Kill a runaway test

    If you notice issues in your metrics, you can tell your AI to stop the specific execution immediately.

    stop_test_run
  4. Verify execution state

    The AI confirms the outcome of your command, ensuring the test is either running or successfully stopped.

    list_runs

Try it

Copy these to start.

Use these prompts to interact with your k6 environment.

Starting points

Swap out the bracketed text for your specific test names or run IDs.

Grafana k6 Cloud Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_puXmxTGW8nXFX6Ap8jEn9n2TkxtxCWKVzu5Is9v7/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Grafana k6 Cloud capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "grafana-k6-cloud-load-testing-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_puXmxTGW8nXFX6Ap8jEn9n2TkxtxCWKVzu5Is9v7/mcp"
    }
  }
}
Copy into chat04
  • Show me all the k6 test runs currently active in my account.

  • Start a new k6 test run using the [test_script_name] script.

  • Stop the k6 test run with ID [run_id] right now.

  • List my recent k6 test runs so I can see the status of [test_name].

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Grafana k6 Cloud once, then ask.

Link your account in one click. Your credentials stay encrypted and secure, and you can start managing tests immediately.

Connect Grafana k6 Cloud to your AI

FAQ

How the orchestration works

  • 01

    Can my AI change the actual k6 test script code?

    No. The AI can only trigger, list, or stop runs using existing scripts.

  • 02

    Can the AI create new test users or accounts?

    No. The tools are limited to managing the execution of test runs.

  • 03

    Will the AI automatically stop a test if it fails?

    No. You must tell the AI to stop a run, or you must do it manually.

  • 04

    Can I see the results of a test through the AI?

    The AI can list the runs, but it does not have a tool to pull deep metric data or raw logs.

  • 05

    Does the AI handle the billing for my k6 Cloud account?

    No. All billing and account management stay within your Grafana k6 Cloud dashboard.

  • More questions about Grafana k6 Cloud? The Connector page answers them. See everything the Grafana k6 Cloud Connector can do

Connect Grafana k6 Cloud to Claude, Cursor, ChatGPT & more