Self-healing JMeter for LLM agents.
Heal the runtime · auto-correlate scripts · discover capacity · ship a p95/p99 verdict.
🚀 Setup · ✨ Why · 🔁 Flow · 🧰 Tools · 💬 Demo · 🌐 PerfSage
🎯 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
| 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.
Ready when your agent is.
uvx perfsage-jmeter-mcp · then ask it to ensure_environment
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file perfsage_jmeter_mcp-0.2.1.tar.gz.
File metadata
- Download URL: perfsage_jmeter_mcp-0.2.1.tar.gz
- Upload date:
- Size: 990.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
153b30b6abc0f5d736a7fcf008ed1f4d5550684f8f05027479a050ecc8b2d280
|
|
| MD5 |
f13ae8d8b5fbc06490443377dfd44055
|
|
| BLAKE2b-256 |
3853abe501af87aac69551be4528e353531395f8be5a83ef49d0737445c9f750
|
Provenance
The following attestation bundles were made for perfsage_jmeter_mcp-0.2.1.tar.gz:
Publisher:
publish.yml on perfsage/perfsage-jmeter-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perfsage_jmeter_mcp-0.2.1.tar.gz -
Subject digest:
153b30b6abc0f5d736a7fcf008ed1f4d5550684f8f05027479a050ecc8b2d280 - Sigstore transparency entry: 2395600210
- Sigstore integration time:
-
Permalink:
perfsage/perfsage-jmeter-mcp@4e793a6a83ddd2c5e0e90cdfa88f2a346ba4c168 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/perfsage
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4e793a6a83ddd2c5e0e90cdfa88f2a346ba4c168 -
Trigger Event:
release
-
Statement type:
File details
Details for the file perfsage_jmeter_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: perfsage_jmeter_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 86.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a185f2e4b5fd0bb100f06041e385948882106480a11f287f4ea8e9f2d00b9ec0
|
|
| MD5 |
e605f79e2795650f0badde5753ab0c26
|
|
| BLAKE2b-256 |
8b36ba6ccb0d801ada9dcc6ecc793c227f8edef06cb6caac37e2963cc7e4e6d0
|
Provenance
The following attestation bundles were made for perfsage_jmeter_mcp-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on perfsage/perfsage-jmeter-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perfsage_jmeter_mcp-0.2.1-py3-none-any.whl -
Subject digest:
a185f2e4b5fd0bb100f06041e385948882106480a11f287f4ea8e9f2d00b9ec0 - Sigstore transparency entry: 2395600324
- Sigstore integration time:
-
Permalink:
perfsage/perfsage-jmeter-mcp@4e793a6a83ddd2c5e0e90cdfa88f2a346ba4c168 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/perfsage
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4e793a6a83ddd2c5e0e90cdfa88f2a346ba4c168 -
Trigger Event:
release
-
Statement type: