Scalable load testing framework in Python.
## Locust MCP Server: Scalable Load Testing Framework The **Locust MCP Server** integrates the Python-based Locust load testing framework into Google Antigravity, enabling distributed performance testing with AI-assisted scenario development and result analysis. ### Why Locust MCP? - **Python-Based**: Write load tests in pure Python with full programming language capabilities - **Distributed Testing**: Scale horizontally across multiple machines for massive load generation - **Real-Time Metrics**: Monitor test progress with real-time web UI showing request statistics - **Programmable Users**: Define complex user behavior with Python code for realistic scenarios - **Hackable**: Extend and customize every aspect of the framework for specialized needs ### Key Features #### 1. Load Testing ```python from anthropic import Anthropic client = Anthropic() response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Run Locust test with 500 users spawning at 10 per second against the API" }] ) ``` #### 2. Scenario Development ```python # Create test scenarios response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Generate Locust user class simulating e-commerce browsing and purchase behavior" }] ) ``` #### 3. Distributed Testing ```python # Scale tests response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Configure Locust distributed mode with 5 worker nodes for higher load capacity" }] ) ``` #### 4. Results Analysis ```python # Analyze performance response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Export Locust results and analyze response time distribution by endpoint" }] ) ``` ### Configuration ```json { "mcpServers": { "locust": { "command": "npx", "args": ["-y", "@anthropic/mcp-server-locust"], "env": { "LOCUST_HOST": "https://api.example.com", "LOCUST_USERS": "100" } } } } ``` ### Use Cases **API Load Testing**: Test API performance with realistic user simulation patterns. **Distributed Load**: Generate massive load using multiple worker machines. **Custom Protocols**: Test non-HTTP services with custom Python client implementations. **Continuous Performance**: Integrate load tests in CI/CD for ongoing performance validation. The Locust MCP Server brings Python-powered load testing to your workflow, enabling flexible and scalable performance validation.
{
"mcpServers": {
"locust": {}
}
}