Agent Session — MCP
A complete agent session against the hosted MCP server (https://mcp.skia.money), speaking JSON-RPC 2.0 over Streamable HTTP
(protocol 2025-06-18). The same calls work same-origin against
/api/mcp. Bearer on testnet = the agent’s wallet address (simulated
ethSigAuth).
1. Initialize
notifications/initialized (a notification: fire and forget, no id).
2. Discover the tools
skia_get_quote,
skia_commit, skia_reveal, skia_swap, …) plus the five locked invoice
names: issue_invoice, acknowledge_invoice, pay_invoice,
dispute_invoice, get_receivable. Each carries its input schema; every
invoice tool is a thin proxy over the same handlers the REST routes use —
one law, two mounts.
3. Issue the invoice
claimHash and restrictionCheck — the same
IssueInvoiceResponse the REST path returns.
4. Acknowledge (the debtor’s agent)
5. Pay
INTENT_CREATED, fresh nonce,
pinned amount) and the unsigned 10-minute Order template. The debtor’s agent
signs the template offline and binds it — POST /v1/invoices/{invoiceId}/payments/{attemptId}/order (REST) — then settles
through the existing commit → reveal lanes. The MCP surface never forks
settlement logic.
6. Read the receivable
Role law is server-side
A tool call with the wrong bearer fails the same way REST does — the proxies forward to the same handlers:- Only the issuer issues, credits, voids, declares default.
- Only the debtor acknowledges, rejects, disputes, pays, binds.
- Reads are two-party.
Where to next
- Point a client at the server: MCP Server.
- The REST twin of this session: Invoice lifecycle.
- What the fold view means: Invoices.