perfsage-jmeter-mcp
Enables LLM agents to run self-healing JMeter performance tests via natural language, from environment setup to capacity discovery and SLO verdict reporting.
README
<p align="center"> <a href="./assets/readme/hero.svg"> <img src="./assets/readme/hero.gif" width="100%" alt="PerfSage JMeter MCP β your LLM becomes a performance engineer: heal, script, discover, verdict"> </a> </p>
<p align="center"> <strong>Self-healing JMeter for LLM agents.</strong><br/> Heal the runtime Β· auto-correlate scripts Β· discover capacity Β· ship a <code>p95</code>/<code>p99</code> verdict. </p>
<p align="center"> <a href="#-60-second-setup">π Setup</a> Β· <a href="#-why-teams-reach-for-this">β¨ Why</a> Β· <a href="#-how-it-works">π Flow</a> Β· <a href="#-tools">π§° Tools</a> Β· <a href="#-example-session">π¬ Demo</a> Β· <a href="https://perfsage.com">π PerfSage</a> </p>
π― What you get
Stop wrestling with Java paths, broken plugins, and hand-written extractors.
Point Cursor / Claude at this MCP server and ask for a performance test. It will:
- Heal Java + Apache JMeter 5.6.3 + plugins under
~/.perfsage(Docker fallback if needed) - Import HAR / OpenAPI / Postman traffic
- Auto-correlate tokens, cookies, and IDs into JMeter variables
- Discover the throughput knee when you donβt know the workload
- Report a PASS / WARN / FAIL led by p95 + p99 (never averages alone)
Analysis, not dashboards. Every run ends in a decision.
β‘ 60-second setup
Requires Python 3.10+. Prefer uv (macOS system python3 is often 3.9; uv-managed Pythons also block bare pip via PEP 668).
# try it (no install)
uvx perfsage-jmeter-mcp --version
uvx perfsage-jmeter-mcp
# install as a user tool (recommended)
uv tool install perfsage-jmeter-mcp
perfsage-jmeter-mcp --version
# or inside a project venv
uv venv --python 3.12
source .venv/bin/activate # Windows: .venv\Scripts\activate
uv pip install perfsage-jmeter-mcp
Do not run
python3.12 -m pip install β¦against a uv-managed interpreter β youβll getexternally-managed-environment. Useuv tool install/uv pip install/ a venv instead. Appleβs/usr/bin/python3(3.9) cannot see this package at all (requires-python >=3.10).
π Connect Cursor / Claude Desktop
Drop this into your MCP config (examples/cursor-mcp.json):
{
"mcpServers": {
"perfsage-jmeter": {
"command": "uvx",
"args": ["perfsage-jmeter-mcp"]
}
}
}
Then say:
βSet up the performance environment, then import
login_flow.harand give me a capacity recommendation.β
Thatβs the whole onboarding.
Fixture note:
tests/recorder/fixtures/login_flow.hartargetsshop.perfsage.test, which is offline. Use it to demo correlation / JMX generation only β not liverun_testsmoke. For runnable demos, import a HAR against a real host (for example JSONPlaceholder or your own staging URL).
β¨ Why teams reach for this
| Pain today | With PerfSage JMeter MCP |
|---|---|
| β βWrong Java / missing JMeter / plugin chaosβ | β
ensure_environment self-heals under ~/.perfsage β no sudo, no shell-profile edits |
| β Manual regex correlation for every token | β
correlate_flow detects CSRF / JWT / session IDs and wires extractors |
| β Guessing thread counts | β
discover_workload finds the knee, recommends 80% sustained load |
| β Average latency gates that lie | β Reports always include p95 + p99 + SLO verdict |
| β Client metrics disconnected from K8s | β Optional SignalPilot RCA + Reveal charts |
π How it works
<p align="center"> <img src="./assets/readme/workflow.svg" width="100%" alt="Workflow: Heal β Import β Correlate β Discover β Verdict"> </p>
| Step | Tool | Outcome |
|---|---|---|
| 1οΈβ£ | ensure_environment |
Ready runtime (native or Docker) |
| 2οΈβ£ | import_traffic |
Clean application Flow (static noise filtered) |
| 3οΈβ£ | correlate_flow + generate_jmx |
Replayable JMeter 5.6.3 plan |
| 4οΈβ£ | edit_jmx (optional) |
Workload / structure tweaks (burst, loops, JSR223, β¦) |
| 5οΈβ£ | run_test / discover_workload |
Guarded execution + capacity profile |
| 6οΈβ£ | compile_report |
Markdown + HTML + JSON, verdict first |
π¬ Example session
You: Set up the performance environment.
Agent: ensure_environment β ready=true, Java 21 + JMeter 5.6.3 under ~/.perfsage
You: Import tests/recorder/fixtures/login_flow.har (correlation demo; host is offline) and correlate it.
Agent: import_traffic β 4 app requests
correlate_flow β csrf_token, token, cart_id, SESSION (cookie-managed)
You: Generate a fixed plan at 20 threads / 120s, then run a 5-minute burst inside 20 minutes.
Agent: generate_jmx β ${__P(perfsage.threads,20)} / ${__P(perfsage.duration,120)}
edit_jmx β set_workload burst (Ultimate Thread Group)
run_test / discover_workload β guarded execution + capacity
You: Compile the report with examples/slo.properties.
Agent: compile_report β PASS/WARN/FAIL leading with p95 + p99
artifacts β ~/.perfsage/runs/<id>/report/
π§° Tools
| Tool | What it does |
|---|---|
π©Ί ensure_environment |
Diagnose + heal Java / JMeter / plugins / Docker |
π diagnose_environment |
Read-only readiness report |
π₯ import_traffic |
HAR / OpenAPI / Postman β Flow |
π correlate_flow |
Dynamic values β variables + extractors |
π generate_jmx |
Correlated Flow β JMeter 5.6.3 plan |
βοΈ edit_jmx |
Structured ops on an existing plan (new file by default) |
π run_test |
Execute with always-on guardrails |
π discover_workload |
Adaptive knee-point discovery |
π analyze_results |
JTL β metrics, bottlenecks, p95/p99 |
β
evaluate_slo |
Gate against slo.properties |
βΈοΈ correlate_with_signalpilot |
Merge Kubernetes RCA for the test window |
π¦ compile_report |
Unified Markdown + HTML + JSON |
Full schemas & sample payloads: docs/TOOLS.md
π‘οΈ Environment gate (runs first)
Every JMeter-touching tool calls ensure_environment first:
| Condition | Action |
|---|---|
| Java missing / outside 17β21 | Download Temurin JDK 21 into ~/.perfsage/jdk/ |
| JMeter missing / < 5.6.3 | Download Apache JMeter 5.6.3 + verify ASF SHA-512 |
| Plugins missing | Install jpgc-casutg, jpgc-tst, jpgc-json, jpgc-dummy, perfsage-slo-reporter |
| Host canβt be provisioned | Fall back to Docker (justb4/jmeter) and say so |
| Neither works | Structured failure: attempted Β· failed Β· values |
π Nothing writes outside ~/.perfsage (or your working directory). No JAVA_HOME mutations. No package-manager side effects.
π§© Ecosystem
| Project | Role |
|---|---|
| Reveal | JTL analysis + chart pack |
| SLO Reporter | SLO gate format + Backend Listener |
| SignalPilot | Kubernetes RCA for the test window |
| perfsage.com | Brand home Β· Field Notes Β· tools |
π οΈ Development
uv run --python 3.12 --extra dev pytest
uv run --python 3.12 --extra dev ruff check .
uv run --python 3.12 --extra dev mypy perfsage_jmeter_mcp
Real JMeter e2e: tests/test_end_to_end.py (e2e marker).
Architecture notes: docs/ARCHITECTURE.md
π License
MIT
Apache JMeter is a trademark of the Apache Software Foundation. This project is an independent tool and is not affiliated with or endorsed by the ASF.
<p align="center"> <strong>Ready when your agent is.</strong><br/> <code>uvx perfsage-jmeter-mcp</code> Β· then ask it to <code>ensure_environment</code> </p>
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.