MCPInstall
k6-mcp-experiment logo

k6-mcp-experiment

by oleiade oleiade/k6-mcp-experiment

k6 MCP for Claude enables HTTP load testing via the Claude chat interface.

READMEmain

k6 MCP for Claude

This is a Model Capabilities Provider (MCP) for Anthropic Claude that enables running k6 load tests directly from the Claude chat interface.

Features

  • Run HTTP load tests against any website with a simple prompt
  • Configure the number of virtual users and iterations
  • Get test results directly in your Claude chat

Requirements

  • Go (1.18+)
  • k6 installed on your system
  • Anthropic Claude desktop app

Installation

  1. Clone this repository:

    git clone https://github.com/grafana/k6-mcp.git
    cd k6-mcp
    
  2. Build and install:

    go install
    

Setting Up Claude to Use k6 MCP

  1. Create or update your Claude developer configuration file at the following location:

    • macOS: /Users/<username>/Library/Application Support/Claude/claude-dev-config.json
    • Windows: %APPDATA%\Claude\claude-dev-config.json
    • Linux: ~/.config/Claude/claude-dev-config.json
  2. Add the k6 MCP configuration:

    {
        "mcpServers": {
            "k6": {
                "command": "/usr/local/go/bin/go",
                "args": [
                    "run",
                    "-C",
                    "/path/to/your/k6-mcp",
                    "github.com/grafana/k6-mcp"
                ]
            }
        }
    }
    

    Note: Replace /path/to/your/k6-mcp with the actual path to your cloned repository.

    Example for macOS:

    {
        "mcpServers": {
            "k6": {
                "command": "/usr/local/go/bin/go",
                "args": [
                    "run",
                    "-C",
                    "/Users/username/Dev/grafana/k6-mcp",
                    "github.com/grafana/k6-mcp"
                ]
            }
        }
    }
    
  3. Restart the Claude desktop app to apply changes.

Running Locally for Development

To run the MCP server locally for development:

go run .

The server will start and listen for input on stdin and write to stdout.

Using k6 MCP with Claude

Once your MCP is set up, you can ask Claude to run load tests with commands like:

Run a load test against https://example.com with 5 users and 20 iterations

Claude will use the k6 MCP to generate and run the test, then display the results in the chat.

Troubleshooting

If you encounter issues:

  1. Check the logs at:

    • macOS: /Users/<username>/Library/Logs/Claude/mcp-server-k6.log
    • Windows: %APPDATA%\Claude\Logs\mcp-server-k6.log
    • Linux: ~/.local/share/Claude/logs/mcp-server-k6.log
  2. Ensure k6 is properly installed and available in your PATH

  3. Verify that your Claude developer configuration is correct

Extending the MCP

This MCP uses interfaces for script generation and execution, making it easy to add new functionality:

  • Implement custom ScriptGenerator interfaces for different types of tests
  • Create a new K6Executor implementation to use the k6 Go library directly instead of the CLI

License

MIT

More Security & Testing MCP servers

Similar servers from the same category.

Enables deepfake detection in images through Proofly API integration, providing detailed analysis results including real/fake probability scores and individual model results for each detected face.

Security & Testing

CASB provides comprehensive visibility and control over your SaaS applications, so you can easily eliminate the risk of compromise, prevent data loss, and avoid compliance violations.

Security & Testing

Audit logs summarize the history of changes made within your Cloudflare account. Audit logs include account level actions like zone configuration changes.

Security & Testing

YaraFlux

threatflux

Provides YARA-based malware scanning capabilities with support for local and MinIO storage backends, enabling security professionals to manage rules, scan files/URLs, and analyze results for threat detection.

filesystemstorage