JMeter MCP Server (TypeScript Edition)
Enables AI assistants to programmatically create, execute, and analyze Apache JMeter performance tests. It supports automated bottleneck detection, report generation, and distributed testing management through natural language.
README
š JMeter MCP Server (TypeScript Edition)
A powerful Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with Apache JMeter for performance testing. Built with TypeScript for enhanced type safety and reliability.
⨠Features
šÆ Core Features
- Execute JMeter Tests: Run tests in non-GUI mode with comprehensive options
- GUI Mode: Launch JMeter GUI for test development
- Test Plan Creation: Programmatically create HTTP test plans
- Results Analysis: Advanced parsing and analysis of JTL files
- HTML Reports: Generate beautiful dashboard reports
- Distributed Testing: Execute tests across multiple remote servers
š Advanced Analysis
- Performance Metrics: Calculate comprehensive statistics (avg, median, percentiles)
- Bottleneck Detection: Automatically identify slow endpoints and high error rates
- Error Analysis: Group and analyze errors by type and endpoint
- Time Series Data: Generate data for performance visualization
- Recommendations: AI-powered suggestions for performance improvements
š ļø Management Tools
- Plugin Management: List installed JMeter plugins
- Property Management: Get and set JMeter properties
- Validation: Verify JMeter installation and version
š Prerequisites
- Node.js: Version 18 or higher
- JMeter: Apache JMeter 5.0 or higher
- npm or yarn: For package management
š§ Installation
1. Clone or Download
cd jmeter-mcp-server-ts
2. Install Dependencies
npm install
3. Configure Environment
Create a .env file:
cp .env.example .env
Edit .env and set your JMeter path:
JMETER_HOME=C:/apache-jmeter-5.6.3
4. Build
npm run build
š Usage
With Claude Desktop
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"jmeter": {
"command": "node",
"args": [
"C:/Users/YourUser/Documents/jmeter-mcp-server-ts/dist/index.js"
],
"env": {
"JMETER_HOME": "C:/apache-jmeter-5.6.3"
}
}
}
}
With Cursor / Windsurf
Add to your MCP settings:
{
"jmeter": {
"command": "node",
"args": ["path/to/dist/index.js"],
"env": {
"JMETER_HOME": "/path/to/jmeter"
}
}
}
šØ Available Tools
1. validate_jmeter
Validate JMeter installation and get version info.
Example:
Validate my JMeter installation
2. execute_jmeter_test
Execute a test plan in non-GUI mode.
Parameters:
testPlan: Path to .jmx fileresultsFile: Path for .jtl resultslogFile: (Optional) Log file pathreportDir: (Optional) Generate HTML reportproperties: (Optional) JMeter propertiessystemProperties: (Optional) System propertiesremoteHosts: (Optional) For distributed testing
Example:
Run JMeter test from C:/tests/my-test.jmx and save results to C:/results/output.jtl with HTML report in C:/reports
3. launch_jmeter_gui
Launch JMeter GUI for test development.
Example:
Open JMeter GUI with test plan C:/tests/my-test.jmx
4. generate_html_report
Generate HTML dashboard from existing results.
Parameters:
resultsFile: Path to .jtl fileoutputDir: Directory for HTML report
Example:
Generate HTML report from C:/results/output.jtl to C:/reports/dashboard
5. analyze_test_results
Comprehensive analysis of test results.
Example:
Analyze JMeter results from C:/results/output.jtl
Provides:
- Performance summary (avg, median, percentiles)
- Per-endpoint metrics
- Error analysis
- Bottleneck identification
- Performance recommendations
6. create_http_test_plan
Create a new HTTP test plan programmatically.
Parameters:
name: Test plan nameoutputPath: Where to save .jmxthreads: Number of virtual usersrampUp: Ramp-up period (seconds)duration: Test duration (seconds)endpoint: URL to testmethod: HTTP method (GET/POST/PUT/DELETE/PATCH)headers: (Optional) HTTP headersbody: (Optional) Request body
Example:
Create a JMeter test plan named "API Load Test" to test https://api.example.com/users with 50 threads, 30 second ramp-up, and 120 second duration. Save it to C:/tests/api-test.jmx
7. execute_distributed_test
Run distributed test across multiple servers.
Parameters:
testPlan: Path to test planresultsFile: Path for resultsremoteHosts: Array of remote server IPsstartRemoteServers: Auto-start serversstopRemoteServers: Auto-stop servers
Example:
Execute distributed test with test plan C:/tests/my-test.jmx across servers 192.168.1.10 and 192.168.1.11
8. list_jmeter_plugins
List all installed JMeter plugins.
Example:
Show me installed JMeter plugins
9. get_jmeter_properties
Get JMeter configuration properties.
Example:
Show JMeter properties
10. set_jmeter_property
Set a JMeter property.
Parameters:
key: Property namevalue: Property value
Example:
Set JMeter property jmeter.save.saveservice.output_format to xml
š Example Workflows
Basic Load Test
1. Create a test plan for https://api.example.com/products with 100 users over 60 seconds
2. Execute the test and save results to C:/results/load-test.jtl
3. Analyze the results and show me bottlenecks
4. Generate an HTML report in C:/reports/load-test
Advanced Analysis
Analyze the JMeter results from C:/results/stress-test.jtl and:
- Show me the top 5 slowest endpoints
- Identify all endpoints with error rates above 5%
- Give me recommendations for improving performance
- Show the 95th percentile response times
Distributed Testing
1. Create a test plan for https://api.example.com with 500 threads
2. Execute it as a distributed test across servers 192.168.1.10, 192.168.1.11, and 192.168.1.12
3. Analyze the combined results
šļø Project Structure
jmeter-mcp-server-ts/
āāā src/
ā āāā index.ts # Main MCP server
ā āāā types.ts # TypeScript type definitions
ā āāā executor.ts # JMeter test execution
ā āāā analyzer.ts # Results analysis engine
ā āāā builder.ts # Test plan generation
āāā dist/ # Compiled JavaScript (generated)
āāā package.json # Dependencies and scripts
āāā tsconfig.json # TypeScript configuration
āāā .env.example # Environment template
āāā README.md # This file
š Analysis Capabilities
The analyzer provides deep insights into your test results:
Performance Metrics
- Total requests and success rate
- Response time statistics (avg, median, min, max)
- Percentiles (90th, 95th, 99th)
- Throughput (requests/second)
- Bandwidth usage (sent/received)
- Latency and connection time
Bottleneck Detection
- Slow Endpoints: Identifies endpoints with high response times
- High Error Rates: Flags endpoints with frequent failures
- High Latency: Detects network or processing delays
- Severity Levels: Critical, High, Medium, Low
Error Analysis
- Groups errors by response code and message
- Shows affected endpoints per error type
- Calculates error percentages
- Identifies error patterns
Recommendations
AI-powered suggestions for:
- Database optimization
- Caching strategies
- Server capacity planning
- Network configuration
- Load balancing
- Error handling improvements
š ļø Development
Build
npm run build
Watch Mode
npm run watch
Clean
npm run clean
š Troubleshooting
JMeter Not Found
Error: JMETER_HOME environment variable is not set
Solution: Set JMETER_HOME in your .env file or system environment.
Permission Errors (Linux/Mac)
chmod +x /path/to/jmeter/bin/jmeter
Node Version Issues
Ensure Node.js 18+ is installed:
node --version
Build Errors
Clear and reinstall:
npm run clean
rm -rf node_modules
npm install
npm run build
š Configuration
Environment Variables
JMETER_HOME: Path to JMeter installation (required)JMETER_BIN: Path to JMeter binary (optional, auto-detected)JMETER_JAVA_OPTS: Java options for JMeter (optional)
JMeter Properties
Properties can be set via the set_jmeter_property tool or directly in:
jmeter.properties: Main configurationuser.properties: User-specific settings
š¤ Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
š License
MIT License - see LICENSE file for details
š Acknowledgments
- Built on Model Context Protocol by Anthropic
- Powered by Apache JMeter
- Inspired by the original Python implementation
š§ Support
For issues and questions:
- GitHub Issues: Report a bug
- Documentation: Check this README
- JMeter Docs: jmeter.apache.org
š Features Coming Soon
- [ ] GraphQL test plan creation
- [ ] WebSocket testing support
- [ ] Advanced visualization exports
- [ ] CI/CD pipeline integration
- [ ] Performance regression detection
- [ ] Custom plugin support
** Enjoy Testing ā¤ļø by Vj369 **
ā Star this repo if you find it useful!
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.