QJ

qainsights/jmeter-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

74 stars 29 forks 质量 71 趋势 14

qainsights/jmeter-mcp-server 是从 https://github.com/qainsights/jmeter-mcp-server. 导入的 MCP 服务器候选

概览

qainsights/jmeter-mcp-server 是从 https://github.com/qainsights/jmeter-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

这是一个模型上下文协议(MCP)服务器,允许通过兼容MCP的客户端执行JMeter测试并分析测试结果。

[!重要] 📢 在 JMeter 里找 AI 助手吗?🚀 看看羽毛魔杖

📋 特色

J 执行

  • 📊 在非图形界面模式下执行JMeter测试
  • 🖥️ 以图形界面模式启动JMeter。
  • 📝 捕获并返回执行输出
  • 📊 生成JMeter报告仪表盘

测试结果分析

  • 📈 解析和分析JMeter测试结果(JTL文件)
  • 📊 计算全面的绩效指标
  • 🔍 自动识别性能瓶颈
  • 💡 生成可操作的洞察和建议
  • 📊 创建测试结果可视化
  • 📑 生成带有分析结果的HTML报告

🛠️ 安装

本地安装

  1. 安装uv:

  2. 确保JMeter已安装在你的系统中,并通过命令行访问。

⚠️ 重要:确保JMeter可执行。你可以通过运行以下程序实现:

  1. 安装必要的 Python 依赖:

  2. 配置.env文件,详情请参见.env.example文件。

💻 MCP 使用

  1. 使用兼容MCP的客户端连接到服务器(例如:

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 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

📋 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 required Python dependencies:
pip install -r requirements.txt
  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": "/path/to/uv",
        "args": [
          "--directory",
          "/path/to/jmeter-mcp-server",
          "run",
          "jmeter_server.py"
        ]
      }
    }
}

✨ Use Cases

Test Execution

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

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