Modern load testing tool for developers.
## K6 MCP Server: Modern Load Testing Platform The **K6 MCP Server** integrates the developer-centric K6 load testing tool into Google Antigravity, enabling performance testing with JavaScript-based scripts and AI-assisted test development. ### Why K6 MCP? - **Developer Friendly**: Write tests in JavaScript/TypeScript with modern ES6+ syntax support - **CLI First**: Designed for automation and CI/CD integration from the ground up - **Efficient Resource Usage**: High performance with minimal resource footprint for large-scale tests - **Flexible Protocols**: Support for HTTP/1.1, HTTP/2, WebSocket, gRPC, and more - **Cloud Integration**: Optional Grafana Cloud integration for distributed testing and analytics ### 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 K6 load test with 50 virtual users for 5 minutes against the API endpoints" }] ) ``` #### 2. Script Development ```python # Create test scripts response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Generate K6 script to test user login flow with realistic think times and data" }] ) ``` #### 3. Threshold Validation ```python # Check thresholds response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Configure K6 thresholds for p95 response time under 500ms and error rate below 1%" }] ) ``` #### 4. Results Analysis ```python # Analyze results response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Analyze K6 test results and identify endpoints with degraded performance" }] ) ``` ### Configuration ```json { "mcpServers": { "k6": { "command": "npx", "args": ["-y", "@anthropic/mcp-server-k6"], "env": { "K6_CLOUD_TOKEN": "your-cloud-token", "K6_OUT": "json=results.json" } } } } ``` ### Use Cases **API Performance**: Test API endpoint performance under various load conditions. **CI/CD Integration**: Add performance gates to deployment pipelines with threshold checks. **Synthetic Monitoring**: Run periodic load tests to detect performance degradation early. **Capacity Testing**: Determine system capacity limits before traffic events. The K6 MCP Server brings modern, developer-friendly load testing to your workflow, enabling performance validation as part of your development process.
{
"mcpServers": {
"k6": {}
}
}