Overview

MCP server

@perfscale/mcp is a Model Context Protocol server that exposes the perfscale CLI to AI agents (Claude Code, Claude Desktop, and any other MCP client). The agent can author test YAML with schema-validated writes, run load tests, and read back structured metrics — without shell access.

Source: Perfscale/mcp. For the hosted platform (machines, runs, dashboards on perfscale.su/.ru) see the @perfscale/controlplane-mcp server in the same repository.

Setup

Requires the perfscale binary on PATH (override with PERFSCALE_BIN) and Node.js 20+.

{
  "mcpServers": {
    "perfscale": {
      "command": "npx",
      "args": ["-y", "@perfscale/mcp"]
    }
  }
}

With Claude Code:

claude mcp add perfscale -- npx -y @perfscale/mcp

Tools

ToolWhat it does
run_testRun a k6/locust/native test (perfscale run), return exit code + parsed summary export
lintValidate YAML files (perfscale lint), including typo and action-ID checks
get_schemaJSON Schema for test or config YAML (perfscale schema)
parse_summaryParse raw k6-compatible output into structured metrics
list_actionsCatalog of native std/* step actions
list_configsRecursively list YAML files in a directory, classified test/config
read_configRead one YAML file with its detected kind
write_testCreate/overwrite a test definition, then lint it against the test schema
write_configCreate/overwrite a run config, then lint it against the config schema
update_configOverwrite an existing file only (fails when absent), then lint
remove_configDelete a test/config YAML file

Every write is linted immediately — the agent sees schema violations in the same tool result, so invalid YAML never silently lands on disk.

Environment variables

VariableDefaultDescription
PERFSCALE_BINperfscalePath to the perfscale binary

Notes

  • get_schema requires a perfscale build with the schema subcommand — run perfscale self-update if you see an error mentioning it.
  • run_test executes locally with the same semantics as perfscale run: exactly one of k6/locust/file, and native tests require a config.