Install: pip install mcp-testbench |
PyPI: pypi.org/project/mcp-testbench
The table
| Capability | mcp-testbench | MCP Inspector | mcp-contract | mcptest (pytest-mcp-server) | pytest-mcptest |
|---|---|---|---|---|---|
| Recorded tool-call replay | Yes | No | No (read-only, never calls tools) | No | Roadmap only, not shipped |
| Offline JSON definition mode | Yes | No | No | No | No |
| Schema snapshot + breaking-change diff | Yes | No | Yes | Yes | No |
| Lint rules | 22, across tools + prompts + resources | None | None | 19, tools only (incl. annotation-correctness rules) | None |
| Transports | stdio, Streamable HTTP, legacy SSE | stdio, Streamable HTTP, SSE | stdio | stdio, Streamable HTTP | stdio, Streamable HTTP, in-process |
| pytest plugin | Yes | No (npm / Node UI) | No | Yes | Yes |
| Runtime dependencies | Zero (stdlib only) | Node.js | mcp SDK + rich + typer | Zero | Requires the mcp SDK |
| Runs as an MCP server (agents can call it) | Yes (mcp-testbench serve) | No | No | No | No |
Where each tool is the right choice
MCP Inspector (official)
The reference interactive debugger: list and call tools, read resources, watch raw JSON-RPC in a web UI. Use it to explore a server by hand. It has no pytest plugin, no snapshot, no breaking-change diff and no replay -- it is human-in-the-loop by design, and it needs Node in a Python CI job.
mcp-contract
Best-in-class contract diffing in its niche: direction-aware input vs
output analysis and nested $ref arguments. But it is a
read-only probe -- it never calls a tool, so there is no replay and no
behavioural check; there is no pytest plugin and no offline definition
mode, and prompts/resources are compared by presence (and prompt arguments)
only.
mcptest (pytest-mcp-server)
A real pytest plugin with snapshots, breaking diff and a 19-rule lint (15 when first compared; 19 as of their 0.3.0), zero dependencies, stdio + Streamable HTTP. It has no replay, its lint and diff are tools-first (no lint rules for prompts/resources), and it has no offline definition input.
pytest-mcptest
Pytest fixtures plus a built-in conformance suite over stdio, HTTP and
in-process servers. No snapshot diff or breaking classification, a hard
dependency on the mcp SDK 2.x, and record/replay exists only
as a v0.2 roadmap item.
FastMCP's in-memory Client
Not a contract tester at all, but worth naming: millisecond in-process tests for FastMCP tool logic. It requires the server object in-process and cannot black-box a Node, Go or other-framework server. mcp-testbench is the complementary contract layer -- see FastMCP testing.
The gap mcp-testbench fills
No other Python package combines schema snapshot + classified breaking-change diff + recorded tool-call replay + offline JSON definitions in one zero-dependency package, with a lint that covers prompts and resources as well as tools. That combination -- not any single feature -- is the product.