Skip to main content

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

The result carries the server’s capabilities and its instructions — which include the invoice-family flow (issue → acknowledge → pay → read). Follow with notifications/initialized (a notification: fire and forget, no id).

2. Discover the tools

Sixteen tools come back — the settlement family (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

The tool result carries claimHash and restrictionCheck — the same IssueInvoiceResponse the REST path returns.

4. Acknowledge (the debtor’s agent)

5. Pay

The result is the payment intent: the attempt (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

The pure fold view: status, outstanding, paidToDate, creditedToDate, openDisputedAmount, lateFeeAccrued — and the full event list.

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