JMeter MCP server

Enables natural language execution of JMeter performance tests in both GUI and non-GUI modes, returning detailed results for automated load testing workflows.
Back to servers
Setup instructions
Provider
NaveenKumar Namachivayam
Release date
Mar 29, 2025
Language
Python
Stats
34 stars

This MCP server allows you to execute JMeter tests and analyze their results through MCP-compatible clients like Claude Desktop, Cursor, or Windsurf. It provides tools for both running JMeter tests and performing in-depth analysis of test results to identify performance bottlenecks and optimize your applications.

Prerequisites

  • JMeter installed on your system
  • Python with required dependencies
  • An MCP-compatible client

Installation

Setting Up JMeter MCP Server

  1. Ensure JMeter is installed and executable:
chmod +x /path/to/jmeter/bin/jmeter
  1. Install UV (required for running the server): Visit https://github.com/astral-sh/uv and follow the installation instructions.

  2. Install Python dependencies:

pip install numpy matplotlib
  1. Configure the environment by creating a .env file:
# 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"

Configuring Your MCP Client

Add the following configuration to your MCP client's config file:

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

Using the JMeter MCP Server

Available Tools

JMeter Execution Tools

  • execute_jmeter_test: Launches JMeter in GUI mode
  • execute_jmeter_test_non_gui: Executes a JMeter test in non-GUI mode (recommended for performance)

Test Results Analysis Tools

  • analyze_jmeter_results: Provides a summary of key metrics and insights
  • identify_performance_bottlenecks: Finds performance bottlenecks in test results
  • get_performance_insights: Generates recommendations for improving performance
  • generate_visualization: Creates visualizations of test results

Example Usage

Here are some prompts you can send to your MCP client:

Run JMeter test /path/to/test.jmx in non-GUI mode and save results to results.jtl

Analyze the JMeter test results in results.jtl and provide detailed insights

What are the performance bottlenecks in the results.jtl file?

What recommendations do you have for improving performance based on results.jtl?

Create a time series graph of response times from results.jtl

Test Results Analysis Features

Performance Metrics

The analyzer calculates comprehensive metrics including:

  • Average, median, and percentile response times
  • Throughput (requests per second)
  • Error rates and patterns
  • Time-based performance trends

Bottleneck Detection

The server can automatically identify:

  • Slow endpoints with high response times
  • Error-prone endpoints
  • Response time anomalies and outliers
  • Concurrency-related performance issues

Visualizations

You can generate various visualizations:

  • Time series graphs showing performance over time
  • Distribution graphs for response time analysis
  • Endpoint comparison charts
  • Comprehensive HTML reports

Error Handling

The server performs validation checks to ensure:

  • Test files exist and have the correct extension (.jmx)
  • Result files (JTL) exist and are in valid format
  • All execution or analysis errors are captured and returned

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

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

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

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

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later