Find an implementation error with contract tests
This example uses the developer MCP runner, with response schema validation available since version 0.7.6. Node.js 22.12.0 or newer is required. It uses fictional data and a loopback-only backend; no account, model or public API is needed after dependency installation.
git clone https://github.com/powerducklab/dev-mcp-server.git
cd dev-mcp-server
npm ci
npm run build
node examples/contract-total/verify.mjs
The response is {"total":"42"} while the schema requires a number. The real validator reports /total must be number and exits with status 1.
node examples/contract-total/verify.mjs --correct
The backend now returns {"total":42}; the same checker passes and exits 0. To repair the implementation yourself, edit the total expression in examples/contract-total/server.mjs to return a number. Do not weaken the contract to hide the error.
Each invocation allocates a free local port and shuts down its server. Source files and commands are in the example project. Schema checks currently cover JSON responses, without format validation or remote schema fetching. Unsupported media requiring schema validation reports a limitation rather than silently passing.
This checks a real backend. A successful Mock request only demonstrates the sample workflow. An optional coding Agent can use run_contract_tests with an explicit baseUrl to run the same verification; inspect its patch before applying it.