Execute and Analyze JMeter Load Tests
An MCP server for executing JMeter load tests and analyzing JTL results, with automatic bottleneck detection and HTML reports.
1.0.0Add to Favorites
Why it matters
Automate the execution and analysis of Apache JMeter load tests. This asset enables running tests in non-GUI mode, capturing results, and identifying performance bottlenecks with actionable insights.
Outcomes
What it gets done
Execute JMeter tests in non-GUI mode.
Analyze JTL test results for key metrics.
Identify performance bottlenecks and provide recommendations.
Generate visualizations and HTML reports of test results.
Source
Get it from source
Spark does not host a copy of it.
Open sourceReports
Agent outcome reports
No reports yet
Capabilities
Tools your agent gets
Launches JMeter in GUI mode for test execution and interaction.
Executes a JMeter test in non-GUI mode for better performance.
Analyzes JMeter test results and provides summary of key metrics.
Identifies performance bottlenecks in JMeter test results.
Obtains analytics and recommendations for performance improvement.
Generates visualizations of JMeter test results.
Overview
JMeter MCP Server
An MCP server that executes JMeter load tests and analyzes their JTL results, automatically calculating performance metrics, identifying bottlenecks, and generating recommendations, visualizations, and HTML reports. Use it when an MCP client needs to run JMeter tests and interpret results conversationally; requires a local JMeter and Python environment, not a hosted service.
What it does
This MCP server executes JMeter tests through MCP-compatible clients and analyzes their results. On the execution side it can run a JMeter test in non-GUI mode (the default, for better performance) or launch JMeter in GUI mode for test development, capturing and returning execution output and generating a JMeter report dashboard. On the analysis side it parses and analyzes JMeter test results (JTL files), calculates comprehensive performance metrics, automatically identifies performance bottlenecks, generates actionable insights and recommendations, creates visualizations, and produces HTML reports.
The Test Results Analyzer behind this is built from several components. A Parser Module supports both XML and CSV JTL formats, streams large files efficiently, and validates formats with graceful error handling. A Metrics Calculator computes overall performance metrics (average, median, percentiles), endpoint-specific metrics, time-series metrics to track performance over time, and comparisons against benchmarks. A Bottleneck Analyzer identifies slow endpoints by response time, detects error-prone endpoints with high error rates, finds response-time anomalies and outliers, and analyzes the impact of concurrency on performance. An Insights Generator turns that analysis into specific recommendations for addressing bottlenecks, analyzes error patterns, generates insights on scaling behavior and capacity limits, and prioritizes recommendations by potential impact. A Visualization Engine creates time-series graphs, response-time distribution graphs, endpoint comparison charts, and comprehensive HTML reports combining all of the above.
When to use - and when NOT to
Use it when you want an MCP client (Claude Desktop, Cursor, Windsurf, or similar) to run JMeter load tests and interpret the results conversationally - for example asking it to run a .jmx test file in non-GUI mode, then analyze the resulting .jtl file for bottlenecks, get recommendations, or generate a visualization. It requires a working local JMeter installation and Python environment; it is not a hosted or SaaS load-testing service.
Capabilities
Execution tools: execute_jmeter_test (launches JMeter in GUI mode - by JMeter's own design this does not execute the test), and execute_jmeter_test_non_gui (executes a test in non-GUI mode, the default for better performance). Analysis tools: analyze_jmeter_results (summarizes key metrics and insights), identify_performance_bottlenecks, get_performance_insights (recommendations for improving performance), and generate_visualization. The server validates inputs before running - it checks that the test file exists and has a .jmx extension, validates that JTL files exist and are in a valid format, and captures and returns any execution or analysis errors.
How to install
Install uv, ensure JMeter is installed and accessible on the command line and made executable (chmod +x /path/to/jmeter/bin/jmeter), then install Python dependencies with pip install -r requirements.txt. Configure a .env file (see .env.example):
# JMeter Configuration
JMETER_HOME=/path/to/apache-jmeter-5.6.3
JMETER_BIN=${JMETER_HOME}/bin/jmeter
# Optional: JMeter Java options
JMETER_JAVA_OPTS="-Xms1g -Xmx2g"
Then add the server to your MCP client config, running it via uv with the server directory and jmeter_server.py as arguments, and connect from an MCP-compatible client such as Claude Desktop, Cursor, or Windsurf.
Who it's for
Performance engineers and developers who already write JMeter test plans and want an MCP client to run those tests, parse the resulting JTL files, surface bottlenecks and recommendations, and generate shareable HTML reports without manually digging through raw results.
Source README
🚀 JMeter MCP Server
This is a Model Context Protocol (MCP) server that allows executing JMeter tests through MCP-compatible clients and analyzing test results.
📋 Features
JMeter Execution
- 📊 Execute JMeter tests in non-GUI mode
- 🖥️ Launch JMeter in GUI mode
- 📝 Capture and return execution output
- 📊 Generate JMeter report dashboard
Test Results Analysis
- 📈 Parse and analyze JMeter test results (JTL files)
- 📊 Calculate comprehensive performance metrics
- 🔍 Identify performance bottlenecks automatically
- 💡 Generate actionable insights and recommendations
- 📊 Create visualizations of test results
- 📑 Generate HTML reports with analysis results
🛠️ Installation
Local Installation
Install
uv:Ensure JMeter is installed on your system and accessible via the command line.
⚠️ Important: Make sure JMeter is executable. You can do this by running:
chmod +x /path/to/jmeter/bin/jmeter
- Install required Python dependencies:
pip install -r requirements.txt
- Configure the
.envfile, refer to the.env.examplefile for details.
# JMeter Configuration
JMETER_HOME=/path/to/apache-jmeter-5.6.3
JMETER_BIN=${JMETER_HOME}/bin/jmeter
# Optional: JMeter Java options
JMETER_JAVA_OPTS="-Xms1g -Xmx2g"
💻 MCP Usage
Connect to the server using an MCP-compatible client (e.g., Claude Desktop, Cursor, Windsurf)
Send a prompt to the server:
Run JMeter test /path/to/test.jmx
- MCP compatible client will use the available tools:
JMeter Execution Tools
- 🖥️
execute_jmeter_test: Launches JMeter in GUI mode, but doesn't execute test as per the JMeter design - 🚀
execute_jmeter_test_non_gui: Execute a JMeter test in non-GUI mode (default mode for better performance)
Test Results Analysis Tools
- 📊
analyze_jmeter_results: Analyze JMeter test results and provide a summary of key metrics and insights - 🔍
identify_performance_bottlenecks: Identify performance bottlenecks in JMeter test results - 💡
get_performance_insights: Get insights and recommendations for improving performance - 📈
generate_visualization: Generate visualizations of JMeter test results
🏗️ MCP Configuration
Add the following configuration to your MCP client config:
{
"mcpServers": {
"jmeter": {
"command": "/path/to/uv",
"args": [
"--directory",
"/path/to/jmeter-mcp-server",
"run",
"jmeter_server.py"
]
}
}
}
✨ Use Cases
Test Execution
- Run JMeter tests in non-GUI mode for better performance
- Launch JMeter in GUI mode for test development
- Generate JMeter report dashboards
Test Results Analysis
- Analyze JTL files to understand performance characteristics
- Identify performance bottlenecks and their severity
- Get actionable recommendations for performance improvements
- Generate visualizations for better understanding of results
- Create comprehensive HTML reports for sharing with stakeholders
🛑 Error Handling
The server will:
- Validate that the test file exists
- Check that the file has a .jmx extension
- Validate that JTL files exist and have valid formats
- Capture and return any execution or analysis errors
📊 Test Results Analyzer
The Test Results Analyzer is a powerful feature that helps you understand your JMeter test results better. It consists of several components:
Parser Module
- Supports both XML and CSV JTL formats
- Efficiently processes large files with streaming parsers
- Validates file formats and handles errors gracefully
Metrics Calculator
- Calculates overall performance metrics (average, median, percentiles)
- Provides endpoint-specific metrics for detailed analysis
- Generates time series metrics to track performance over time
- Compares metrics with benchmarks for context
Bottleneck Analyzer
- Identifies slow endpoints based on response times
- Detects error-prone endpoints with high error rates
- Finds response time anomalies and outliers
- Analyzes the impact of concurrency on performance
Insights Generator
- Provides specific recommendations for addressing bottlenecks
- Analyzes error patterns and suggests solutions
- Generates insights on scaling behavior and capacity limits
- Prioritizes recommendations based on potential impact
Visualization Engine
- Creates time series graphs showing performance over time
- Generates distribution graphs for response time analysis
- Produces endpoint comparison charts for identifying issues
- Creates comprehensive HTML reports with all analysis results
📝 Example Usage
# Run a JMeter test and generate a results file
Run JMeter test sample_test.jmx in non-GUI mode and save results to results.jtl
# Analyze the results
Analyze the JMeter test results in results.jtl and provide detailed insights
# Identify bottlenecks
What are the performance bottlenecks in the results.jtl file?
# Get recommendations
What recommendations do you have for improving performance based on results.jtl?
# Generate visualizations
Create a time series graph of response times from results.jtl
FAQ
Common questions
Trust
How it checks out
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.