JMeter MCP Server

$uv sync
README.md

Execute and analyze JMeter performance tests through MCP-compatible clients.

šŸš€ JMeter MCP Server

This is a Model Context Protocol (MCP) server that allows executing JMeter tests through MCP-compatible clients and analyzing test results.

[!IMPORTANT] šŸ“¢ Looking for an AI Assistant inside JMeter? šŸš€ Check out Feather Wand

Anthropic Cursor Windsurf

šŸ“‹ 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

  1. Install `uv`:

  2. 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
  1. Install dependencies and run the server:
uv sync
  1. Configure the .env file, refer to the .env.example file 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

  1. Connect to the server using an MCP-compatible client (e.g., Claude Desktop, Cursor, Windsurf)

  2. Send a prompt to the server:

Run JMeter test /path/to/test.jmx
  1. 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": "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 resul

Tools (6)

execute_jmeter_testLaunches JMeter in GUI mode for test development.
execute_jmeter_test_non_guiExecute a JMeter test in non-GUI mode for better performance.
analyze_jmeter_resultsAnalyze JMeter test results and provide a summary of key metrics and insights.
identify_performance_bottlenecksIdentify performance bottlenecks in JMeter test results.
get_performance_insightsGet insights and recommendations for improving performance.
generate_visualizationGenerate visualizations of JMeter test results.

Environment Variables

JMETER_HOMErequiredPath to the Apache JMeter installation directory
JMETER_BINrequiredPath to the JMeter executable binary
JMETER_JAVA_OPTSOptional Java options for JMeter execution

Configuration

claude_desktop_config.json
{"mcpServers": {"jmeter": {"command": "uv", "args": ["--directory", "/path/to/jmeter-mcp-server", "run", "jmeter_server.py"]}}}

Try it

→Run JMeter test /path/to/test.jmx in non-GUI mode
→Analyze the JMeter results file results.jtl and identify any performance bottlenecks
→Generate a visualization and performance insights for my latest load test results
→Launch the JMeter GUI to help me develop a new test plan
→Create a comprehensive HTML report from the JTL test results

Frequently Asked Questions

What are the key features of JMeter MCP Server?

Execute JMeter tests in non-GUI mode with output capture. Parse and analyze JTL files in both XML and CSV formats. Identify slow endpoints and response time anomalies automatically. Generate performance visualizations and HTML report dashboards. Provide actionable recommendations for scaling and capacity limits.

What can I use JMeter MCP Server for?

Automated performance test execution via AI chat interfaces. Rapid identification of performance bottlenecks in large JTL result files. Generating stakeholder-ready performance reports and visualizations. Analyzing error patterns and scaling behavior of web applications. Streamlining the JMeter test development workflow using GUI and non-GUI modes.

How do I install JMeter MCP Server?

Install JMeter MCP Server by running: uv sync

What MCP clients work with JMeter MCP Server?

JMeter MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use JMeter MCP Server with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free