JSON API

The same engine as the web form, for CI pipelines, dashboards and agents. No key needed; fair-use limits apply per client.

Run a scan

curl -s -X POST https://webmcp.corsen.ai/api/scan \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com"}'

Returns {"id","url","queryRemoved","score","grade","report":"…/report/{id}","json":"…/api/report/{id}","expiresAt","deleteKey"}. url is the address actually scanned: query strings and fragments are removed for privacy (queryRemoved: true tells you so). A page that answers HTTP 4xx or 5xx is not graded: the API returns 422 with the status. Reports are temporary: they expire one hour after the scan. A page scanned in the last 10 minutes returns the existing report; add "fresh": true to force a new scan (rate limited).

Read a report

curl -s https://webmcp.corsen.ai/api/report/{id}

The full report: status, provisional security score, findings, coverage, informational checks, inert fixes, before/after views, starter contracts, iframe surface and captured contracts. Score and grade are null when status is not-exposed. Each tool carries fingerprints (SHA-256 of the whole contract, the description, the input schema and the annotations) and afterInteraction, true when it registered after the passive pointer movement and scroll, and replaced when it took the name of a tool removed earlier in the same load (changed and the parts that differ); interaction gives the time of that gesture, null when it could not be made. originTrials lists the decoded origin-trial tokens without their text, each with how it reached the page (header, markup for the served HTML, script for a meta element added by a script). Downloads: GET /api/report/{id}/export.md, /export.sarif.json, /export.github.sarif.json, /export.contracts.json, /export.json or /export.badge.svg; all expire and delete with the report.

Contract fingerprints

curl -s https://webmcp.corsen.ai/api/report/{id}/export.contracts.json -o webmcp-contracts.json

A webmcp-contracts/1 document: the page, the scanner version and capture mode, and one entry per tool, sorted by name, with its contract fingerprint and the fingerprint of each part. Commit it after review; a later report's document compared with it shows which tool changed, which part, and which tool is new. Each report page compares a saved file in your browser, and the workflow generator does it in GitHub Actions.

SARIF and GitHub code scanning

SARIF rules carry a full description, help text and a security severity. export.sarif.json keeps logical runtime locations: the scanner never invents a repository file or line. GitHub displays a code scanning result only with a file of the repository, so a second form anchors each result to a file you name, line 1, with a stable fingerprint per finding and one analysis category per scanned page:

curl -s -G https://webmcp.corsen.ai/api/report/{id}/export.github.sarif.json \
  --data-urlencode 'anchor=.github/workflows/webmcp-audit.yml'

anchor is a repository-relative path (default .github/workflows/webmcp-audit.yml); add info=1 to keep informational observations. Upload the file with github/codeql-action/upload-sarif@v4. The workflow generator does all of this for one page. Code scanning on private repositories requires GitHub Code Security. Scan only public addresses; a fresh scan counts against the rescan quota, and reports expire one hour after the scan.

Delete a report before it expires

curl -s -X POST https://webmcp.corsen.ai/api/report/{id}/delete --data-raw '{deleteKey}'

Ruleset

curl -s https://webmcp.corsen.ai/api/checks

Errors and limits

422 challenge-page means a browser verification page prevented assessment; no report or score is created. 403 can require a browser check; 503 means temporary capacity limits. Do not retry automatically. An HTML-only report has limited JavaScript coverage.

400 invalid or refused address (private networks, non-http schemes, credentials in the URL), 422 page unreachable, 429 too many scans — retry after the number of seconds in Retry-After.

WebMCP

This site exposes its own tools to agents in Chrome: scan_site (declarative form on the home page), get_report and list_checks.