Tutorial 7 of 7
Automate with the API, MCP and the App Bridge
Advanced 8 min
Build a Chainscope case from a script or an AI agent, open it with a #project= link, call the fifteen tools directly and hand findings to other premium apps.
Chainscope is a browser app, but everything it does is built on documented interfaces you can use from scripts and AI agents.
1. The case format
A case is plain JSON with "format": "chainscope-case" and "version": 1. Its schema is published at /project.schema.json on chainscope.usefulweb.site. The important parts:
{
"format": "chainscope-case",
"version": 1,
"name": "Token review",
"entities": [{ "id": "e1", "type": "token", "value": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chain": "ethereum", "label": "USDC", "flag": "watch" }],
"checks": [{ "id": "c1", "kind": "contract-upgrade-explorer", "name": "Upgrade control of USDC", "inputs": { "mode": "lookup", "chain": "ethereum", "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" } }]
}
A check's kind is a tool id and its inputs are exactly that tool's API input, so anything that works on the API works in a case. Runs are optional: Chainscope adds them when the user presses Run all.
2. Open a case from a link
Base64url-encode the JSON and open https://chainscope.usefulweb.site/app#project=<encoded>. File → Copy share link… builds the same link for the current case. Nothing is uploaded; the whole case travels in the link fragment. For large cases the link keeps only the latest run of each check and no graphs, and the dialog says so; save a case file to keep everything.
3. Call the tools directly
The app host serves the fifteen tools:
GET /api/v1/toolslists them,GET /api/v1/tools/<id>returns the input schema and examples.POST /api/v1/tools/<id>/calculatewith the JSON input returnssummary,result,warnings,presentationandlinks./mcpis a Model Context Protocol server namedusefulweb-chainscopewith the same tools;/openapi.jsonand/llms.txtdescribe them.
The web3 tools share a rate limit of about 15 requests per minute; answer HTTP 429 by waiting for retry-after, as Chainscope does.
4. Exports for pipelines
Export offers Findings (CSV), Findings (JSON) ("format": "chainscope-findings" with counts, findings and entities), Address book (CSV), Report (Markdown), Reminders calendar (.ics), Case graph (SVG) and Case graph (PNG). CSV cells that start with =, +, - or @ are prefixed with an apostrophe so spreadsheets do not execute them.
5. The App Bridge
When other premium apps accept the type, the Export menu also shows Open findings in another app…, Open findings table in another app…, Open address book in another app…, Open case graph in another app… and Open report in another app…. The hand-over stays in your browser.
In the other direction, apps that send text — notes, logs, chat exports — can open Chainscope directly. The text arrives in the Add addresses and hashes dialog, so you review what was found before anything is added to the case.
Ready to try it?