JMeter MCP Server

JMeter MCP Server

Enables the execution and analysis of JMeter performance tests through MCP-compatible clients. It provides tools for running tests in non-GUI mode, identifying performance bottlenecks, and generating comprehensive insights and visualizations from result files.

Category
访问服务器

README

🚀 JMeter MCP Server

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

Anthropic Cursor Windsurf

📋 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:

chmod +x /path/to/jmeter/bin/jmeter
  1. Install dependencies and run the server:
uv sync
  1. 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

  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
  1. 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:

{
    "mcpServers": {
      "jmeter": {
        "command": "uv",
        "args": [
          "--directory",
          "/path/to/jmeter-mcp-server",
          "run",
          "jmeter_server.py"
        ]
      }
    }
}

✨ 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
  • Efficiently processes large files with streaming parsers
  • Validates file formats and handles errors gracefully

Metrics Calculator

  • Calculates overall performance metrics (average, median, percentiles)
  • Provides endpoint-specific metrics for detailed analysis
  • Generates time series metrics to track performance over time
  • Compares metrics with benchmarks for context

Bottleneck Analyzer

  • Identifies slow endpoints based on response times
  • Detects error-prone endpoints with high error rates
  • Finds response time anomalies and outliers
  • Analyzes the impact of concurrency on performance

Insights Generator

  • Provides specific recommendations for addressing bottlenecks
  • Analyzes error patterns and suggests solutions
  • Generates insights on scaling behavior and capacity limits
  • Prioritizes recommendations based on potential impact

Visualization Engine

  • Creates time series graphs showing performance over time
  • Generates distribution graphs for response time analysis
  • Produces endpoint comparison charts for identifying issues
  • Creates comprehensive HTML reports with all analysis results

📝 Example Usage

# Run a JMeter test and generate a results file
Run JMeter test sample_test.jmx in non-GUI mode and save results to results.jtl

# Analyze the results
Analyze the JMeter test results in results.jtl and provide detailed insights

# Identify bottlenecks
What are the performance bottlenecks in the results.jtl file?

# Get recommendations
What recommendations do you have for improving performance based on results.jtl?

# Generate visualizations
Create a time series graph of response times from results.jtl

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选