Install: pip install mcp-testbench |
PyPI: pypi.org/project/mcp-testbench
The classification
mcp-testbench check compares a live server against a
committed snapshot and classifies every
change as breaking, non-breaking,
routing (descriptions and annotation hints -- behaviour may
change, calls do not break) or cosmetic (titles). Only
breaking fails the check.
Input and output schemas follow opposite rules
A change that is safe on an input schema can be breaking on an output schema, and vice versa. Callers send inputs and rely on outputs, so the direction of every rule flips:
| Change | Input schema | Output schema |
|---|---|---|
| property removed | breaking | breaking |
| property added | breaking if required, else non-breaking | non-breaking |
| became required | breaking | non-breaking |
| no longer required | non-breaking | breaking |
| type / enum widened | non-breaking | breaking |
| type / enum narrowed | breaking | non-breaking |
| constraints tightened | breaking | non-breaking |
| constraints loosened | non-breaking | breaking |
The same direction logic applies to enum changes,
additionalProperties, and numeric / length constraints
(minimum, maxLength, pattern, ...) at
any nesting depth, with local $ref pointers resolved.
Examples
| Change | Class |
|---|---|
tool search removed | breaking |
new optional parameter limit | non-breaking |
parameter query became required | breaking |
output field result.url removed | breaking |
| tool description rewritten | routing |
destructiveHint flipped false -> true | routing |
| tool title changed | cosmetic |
Composition: anyOf / oneOf / allOf, branch by branch
Composition keywords are diffed branch by branch. Branches are matched
between the old and new schema deterministically: first by identical
resolved content, then by a strong key (the $ref target, then
title), then by structural similarity (shared
type and property names). Matched branches are diffed
recursively with the same engine, under a subject that names the branch --
e.g. tool search.input.anyOf[ref=Config].timeout. Pure
reordering of branches is silent.
A union branch is a widening or narrowing of the value space, exactly
like an enum, and follows the same direction rule. An allOf
branch is the opposite: adding one adds a constraint (narrows), removing
one drops a constraint (widens).
| Composition change | Input schema | Output schema |
|---|---|---|
anyOf/oneOf branch removed | breaking | non-breaking |
anyOf/oneOf branch added | non-breaking | breaking |
allOf subschema added (new constraint) | breaking | non-breaking |
allOf subschema removed | non-breaking | breaking |
| change inside a matched branch | classified by the normal rules, reported at the branch path | |
If no branch on one side matches any branch on the other and the sets
differ, the composition is reported as a single breaking
composition-replaced finding rather than silence or a pile of
add/remove noise: nothing about the old value space can be proven to
survive.
Known limits
Branch matching is structural, not semantic: two branches that are
similar in shape but different in meaning can be matched and diffed
against each other (their inner changes are still reported), and a
wholesale rewrite of every branch surfaces as
composition-replaced instead of per-branch detail.
Everything else -- tools, prompts and resources, input and output
schemas, nested objects and arrays -- is compared recursively.