MCP tool · write 3 credits

thornode_quote_swap

Quote a THORChain swap from one asset to another. Pass-through of /thorchain/quote/swap. Required: from_asset, to_asset, amount (in 1e8 base units). All other params are optional pass-through.

JSON-RPC call

Paste this body into your MCP client's `tools/call` request. The `id` field is the JSON-RPC message correlator (caller-chosen, not a record identifier — set it to anything; the server echoes it back).

tools/call body
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "thornode_quote_swap",
    "arguments": {
      "from_asset": "<from_asset>",
      "to_asset": "<to_asset>",
      "amount": "<amount>",
      "destination": "<destination>",
      "streaming_interval": 0,
      "streaming_quantity": 0,
      "tolerance_bps": 0,
      "affiliate": "<affiliate>",
      "affiliate_bps": 0
    }
  }
}

Arguments

Name Type Required Description
from_asset string required Source asset, e.g. "BTC.BTC".
to_asset string required Destination asset, e.g. "ETH.ETH".
amount string required Amount in 1e8 base units, as a string (avoids JS-int precision loss).
destination string optional Destination address.
streaming_interval integer optional
streaming_quantity integer optional
tolerance_bps integer optional
affiliate string optional
affiliate_bps integer optional

Copy-paste prompt samples

Drop one of these into Claude Code, n8n, or any MCP client. Your AI agent should pick this tool to answer.

Quote a swap of 1 BTC to ETH on THORChain.
How much RUNE would I get for 0.5 BTC.BTC right now?
Quote 100 ETH.ETH → BTC.BTC with 1% slip tolerance.
Get a streaming-swap quote for 10 BTC into THOR.RUNE, streaming over 12 intervals.
Quote 1 ATOM → ETH with affiliate "myaffil" at 30 bps.

Example response

Illustrative shape — actual values vary.

response shape
{
  "expected_amount_out": "12000000000",
  "expected_amount_out_streaming": "12010000000",
  "streaming_swap_blocks": 12,
  "total_swap_seconds": 720,
  "fees": {
    "affiliate": "0",
    "asset": "THOR.RUNE",
    "liquidity": "5000000",
    "outbound": "4000000",
    "total": "9000000"
  },
  "slippage_bps": 21,
  "total_swap_bps": 28,
  "memo": "=:THOR.RUNE:thor1abc...xyz"
}

Possible errors

VALIDATION
Returned when the arguments fail the typed schema.
NOT_FOUND
Returned when the requested resource does not exist in our DB.
RATE_LIMIT
Returned when your token's credit budget is exhausted.
UPSTREAM
Returned when the upstream HTTP call fails (relayer tools only).