# THORChain Swap MCP Server

Use the canonical [THORChain MCP](https://gitlab.com/thorchain/thorchain-mcp/-/blob/main/README.md) server for live THORChain data. Its official registry identity is [`org.thorchain/thorchain-mcp`](https://registry.modelcontextprotocol.io/v0.1/servers/org.thorchain%2Fthorchain-mcp/versions/latest).

- **Endpoint:** https://mcp.thorchain.org/mcp
- **Transport:** Streamable HTTP, stateless; send JSON-RPC over POST and parse SSE responses
- **Server card:** [live core card](https://mcp.thorchain.org/.well-known/mcp/server-card.json) — current version, supported protocol revisions, capabilities, and tool schemas
- **Local mirror:** [THORChain Swap server card](https://swap.thorchain.org/.well-known/mcp/server-card.json) — the live core card with THORChain branding
- **Authentication:** none — no key, token, or OAuth
- **Source and deployment ownership:** https://gitlab.com/thorchain/thorchain-mcp

## Add it to a client

Claude Code:

```bash
claude mcp add --transport http thorchain https://mcp.thorchain.org/mcp
```

VS Code:

```bash
code --add-mcp '{"name":"thorchain","type":"http","url":"https://mcp.thorchain.org/mcp"}'
```

For clients that read an `mcpServers` configuration:

```json
{
  "mcpServers": {
    "thorchain": {
      "type": "http",
      "url": "https://mcp.thorchain.org/mcp"
    }
  }
}
```

No credential goes in these configurations. See [authentication](https://swap.thorchain.org/developers/auth).

## Selected tools

This is a selected subset of core tools. Call `tools/list` at the canonical endpoint for the complete inventory and current schemas.

### `quote_swap` — Get Swap Quote

Read indicative THORChain swap output, fees, slippage, and timing.

Parameters:

  - `from_asset` (string, required) — Source asset, e.g. BTC.BTC.
  - `to_asset` (string, required) — Destination asset, e.g. ETH.ETH.
  - `amount` (integer, required) — Amount in 1e8 base units.
  - `destination` (string) — Destination address for the swap output.
  - `affiliate` (string) — Affiliate address or THORName.
  - `affiliate_bps` (integer) — Affiliate fee in basis points (0-1000).

### `list_pools` — List Liquidity Pools

Read THORChain pools from Midgard with pagination.

Parameters:

  - `limit` (integer) — Maximum results (default 100, maximum 1000).
  - `offset` (integer) — Results to skip for pagination.

### `get_network_summary` — Get Network Summary

Read node counts, APY, reserve, pooled RUNE, churn height, and vault migration state.

Parameters:

  - no parameters

For executable swap instructions, use the core `prepare_swap` tool with `from_asset`, `to_asset`, integer `amount`, and a confirmed `destination`. It returns the deposit address, memo, minimum output, and expiry; the user still signs and sends the funds.

## Example and response

```bash
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
      }
    }
  }'
```

The response is `text/event-stream`. Parse each SSE `data:` event as JSON-RPC. Successful tool results contain `structuredContent` with `data` and `_metadata`; text content contains the same payload serialized as JSON. Example values:

```text
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}}"}]}}

```

List the complete tool inventory and JSON Schemas:

```bash
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/list"}'
```

## Transport and migration

Use a standard Streamable HTTP MCP client. Direct callers must send both media types in `Accept`; JSON-only Accept is rejected. The example selects a supported legacy protocol revision; consult the live core card for current revisions. The hosted server needs no protocol session or session id. It does not offer a GET SSE subscription.

The swap site's `/mcp` and `/.well-known/mcp` URLs permanently redirect to the canonical endpoint with HTTP 308, preserving the request method and body. Server-card aliases serve a live core card for GET/HEAD and redirect JSON-RPC POST/OPTIONS requests to the core endpoint. Configure clients with the canonical endpoint directly. The official TypeScript MCP SDK defaults to same-origin redirects and rejects the cross-origin redirect unless following redirects is explicitly enabled; direct canonical configuration avoids that failure. Redirects do not translate the former swap-only tool contract:

- Former quote callers must use `quote_swap`, with an integer amount. The former `streaming_interval` parameter is not part of this schema.
- Core `list_pools` accepts `limit` and `offset`; it returns a pool array under `structuredContent.data`. The old `asset`/`status` filters are not core parameters.
- Use `get_network_summary` for compact network metrics. Its shape differs from the former THORNode network response; it has no `fields` parameter.

The local quote UI resource is not part of the core server. Only capabilities present in the live core card and initialization response should be used. The core endpoint currently has no browser CORS allowance and returns 405 to OPTIONS, so browser cross-origin fetch cannot call it. Use a native/server-side MCP client. Rate limits and protocol behavior are owned by the core deployment; this site does not add browser access or a local MCP quota through its redirects.

The server never holds keys, signs, or submits transactions.

## Related

- [Quickstart](https://swap.thorchain.org/developers/quickstart)
- [Authentication](https://swap.thorchain.org/developers/auth)
- [SDKs](https://swap.thorchain.org/developers/sdks)
- [AGENTS.md](https://swap.thorchain.org/AGENTS.md)
