Repository navigation
Description
Problem
Signed in, the local MCP server's audit_website tool (squirrel mcp) runs an audit on your machine and, at the surface and full levels, adds the cloud checks: AI page analysis, authority signals, site metadata, technology detection, the editor's summary, domain stats and cloud link checks. It never registers a cloud audit, so none of that is billed as one. squirrel audit bills the same work at 50 credits plus 2 per audited page. A configured [cloud] render does cost credits, as standalone renders at 2 per page.
At the quick level, and in quick_check, the tool stays fully local, so a signed-in quick audit through the local MCP is not billed either. squirrel audit --level quick is billed (50 + 2 per page, cloud rendered).
Our rule: no signed-in audit is free in credits. The local MCP should bill an audit exactly the way squirrel audit does.
Expected
Signed in, audit_website at every level registers and bills like squirrel audit, using the same code path: the register decision, the affordability preflight, the cost estimate and cloud rendering. Quick is 50 + 2 per page with pages rendered in the cloud where needed, and surface and full are billed as the CLI bills them. Signed out, the tool stays local, makes no cloud calls and needs no account. quick_check stays local-only.
Before spending, the tool shows the cost the way the hosted MCP's run_audit does (an estimate, and a confirmation step for spend over a threshold). When the balance cannot cover the audit, it refuses with the cost and the balance instead of running unbilled or failing silently.
Acceptance Criteria
- Signed in,
audit_websiteatquick,surfaceandfullregisters a cloud run (the same register callsquirrel auditmakes), and the run is billed 50 credits plus 2 per audited page. - Signed in at
quick, pages that need JavaScript are rendered in the cloud browser, as insquirrel audit --level quick. - Signed out (no token),
audit_websiteat every level makes no cloud API call: no balance read, no register, no render. -
quick_checkmakes no cloud API call, signed in or not. - Before a billed run starts, the tool result carries the cost estimate. An estimate over the confirmation threshold needs explicit confirmation, as in the hosted
run_audit. - When the balance or the per-audit cap cannot cover even one page, the tool returns an error naming the cost and the balance, and nothing is registered or rendered.
- The
audit_websitedescription anddocs/cli/mcp.mdxsay a signed-in audit is billed likesquirrel audit, and signed-out runs stay local. - Tests: signed-in registers (red on main before the fix), signed-out makes no cloud call, insufficient balance refuses,
quick_checkunchanged.
Activity
docs(cli): say plainly what the local MCP audit_website bills
fix(cli): bill a signed-in local MCP audit_website like squirrel audit (