Docs
Stanch's hosted API exposes deterministic diff anti-cheat auditing at POST /api/audit, log failure distillation at POST /api/digest, and MCP tools at /mcp on https://api.stanch.dev.
What Stanch catches
STANCH_MOCK_BYPASS catches newly added patches/monkeypatches mocking functions modified in the same PR. STANCH_TEST_SKIPPED catches added skips. STANCH_TEST_DELETED catches net test/assertion removals. STANCH_VACUOUS_ASSERT catches always-true assertions. STANCH_SWALLOWED_ERROR catches added silent exception handlers.
CLI & Clean-Room Execution Probes
Download stanch.pyz. With Python 3.11+ and Git installed, run this from the repository you want to check. Replace the path with the location of your download.
python /path/to/stanch.pyz check --repo . --strict --markdown
The CLI runs repository test and probe commands with your local permissions. Use a disposable CI runner for unfamiliar code. The receipt records the Git state and what ran. Its checksum lets you check the contents and detect stale results.
HTTP
POST JSON to https://api.stanch.dev/api/audit with a string field named diff. Requests over 1,000,000 bytes are refused. Anonymous calls are capped at 12 per day per address.
POST /api/audit
{"diff": "--- a/tests/test_total.py\n+++ b/tests/test_total.py\n@@ -0,0 +1 @@\n+assert True"}
MCP
Point your coding agent at https://api.stanch.dev/mcp and invoke audit_diff before opening a PR or finishing a turn.
{
"mcpServers": {
"stanch": {
"type": "http",
"url": "https://api.stanch.dev/mcp"
}
}
}
Keys & Retention
Pass Authorization: Bearer stanch_... from your account on the accounts site. Submitted diffs and logs are inspected strictly in memory and are never written to disk or used for training.