SuperAPI AI Directory

jmeter-mcp-server

Performance testing with JMeter.

Open website

About this tool

JMeter MCP Server is a Model Context Protocol (MCP) server designed to integrate JMeter performance testing with AI workflows. It allows users to execute JMeter tests and analyze test results through MCP-compatible clients such as Claude Desktop, Cursor, and Windsurf.

Key Capabilities

JMeter Execution

  • Execute JMeter tests in non-GUI mode (default mode, better performance)
  • Launch JMeter in GUI mode (for test development)
  • Capture and return execution output
  • Generate JMeter report dashboards

Test Result Analysis

  • Parse and analyze JMeter test results (JTL files), supporting XML and CSV formats
  • Calculate comprehensive performance metrics (average, median, percentiles, etc.)
  • Automatically identify performance bottlenecks
  • Generate actionable insights and recommendations
  • Create visual charts of test results
  • Generate HTML reports containing analysis results

Usage

Installation

  1. Ensure JMeter is installed on the system and accessible via the command line.
  2. Ensure JMeter is executable.
  3. Install the required Python dependencies.
  4. Configure the .env file (refer to .env.example).
  5. Connect to the server using an MCP-compatible client.
  6. Send prompts to the server, and the MCP client will use the available tools.

MCP Configuration

Add the corresponding configuration in the MCP client configuration.

Available Tools

  • execute_jmeter_test: Launch JMeter in GUI mode, but do not execute tests (according to JMeter design)
  • execute_jmeter_test_non_gui: Execute JMeter tests in non-GUI mode (default mode, better performance)
  • 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 visual charts of JMeter test results

Applicable Scenarios

  • Run JMeter tests in non-GUI mode for better performance
  • Start JMeter in GUI mode for test development
  • Generate JMeter report dashboards
  • Analyze JTL files to understand performance characteristics
  • Identify performance bottlenecks and their severity
  • Obtain actionable performance improvement recommendations
  • Generate visual charts to better understand results
  • Create comprehensive HTML reports to share with stakeholders

Error Handling

The server will:

  • Verify that the test file exists
  • Check that the file has a .jmx extension
  • Verify that the JTL file exists and is in a valid format
  • Capture and return any execution or analysis errors

Test Results Analyzer

The Test Results Analyzer is a powerful feature that helps to better understand JMeter test results. It consists of multiple components:

Parser

  • Supports XML and CSV JTL formats
  • Uses a streaming parser to efficiently handle large files
  • Validates the file format 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 changes over time
  • Compares metrics with baselines to provide context

Bottleneck Analyzer

  • Identifies slow endpoints based on response time
  • Detects error-prone endpoints with high error rates
  • Discovers response time anomalies and outliers
  • Analyzes the impact of concurrency on performance

Insights Generator

  • Provides specific recommendations to address bottlenecks
  • Analyzes error patterns and suggests solutions
  • Generates insights about scaling behavior and capacity limits
  • Prioritizes recommendations based on potential impact

Visualization Engine

  • Creates time series charts showing performance changes over time
  • Generates distribution charts for response time analysis
  • Produces endpoint comparison charts to identify issues
  • Creates comprehensive HTML reports containing all analysis results

Limitations

  • Requires JMeter to be pre-installed and accessible via the command line
  • Requires Python dependencies to be installed and a .env file to be configured
  • Requires an MCP-compatible client to connect
  • The specific supported JMeter versions, Python versions, etc. are not yet provided