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.
chmod +x /path/to/jmeter/bin/jmeter
Install UV (required for running the server): Visit https://github.com/astral-sh/uv and follow the installation instructions.
Install Python dependencies:
pip install numpy matplotlib
.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"
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"
]
}
}
}
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
The analyzer calculates comprehensive metrics including:
The server can automatically identify:
You can generate various visualizations:
The server performs validation checks to ensure:
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.
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.
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"
]
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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