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 ファイルを参照してください。

You must be authenticated.

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

                • -
                  security
                  F
                  license
                  -
                  quality
                  A demonstration server that allows large language models to perform penetration testing tasks autonomously by interfacing with the Mythic C2 framework.
                  Last updated -
                  11
                  Python
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Message Control Protocol server that runs PHP tests and static analysis tools automatically for developers, providing results directly to AI assistants in Cursor editor.
                  Last updated -
                  1
                  TypeScript
                  MIT License
                • 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
                  10
                  Python
                • A
                  security
                  A
                  license
                  A
                  quality
                  QA Sphere MCP server that enables Large Language Models to interact directly with test management system test cases, supporting AI-powered development workflows and test case discovery.
                  Last updated -
                  6
                  52
                  8
                  JavaScript
                  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