THORChain Swap API Quickstart

Fetch a live THORChain quote for a THORChain Swap (https://swap.thorchain.org) integration in one request — no account, no API key, no registration.

1. Call the MCP server

The canonical THORChain MCP server at https://mcp.thorchain.org/mcp speaks JSON-RPC 2.0 over HTTP POST. It requires the dual Accept header shown below and returns SSE events. No credential is required.

curl -N -sS https://mcp.thorchain.org/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H 'MCP-Protocol-Version: 2025-06-18' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "quote_swap",
      "arguments": {
        "from_asset": "BTC.BTC",
        "to_asset": "ETH.ETH",
        "amount": 100000000
      }
    }
  }'

2. Read the quote

Parse the JSON-RPC object in each SSE data: event. Read the quote at result.structuredContent.data; result.structuredContent._metadata records its source and freshness. The text content contains the same data as JSON. For example (illustrative values):

event: message
data: {"jsonrpc":"2.0","id":1,"result":{"structuredContent":{"data":{"expected_amount_out":"123456"},"_metadata":{"source_used":"thornode","canonical":true}},"content":[{"type":"text","text":"{\"data\":{\"expected_amount_out\":\"123456\"},\"_metadata\":{\"source_used\":\"thornode\",\"canonical\":true}}"}]}}

3. Hand the user a prefilled swap link

https://swap.thorchain.org/sell-BTC-buy-ETH
https://swap.thorchain.org/sell-BTC.BTC-buy-ETH.USDC

The user completes and signs the swap themselves, in their own wallet or through the wallet-free memoless flow. THORChain Swap holds no keys and submits nothing on a user's behalf.

Conventions

Next steps

This page as markdown: /developers/quickstart.md