Skip to main content
Glama

Locust MCP Server

🚀 ⚡️ locust-mcp-server

Locust 負荷テストを実行するための Model Context Protocol (MCP) サーバー実装。このサーバーにより、Locust 負荷テスト機能と AI を活用した開発環境をシームレスに統合できます。

✨ 特徴

  • モデルコンテキストプロトコルフレームワークとのシンプルな統合
  • ヘッドレスモードとUIモードのサポート
  • 設定可能なテストパラメータ(ユーザー、生成率、実行時間)
  • Locust 負荷テストを実行するための使いやすい API
  • リアルタイムテスト実行出力
  • HTTP/HTTPSプロトコルのサポート
  • カスタムタスクシナリオのサポート

Locust-MCP-サーバー

🔧 前提条件

始める前に、以下がインストールされていることを確認してください。

📦 インストール

  1. リポジトリをクローンします。
git clone https://github.com/qainsights/locust-mcp-server.git
  1. 必要な依存関係をインストールします。
uv pip install -r requirements.txt
  1. 環境変数を設定する (オプション): プロジェクト ルートに.envファイルを作成します。
LOCUST_HOST=http://localhost:8089 # Default host for your tests LOCUST_USERS=3 # Default number of users LOCUST_SPAWN_RATE=1 # Default user spawn rate LOCUST_RUN_TIME=10s # Default test duration

🚀 はじめに

  1. Locust テスト スクリプト (例: hello.py ) を作成します。
from locust import HttpUser, task, between class QuickstartUser(HttpUser): wait_time = between(1, 5) @task def hello_world(self): self.client.get("/hello") self.client.get("/world") @task(3) def view_items(self): for item_id in range(10): self.client.get(f"/item?id={item_id}", name="/item") time.sleep(1) def on_start(self): self.client.post("/login", json={"username":"foo", "password":"bar"})
  1. お気に入りの MCP クライアント (Claude Desktop、Cursor、Windsurf など) で以下の仕様を使用して MCP サーバーを構成します。
{ "mcpServers": { "locust": { "command": "/Users/naveenkumar/.local/bin/uv", "args": [ "--directory", "/Users/naveenkumar/Gits/locust-mcp-server", "run", "locust_server.py" ] } } }
  1. LLMにテストの実行を指示します(例run locust test for hello.py 。Locust MCPサーバーは以下のツールを使用してテストを開始します。
  • run_locust : ヘッドレスモード、ホスト、ランタイム、ユーザー、およびスポーンレートの設定可能なオプションを使用してテストを実行します。

📝 APIリファレンス

Locustテストを実行する

run_locust( test_file: str, headless: bool = True, host: str = "http://localhost:8089", runtime: str = "10s", users: int = 3, spawn_rate: int = 1 )

パラメータ:

  • test_file : Locust テスト スクリプトへのパス
  • headless : ヘッドレスモード(True)またはUI付き(False)で実行
  • host : 負荷テストの対象ホスト
  • runtime : テスト期間(例:「30秒」、「1分」、「5分」)
  • users : シミュレートする同時ユーザー数
  • spawn_rate : ユーザーが生成されるレート

✨ ユースケース

  • LLMを活用した結果分析
  • LLMを活用した効果的なデバッグ

🤝 貢献する

貢献を歓迎します!お気軽にプルリクエストを送信してください。

📄 ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

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

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Locust 負荷テスト機能と AI を活用した開発環境を統合し、ユーザーが自然言語コマンドを使用してパフォーマンス テストを実行できるようにするサーバー。

  1. ✨ 特徴
    1. 🔧 前提条件
      1. 📦 インストール
        1. 🚀 はじめに
          1. 📝 APIリファレンス
            1. Locustテストを実行する
          2. ✨ ユースケース
            1. 🤝 貢献する
              1. 📄 ライセンス

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol (MCP) server implementation that allows AI assistants to run k6 load tests through natural language commands, supporting custom test durations and virtual users.
                  Last updated -
                  2
                  10
                  Python
                  MIT License
                • -
                  security
                  A
                  license
                  -
                  quality
                  An AI-powered MCP server that automates web testing workflows by enabling recording, execution, and discovery of tests through natural language prompts.
                  Last updated -
                  55
                  Python
                  Apache 2.0
                  • Linux
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  AI-powered agent that streamlines web testing workflows by allowing developers to record, execute, and discover tests using natural language prompts in their AI coding assistants.
                  Last updated -
                  55
                  Python
                  Apache 2.0
                  • Linux
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A lightweight server that enables AI agents to interact with the Windows operating system, allowing for file navigation, application control, UI interaction, and QA testing through various tools.
                  Last updated -
                  1,401
                  Python
                  MIT License

                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/locust-mcp-server'

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