🚀 JMeter MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
This is a Model Context Protocol (MCP) server that allows executing JMeter tests through MCP-compatible clients and analyzing test results.
> [!IMPORTANT]
> 📢 Looking for an AI Assistant inside JMeter? 🚀
> Check out Feather Wand
📋 Features
JMeter Execution
- 📊 Execute JMeter tests in non-GUI mode
- 🖥️ Launch JMeter in GUI mode
- 📝 Capture and return execution output
- 📊 Generate JMeter report dashboard
Test Results Analysis
- 📈 Parse and analyze JMeter test results (JTL files)
- 📊 Calculate comprehensive performance metrics
- 🔍 Identify performance bottlenecks automatically
- 💡 Generate actionable insights and recommendations
- 📊 Create visualizations of test results
- 📑 Generate HTML reports with analysis results
🛠️ Installation
Local Installation
1. Install 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:
3. Install required Python dependencies:
4. Configure the .env file, refer to the .env.example file for details.
💻 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:
3. MCP compatible client will use the available tools:
JMeter Execution 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)
Test Results Analysis Tools
- 📊 analyze_jmeter_results: Analyze JMeter test results and provide a summary of key metrics and insights
- 🔍 identify_performance_bottlenecks: Identify performance bottlenecks in JMeter test results
- 💡 get_performance_insights: Get insights and recommendations for improving performance
- 📈 generate_visualization: Generate visualizations of JMeter test results
🏗️ MCP Configuration
Add the following configuration to your MCP client config:
✨ Use Cases
Test Execution
- Run JMeter tests in non-GUI mode for better performance
- Launch JMeter in GUI mode for test development
- Generate JMeter report dashboards
Test Results Analysis
- Analyze JTL files to understand performance characteristics
- Identify performance bottlenecks and their severity
- Get actionable recommendations for performance improvements
- Generate visualizations for better understanding of results
- Create comprehensive HTML reports for sharing with stakeholders
🛑 Error Handling
The server will:
- Validate that the test file exists
- Check that the file has a .jmx extension
- Validate that JTL files exist and have valid formats
- Capture and return any execution or analysis errors
📊 Test Results Analyzer
The Test Results Analyzer is a powerful feature that helps you understand your JMeter test results better. It consists of several components:
Parser Module
- Supports both XML and CSV JTL formats