A lightweight load testing tool for Model Context Protocol (MCP) servers using streamable client transport.
This tool is designed to establish multiple concurrent MCP client sessions against a target MCP endpoint, ramp up connections in batches, display a live progress bar, and maintain the sessions until interrupted.
- Concurrent Client Simulation: Simulates up to thousands of concurrent MCP client sessions.
- Ramped Connection Pool: Establishes connections in batches of 100 per second to prevent overwhelming the target server during startup.
- Live Progress Visualization: Displays progress as sessions initialize using a visual progress bar.
- Graceful Shutdown: Intercepts interruption signals (
Ctrl+C) and gracefully shuts down all established sessions. - Customizable Targets: Fully configurable target URL and client count via command-line flags.
Ensure you have Go installed on your system.
Clone the repository and build or run the project directly:
cd mcp-load-test
go buildTo run the load tester, you must provide the -url flag. You can also optionally customize the load with -clients (which defaults to 20,000 clients):
go run main.go -url="https://your-mcp-server.com/mcp"go run main.go -url="https://your-mcp-server.com/mcp" -clients=1000| Flag | Type | Description | Default |
|---|---|---|---|
-url |
string |
The target URL of the MCP server endpoint. | Required (No default) |
-clients |
int |
The total number of concurrent MCP clients to spin up. | 20000 |
Once all sessions are established, the program stays active keeping the connections alive. To stop the load test and gracefully close all client sessions, press Ctrl+C.