JMeter MCP Server
# ๐ 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](https://jmeter.ai)



## ๐ Features
- ๐ Execute JMeter tests in non-GUI mode
- ๐ฅ๏ธ Launch JMeter in GUI mode
- ๐ Capture and return execution output
## ๐ ๏ธ Installation
### Local Installation
1. Install [`uv`](https://github.com/astral-sh/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:
```bash
chmod +x /path/to/jmeter/bin/jmeter
```
3. Configure the `.env` file, refer to the `.env.example` file for details.
```bash
# 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
```
3. 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:
```json
{
"mcpServers": {
"jmeter": {
"command": "/path/to/uv",
"args": [
"--directory",
"/path/to/jmeter-mcp-server",
"run",
"jmeter_server.py"
]
}
}
}
```
## โจ Use case
LLM powered result analysis: Collect and analyze test results.
Debugging: Execute tests in non-GUI mode for debugging.
## ๐ Error Handling
The server will:
- Validate that the test file exists
- Check that the file has a .jmx extension
- Capture and return any execution errorsTDQS
Scored across 2 tools
The two tools are essentially identical in purposeโboth execute JMeter testsโwith the only difference being that one explicitly specifies non-GUI mode while the other offers it as an optional parameter. This creates significant ambiguity, as an agent would struggle to choose between them for the same core task, leading to potential misselection.
The tool names follow a consistent verb_noun pattern (execute_jmeter_test and execute_jmeter_test_non_gui), which is clear and predictable. However, the redundancy in naming (both starting with 'execute_jmeter_test') slightly detracts from optimal consistency, though the pattern remains largely intact.
With only two tools, the server feels severely under-scoped for a JMeter domain, which typically involves test creation, management, reporting, and analysis. This minimal set limits functionality and suggests incomplete coverage, making it inappropriate for comprehensive use.
The tool surface is extremely incomplete for a JMeter server, lacking essential operations such as creating, editing, listing, or deleting tests, generating reports, or managing test environments. This gap will likely cause agent failures when attempting broader JMeter-related tasks beyond basic execution.