mcp

v0.3.8
@loadmill/mcp Checked 2 hours ago Published 29 days ago

Loadmill mcp library

The Loadmill MCP server exposes Loadmill’s test-management APIs to any Model Context Protocol (MCP) client. Use it to search, run, write and validate Loadmill tests without leaving your MCP-enabled IDE or agent workflow. Tool results for Loadmill entities include an environment-aware uiUrl when a corresponding page exists in the Loadmill UI.

Summary extracted from the README.

Loadmill MCP Server

The Loadmill MCP server exposes Loadmill’s test-management APIs to any Model Context Protocol (MCP) client. Use it to search, run, write and validate Loadmill tests without leaving your MCP-enabled IDE or agent workflow. Tool results for Loadmill entities include an environment-aware uiUrl when a corresponding page exists in the Loadmill UI.

Use Cases

  • Query Loadmill for information
  • Execute Loadmill tests
  • Write and maintain Loadmill tests

Note: When working with MCPs, make sure your client runs in Agent mode.

IDE Integration

VS Code

Important: You will have to generate a Loadmill API token from your Loadmill account settings to authenticate the MCP server.

{
  "servers": {
    "loadmill": {
      "type": "stdio",
      "command": "npx",
      "args": ["@loadmill/mcp"],
      "env": {
        "LOADMILL_API_TOKEN": "${input:loadmill-api-token}"
      }
    }
  },
  "inputs": [
    {
      "id": "loadmill-api-token",
      "type": "promptString",
      "description": "Loadmill API token",
      "password": true
    }
  ]
}

Cursor

{
  "mcpServers": {
    "loadmill": {
      "command": "npx",
      "args": ["@loadmill/mcp"],
      "env": {
        "LOADMILL_API_TOKEN": "${env:LOADMILL_API_TOKEN}"
      }
    }
  }
}

MCP Capabilities

Tools – Supports list_tools and call_tool; each tool returns standard MCP text content:

  • search_test_suites – Filter Loadmill test suites by text, dates, or labels.
  • search_test_flows – Find test flows by name or ID.
  • search_shared_flows – Find published shared flows by keywords in their descriptions or notes.
  • get_shared_flow – Fetch a shared flow's active configuration, or its unpublished configuration and edit metadata when using the draft view.
  • list_shared_flow_versions – List published versions with normalized titles, notes, dates, and active state.
  • update_shared_flow_draft – Validate and save a complete shared-flow draft without publishing or activating it.
  • update_shared_flow_metadata – Update a shared flow's description, notes, or protection state.
  • create_shared_flow – Create an empty unpublished shared-flow draft with optional notes and protection.
  • run_shared_flow_trial – Start a trial of the current shared-flow draft and return its run ID.
  • get_shared_flow_trial – Check the status and result of a previously started shared-flow trial.
  • publish_shared_flow_version – Publish the current draft as a new version without activating an existing shared flow.
  • activate_shared_flow_version – Explicitly make a published shared-flow version active for consuming tests.
  • search_test_suite_runs – Search historical test-suite flow runs.
  • run_test_suite – Trigger a test-suite execution by ID.
  • get_test_suite_run – Retrieve run details (including flow run IDs).
  • get_test_suite_flow_last_trial – Retrieve a regular flow’s latest trial with a stored result using its suite and flow IDs.
  • get_test_suite_flow_run – Inspect an individual flow run by ID.
  • search_test_plans – Browse Loadmill test plans with pagination.
  • get_test_plan – Fetch a plan's complete persisted configuration and ordered suites.
  • create_test_plan – Create and configure a plan with its name, notes, suites, execution settings, and optional UTC schedule.
  • update_test_plan – Partially update a plan or its UTC schedule while preserving unspecified configuration and reading back the persisted result.
  • archive_test_plan – Archive a specific plan after explicit confirmation.
  • run_test_plans – Start a plan with optional labels, parameter overrides, and a Git branch.
  • get_test_plan_run – Fetch plan-run details with shallow flow summaries, available failure reasons, and grouped retry attempts by default. Set fetchAllFlows: false for suite-level details only, or groupFlowAttempts: false for ungrouped flow attempts. Full flow artifacts are fetched separately with get_test_suite_flow_run.
  • get_labels – List team labels (id and description).
  • delete_labels – Delete an explicit list of team label IDs after user confirmation, reporting successes and failures separately. Also removes flow and test-plan references; does not check whether labels are unused.
  • rename_labels – Rename multiple labels by ID while preserving their colors and references, reporting successes and failures separately.
  • validate_test_suite – Validate a Loadmill test-suite YAML/JSON file, supplied suite content, or the current HEAD of a pushed Git branch against the official schema.
  • create_new_test_suite – Create a new, empty Loadmill test suite and return its ID.

Prompts – Supports list_prompts and get_prompt:

  • investigate_failed_test – Summarise a failed run and advise next steps.

Resources – Supports list_resources and read_resource:

  • loadmill://schemas/test-suite@v1 – Official JSON Schema for Loadmill test suites. Responses are cached locally for an hour.

Working with the Test-Suite Schema

  • After changing a suite, a client agent with filesystem access should validate the local YAML/JSON directly against the public Loadmill test-suite schema. This keeps the feedback loop local and avoids sending suite content through a remote MCP server.
  • Use validate_test_suite with path only when the MCP server shares the client agent's filesystem. A remote MCP server cannot read paths on the client machine.
  • For authoritative validation through a remote MCP server, commit and push the suite changes first. Then call validate_test_suite with id, branch, and platform. Loadmill validates the current remote HEAD of that branch. Uncommitted changes, unpushed commits, and earlier commits that are no longer the branch HEAD are not included.
  • For suites small enough to send directly, content remains available with raw YAML/JSON or a parsed suite object.

Once connected, your MCP client can mix these tools, prompts, and resources to automate Loadmill QA workflows end-to-end.

Note: run_test_suite can run specific flow IDs with flows, but this option cannot currently be combined with branch.