Skip to main content
Glama

k6-mcp-server

🚀⚡️k6-mcp-服务器

用于运行 k6 负载测试的模型上下文协议 (MCP) 服务器实现。

✨ 特点

  • 与模型上下文协议框架的简单集成
  • 支持自定义测试时长和虚拟用户(VU)
  • 用于运行 k6 负载测试的易于使用的 API
  • 可通过环境变量配置
  • 实时测试执行输出

🔧 先决条件

开始之前,请确保已安装以下软件:

📦安装

  1. 克隆存储库:
git clone https://github.com/yourusername/k6-mcp-server.git
  1. 安装所需的依赖项:
uv pip install -r requirements.txt
  1. 设置环境变量(可选):在项目根目录中创建一个.env文件:
K6_BIN=/path/to/k6 # Optional: defaults to 'k6' in system PATH

🚀 入门

  1. 创建k6测试脚本(例如, test.js ):
import http from "k6/http"; import { sleep } from "k6"; export default function () { http.get("http://test.k6.io"); sleep(1); }
  1. 在您最喜欢的 MCP 客户端(Claude Desktop、Cursor、Windsurf 等)中使用以下规格配置 MCP 服务器:
{ "mcpServers": { "k6": { "command": "/Users/naveenkumar/.local/bin/uv", "args": [ "--directory", "/Users/naveenkumar/Gits/k6-mcp-server", "run", "k6_server.py" ] } } }
  1. 现在让 LLM 运行测试,例如run k6 test for hello.js 。k6 mcp 服务器将利用以下任一工具来启动测试。
  • execute_k6_test :使用默认选项运行测试(持续时间 30 秒,10 VU)
  • execute_k6_test_with_options :使用自定义持续时间和 VU 运行测试

k6-MCP

📝 API 参考

执行K6测试

execute_k6_test( script_file: str, duration: str = "30s", # Optional vus: int = 10 # Optional )

使用自定义选项执行 K6 测试

execute_k6_test_with_options( script_file: str, duration: str, vus: int )

🤝 贡献

欢迎贡献代码!欢迎提交 Pull 请求。

📄 许可证

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

模型上下文协议 (MCP) 服务器实现允许 AI 助手通过自然语言命令运行 k6 负载测试,支持自定义测试持续时间和虚拟用户。

  1. ✨ 特点
    1. 🔧 先决条件
      1. 📦安装
        1. 🚀 入门
          1. 📝 API 参考
            1. 执行K6测试
            2. 使用自定义选项执行 K6 测试
          2. 🤝 贡献
            1. 📄 许可证

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol (MCP) server that enables AI assistants to interact with MySQL databases by executing SQL queries and checking database connectivity.
                Last updated -
                TypeScript
                MIT License
                • Apple
                • Linux
              • A
                security
                F
                license
                A
                quality
                A Model Context Protocol server that allows AI assistants to execute and manage JMeter performance tests through natural language commands.
                Last updated -
                2
                36
                Python
              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and contest data.
                Last updated -
                7
                36
                21
                TypeScript
                MIT License
              • -
                security
                F
                license
                -
                quality
                A Model Context Protocol server that enables AI assistants like Cursor to interact with Testomatio test management platform, allowing users to query test cases, runs, and plans through natural language.
                Last updated -
                36
                JavaScript

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/QAInsights/k6-mcp-server'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server