Base URL and transports
https://api.runmirrors.com. Three doors:
- tRPC at
/trpc/<verb>: the web app and the CLI; queries for reads (GETwith?input=), mutations for writes (POSTwith a JSON body). Every procedure is a verb from the registry. - Plain HTTP routes for what is not a verb: collect, the tool plane, the multipart build, uploads, webhooks, OAuth discovery, health.
- MCP at
/mcp(the MCP server).
GET /api/registry returns every verb definition and each verb’s real
input as JSON Schema; the CLI derives its commands from it.
Authentication
Authorization: Bearer <credential>: a workspace key (mk_live_), a
session token (ms_, session routes only), an MCP access token
(mcp_at_), or the web session’s JWT. See API keys.
Errors
Every error answers with one JSON envelope:meter (which meter, used and limit) and
cardWouldLift (whether a card on file would lift it); access errors
add access (pending or denied). tRPC carries the same envelope
under error.data.envelope with the HTTP status in error.data.httpStatus.
