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
Provider
NaveenKumar Namachivayam
Release date
Mar 29, 2025
Language
Python
Stats
18 stars

This MCP server enables you to execute JMeter tests through MCP-compatible clients like Claude Desktop, Cursor, and Windsurf. It allows running tests in both GUI and non-GUI modes while capturing execution output.

Prerequisites

Before installation, ensure JMeter is installed on your system and accessible via the command line. You'll need to make JMeter executable with:

chmod +x /path/to/jmeter/bin/jmeter

Installation

Set Up the MCP Server

  1. Install uv from the astral-sh/uv GitHub repository

  2. Configure the environment settings by creating a .env file with the following parameters:

# 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"

Configure Your MCP Client

Add the following configuration to your MCP client settings:

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

Using the MCP Server

Running JMeter Tests

Connect to the server using an MCP-compatible client (Claude Desktop, Cursor, Windsurf), then send a prompt:

Run JMeter test /path/to/test.jmx

Available Tools

The MCP server provides two main tools:

  • execute_jmeter_test: Launches JMeter in GUI mode (note that this doesn't execute the test automatically per JMeter's design)
  • execute_jmeter_test_non_gui: Executes a JMeter test in non-GUI mode (recommended for better performance)

Common Use Cases

  • Test Analysis: Collect and analyze test results with LLM-powered insights
  • Debugging: Execute tests in non-GUI mode to identify and fix issues

Error Handling

The server performs several validation checks:

  • Verifies the test file exists
  • Confirms the file has a .jmx extension
  • Captures and returns any execution errors that occur

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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