QAInsights_jmeter-mcp-server
The JMeter MCP Server allows users to execute JMeter tests through MCP-compatible clients. It supports running tests in both GUI and non-GUI modes and includes features for output capture and error handling.
š JMeter MCP Server
This is a Model Context Protocol (MCP) server that allows executing JMeter tests through MCP-compatible clients.
[!IMPORTANT] š¢ Looking for an AI Assistant inside JMeter? š Check out Feather Wand
š Features
- š Execute JMeter tests in non-GUI mode
- š„ļø Launch JMeter in GUI mode
- š Capture and return execution output
š ļø 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
- 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
-
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:
- š„ļø
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)
- š„ļø
šļø 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"
]
}
}
}
š Error Handling
The server will:
- Validate that the test file exists
- Check that the file has a .jmx extension
- Capture and return any execution errors