jmeter-mcp-server
Allows generating, running, and analyzing Apache JMeter performance tests from structured API sources such as OpenAPI files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@jmeter-mcp-server Generate a baseline test plan from the attached OpenAPI spec."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
JMeter MCP Server
An MCP server for generating, validating, running, and reporting Apache JMeter API performance tests from structured API sources.
The project is designed for SDETs and automation engineers who want LLM-assisted test-plan creation without letting the LLM write arbitrary JMX. The LLM supplies structured MCP tool arguments; TypeScript code validates the input, applies deterministic load policies, renders JMX, and validates the generated file.
Features
Generate JMeter
.jmxplans from OpenAPI files or explicit endpoint details.Deterministic test profiles:
smoke,baseline,load,spike,stress,soak, andcustom.Zod-validated MCP tool inputs.
Guardrails for aggressive load, documented rate limits, and profile mismatch.
Runtime parameterization for credentials with JMeter properties such as
${__P(API_KEY,)}.OS-agnostic JMeter binary resolution through
JMETER_BIN,JMETER_HOME, orjmeteronPATH.TypeScript runner scripts for individual JMX files, suites, and JTL summary reports.
GitHub Actions CI for strict TypeScript build and guardrail tests.
Related MCP server: JMeter MCP Server
Prerequisites
Node.js
>=22npm
Apache JMeter
5.6.xor compatibleJava supported by your JMeter installation
JMeter can be discovered in one of three ways:
export JMETER_BIN=/absolute/path/to/jmeteror:
export JMETER_HOME=/absolute/path/to/apache-jmeteror by having jmeter available on PATH.
Install
npm ci
npm run build:all
npm testMCP Usage
Build the server:
npm run buildConfigure your MCP client to run:
node /absolute/path/to/jmeter-mcp-server/build/index.jsOr use a short command after linking the package locally:
npm link
jmeter-mcp-serverSee docs/MCP_CLIENTS.md for Claude, Claude Code, VS Code/Copilot-style, Continue-style, and generic MCP client examples.
Use the high-level tool for deterministic generation:
create_test_plan_from_api_sourcePrefer this high-level tool over step-by-step JMX edits. It validates inputs, applies load-profile policy, renders a complete plan, and validates the generated JMX.
Test Profiles
Profile | Users | Ramp-up | Loops | Duration | Notes |
| 1 | 1s | 1 | none | Minimal validation |
| 5 | 5s | 1 | none | Safe default |
| 10 | 30s | 3 | none | Moderate load |
| 25 | 1s | 1 | none | Requires |
| 50 | 60s | 5 | none | Requires |
| 5 | 60s | forever | 1800s | Requires |
| required | optional | optional | optional | Fully explicit |
Deterministic profiles reject mismatched overrides. For example, testProfile=baseline with users=6 fails. Use testProfile=custom when you need custom values.
Guardrails
The generation path is intentionally constrained:
LLM request
-> MCP tool schema
-> Zod validation
-> deterministic profile policy
-> source parsing
-> normalized test plan model
-> JMX renderer
-> generated JMX validation
-> output fileThe MCP rejects:
missing
usersforcustomprofilesdeterministic profile overrides that do not match policy
aggressive profiles without
allowAggressiveLoad=trueestimated request rates above a documented OpenAPI rate limit unless explicitly allowed
malformed headers, placeholder hosts, unsupported protocols, and incomplete request body metadata
Generated JMX validation checks required JMeter components, thread settings, loop settings, duration settings, endpoint target, headers, variables, assertions, and result collectors.
Credentials And Variables
Do not commit .env.
Copy the example locally:
cp .env.example .envGenerated JMX files use JMeter properties and do not need secrets embedded:
${__P(API_KEY,)}
${__P(OAUTH_CLIENT_ID,)}
${__P(OAUTH_CLIENT_SECRET,)}At runtime, pass values through JMeter properties or set JMETER_ENV_FILE:
JMETER_ENV_FILE=.env npm run jmeter:run -- jmeter/API_Test_Plan_4th_API.jmx results/local-runScripts
Build:
npm run build:allRun guardrail tests:
npm testGenerate JMX suite from OpenAPI:
npm run generate:jmeter:suite -- openapi.yaml jmeter 5Run one JMX:
npm run jmeter:run -- jmeter/API_Test_Plan_1st_API.jmx results/local-runRun a suite:
npm run jmeter:suite -- jmeter results/suiteGenerate a suite report from JTL files:
npm run jmeter:report -- results/suite/<run-directory>Rate Limits And Public APIs
Do not run aggressive tests against public or third-party APIs unless the API owner explicitly allows it.
For public practice APIs, prefer smoke or baseline. Profiles such as spike, stress, and soak require explicit opt-in through allowAggressiveLoad=true.
Repository Hygiene
Ignored by default:
.env,.env.*.continue/,.vscode/node_modules/build/results/*.log*.jtl
Commit-worthy files are source, configuration, docs, workflows, OpenAPI examples, and intentional JMX examples.
Development
npm ci
npm run build:all
npm testCI runs:
npm run ciwhich performs a strict TypeScript build and guardrail tests.
Status
This project is suitable for early public adoption by SDETs who are comfortable with MCP, JMeter, and TypeScript. The core guardrails are deterministic and tested. Additional API source adapters such as Postman collections, HAR files, or GraphQL schemas can be added behind the existing adapter interfaces.
Available Tools
13 toolsadd_assertionB
Add an assertion to validate responses
Inputs: type (required), value (required), testfile (required), samplerName (required), +1 more.
add_csv_data_configC
Add a CSV Data Set Config for data-driven testing
Inputs: filename (required), testfile (required), variableNames (required), name, +5 more.
add_http_samplerB
Add an HTTP request sampler to an existing test plan
Inputs: name (required), path (required), method (required), testfile (required), +8 more.
add_timerB
Add a timer for think time / delays between requests
Inputs: type (required), delay (required), testfile (required), name, +1 more.
create_test_planB
Create a new JMeter test plan with a default thread group
Inputs: name (required), numthreads (required), outputfile (required), targethost (required), +2 more.
create_test_plan_from_api_sourceC
Create a JMeter test plan from an API source. Supported sourceType values: openapi, endpoint.
Inputs: outputfile (required), sourceType (required), body, name, +17 more.
create_test_plan_from_openapiB
Create a JMeter test plan from an OpenAPI YAML/JSON file. Use this when the user asks for a plan based on an OpenAPI file.
Inputs: outputfile (required), openapiFile (required), name, loops, +9 more.
delete_elementB
Delete an element from a test plan by name
Inputs: testfile (required), elementName (required).
generate_reportB
Generate an HTML report from JMeter test results
Inputs: inputdir (required), outputdir (required).
list_testsA
List all JMeter test files (.jmx) in a directory
Inputs: directory (required).
read_test_fileA
Read and parse a JMeter test file to show its structure
Inputs: testfile (required).
run_testC
Run a JMeter test plan and return results
Inputs: testfile (required), outputdir.
update_thread_groupB
Update thread group settings (threads, ramp-up, loops, duration)
Inputs: testfile (required), delay, loops, duration, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools have clearly distinct purposes, but the three create_test_plan variants overlap, especially create_test_plan_from_api_source with sourceType=openapi and create_test_plan_from_openapi. The explicit routing hint in the OpenAPI tool description helps, but an agent still faces ambiguity about which creation tool to use.
All tools follow a consistent snake_case verb_noun pattern, such as add_http_sampler, update_thread_group, and generate_report. Even the longer create_test_plan_from_* names stay predictable and readable.
Thirteen tools is within the appropriate range for a JMeter-focused server and covers creation, editing, execution, and reporting. The count is slightly higher than necessary because create_test_plan_from_openapi is largely redundant with create_test_plan_from_api_source.
The server covers the main JMeter workflow: create/read plans, add core elements, run tests, and generate reports. However, updates are limited to thread group settings; samplers, assertions, timers, and config elements can only be deleted and recreated, which is a notable gap for iterative test editing.
Maintenance
Related MCP Connectors
MCP server for AI access to Swagger by SmartBear.
An MCP server that provides bazaarvoic JOLT transformation capabilities.
Host any HTTP API as a standard MCP server; auto-distribute to 12+ mainstream agent platforms.
MCP server for the Seline Analytics API
Related MCP Servers
- FlicenseCqualityDmaintenanceA Model Context Protocol server that enables executing and interacting with JMeter tests through MCP-compatible clients like Claude Desktop, Cursor, and Windsurf.2-
- FlicenseCqualityDmaintenanceA Model Context Protocol server that enables execution of JMeter performance tests through AI assistants and MCP-compatible clients like Claude, Cursor, and Windsurf.2-
- AlicenseAqualityDmaintenanceMCP server for API test case generation from Swagger/OpenAPI specs. Parses Swagger 2.0 and OpenAPI 3.x, generates test cases across 8 categories (positive, negative, boundary, auth, security, idempotency, pagination, business logic), and exports to Postman, TestRail, Allure, k6, pytest, Gherkin, and CSV. Supports internal corporate APIs with auth headers. Auto-saves export files to your working di1010 npm2MIT
- AlicenseNot gradedqualityDmaintenanceA powerful MCP server for automated JMeter test generation and execution with Docker integration and comprehensive performance analysis.64 npm1MIT