loadtest

A command-line load-testing tool for MCP servers, which are services that provide tools or data to software agents. It runs configured scenarios with virtual users and reports response speed, request volume, errors, and possible breaking points.

In plain words
What is it for?
Use it to run a load test against an MCP server, create a starter configuration, or upload a configuration to pmcp.run.
Why use it?
It helps reveal how an MCP server behaves under sustained or concurrent traffic before real users depend on it. Reports can be viewed in the terminal and saved as JSON.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/paiml/rust-mcp-sdk/loadtest
Clone the repo
git clone --depth 1 https://github.com/paiml/rust-mcp-sdk
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,217 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01217
Opus 5 $0.00000 $0.00609
Sonnet 5 $0.00000 $0.00243
Haiku 4.5 $0.00000 $0.00122

Measured 2d ago against content hash 13256d32aa38, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

loadtest scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cargo-pmcp/docs/commands/loadtest.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cargo pmcp loadtest

Run load tests against MCP servers.

Usage

cargo pmcp loadtest <SUBCOMMAND>

Description

Execute load tests with configurable virtual users, scenarios, and reports. Measures latency percentiles, throughput, error rates, and can auto-detect breaking points.

Subcommands

Subcommand Description
run Run a load test against an MCP server
init Generate a starter loadtest.toml config
upload Upload a loadtest config to pmcp.run

loadtest run

Run a load test against an MCP server.

cargo pmcp loadtest run <URL> [OPTIONS]

Executes a load test using the scenario defined in .pmcp/loadtest.toml (or a custom config path). Reports results to the terminal and writes a JSON report to .pmcp/reports/.

Arguments

Argument Required Description
URL Yes Target MCP server URL

Options

Option Default Description
--config <PATH> auto-discover .pmcp/loadtest.toml Path to config file
--vus <N> from config Number of virtual users (overrides config)
--duration <SECS> from config Test duration in seconds (overrides config)
--iterations <N> from config Iteration limit (overrides config)
--no-report - Disable JSON report output
--api-key <KEY> MCP_API_KEY env API key for Bearer token authentication
--oauth-client-id <ID> MCP_OAUTH_CLIENT_ID env OAuth client ID (triggers OAuth flow)
--oauth-issuer <URL> MCP_OAUTH_ISSUER env OAuth issuer URL (auto-discovered if omitted)
--oauth-scopes <SCOPES> MCP_OAUTH_SCOPES env OAuth scopes, comma-separated (default: openid)
--oauth-no-cache - Disable OAuth token caching
--oauth-redirect-port <PORT> 8080 / MCP_OAUTH_REDIRECT_PORT env OAuth redirect port for localhost callback

Examples

# Run with defaults from config
cargo pmcp loadtest run https://my-server.example.com

# Quick test with CLI overrides
cargo pmcp loadtest run https://my-server.example.com --vus 20 --duration 60

# Run with API key authentication
cargo pmcp loadtest run https://my-server.example.com --api-key sk-xxx

# Run with OAuth
cargo pmcp loadtest run https://my-server.example.com --oauth-client-id my-client-id

Read the full file on GitHub · 178 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 178 lines · 0 tokens per session scan A 13256d32aa38

Subscribe to this mod's changes

loadtest is a command published in the GitHub repository paiml/rust-mcp-sdk (53 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,217 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.