mcptest docs GitHub

Scenario corpus

A curated set of self-contained examples that show one mcptest concept at a time. Read them top to bottom for a tour, or jump to the one that matches what you are trying to do today. Scenarios 8 through 16 run against the hosted test server, so they need no local server and no setup.

#ScenarioWhat it teaches
1First testThe minimal stdio test against a placeholder server.
2Performance budgetLock in latency and token budgets per step.
3Snapshot testsSnapshot matcher with automatic cassette normalization.
4Compliance baselineSuppress known-failing rules while hardening incrementally.
5CI quality gateThree-stage CI pattern (pre-commit, PR, build).
6URL target stagingURL target with bearer-token env, readiness probe, tenancy headers.
7LLM-judge matcherThe llm-judge matcher with a --max-cost cap.
8Catch schema driftmcptest diff against the prior catalog to flag breaking changes.
9Scan for attacksmcptest security over a deliberately poisoned catalog.
10Grade against the specCompliance grading, and what a failing run looks like.
11Test behind OAuthA token-gated endpoint, by bearer token or OAuth.
12Multi-server suitesOne suite across two servers, plus the cross-server trust boundary.
13Tool overloadTool selection when the catalog is crowded with decoys.
14Rate-limit backoffHow the runner handles an HTTP 429 with Retry-After.
15Migration doctorCatch a legacy error code and plan the spec migration.
16Record and replayRecord a session once, replay it offline in CI.
17Model matrixFan one agent test across a models: list and read the grid.

Each scenario file:

If you want the full YAML reference, read docs/yaml-reference.md. If you want end-to-end CI patterns, read docs/guides/ci-integration.md.