TorrentSwap

For AI agents and developers

Crypto swap API and MCP server for AI agents

Give any AI assistant or app the ability to swap 39 assets across 17 networks: a remote MCP server and a REST API, no API key, no account, and all fees included in every quote.

MCP server URL

https://torrentswap.com/mcp

Connect your assistant

Add TorrentSwap as a remote MCP server. No authentication is required.

Claude (claude.ai and desktop)

Settings → Connectors → Add custom connector
Name: TorrentSwap
URL:  https://torrentswap.com/mcp

Claude Code

claude mcp add --transport http torrentswap https://torrentswap.com/mcp

ChatGPT

Settings → Apps & Connectors → Developer mode → Create
MCP server URL: https://torrentswap.com/mcp
Authentication: none

Cursor, VS Code and other MCP clients

{
  "mcpServers": {
    "torrentswap": { "url": "https://torrentswap.com/mcp" }
  }
}

Then ask, for example: “Swap 0.05 BTC to ETH and send it to my address 0x…”. The assistant quotes, shows you the protocol and amount, confirms your addresses and gives you the deposit address to pay from your own wallet.

Tools

ToolWhat it does
list_assetsEvery swappable asset with the id to use in quotes (bitcoin-btc, ethereum-eth, tron-usdt, zcash-zec…).
get_quoteLive routes ranked by amount received: executing protocol, expected and minimum receive, time, and a quoteToken.
validate_addressChecks an address, including its checksum, for the network of an asset before a swap is created.
create_swapTurns a quoteToken plus destination and refund addresses into a one-time deposit address and a swapId.
get_swap_statusFollows a swap from awaiting deposit through exchanging and sending to completed or refunded.

REST API quickstart

Same flow over plain HTTPS, with CORS enabled. Import the OpenAPI spec into GPT Actions, LangChain or any OpenAPI-aware framework.

# 1. Quote (read-only). All fees are included in every amount.
curl "https://torrentswap.com/api/v1/quote?from=bitcoin-btc&to=ethereum-eth&amount=0.05"

# 2. Create the swap from the chosen route's quoteToken (valid ~2 minutes)
curl -X POST https://torrentswap.com/api/v1/swap \
  -H "Content-Type: application/json" \
  -d '{"quoteToken":"v2…","destinationAddress":"0xYourEthAddress","refundAddress":"bc1qYourBtcAddress"}'
# → { "depositAddress": "…", "expiresAt": "…", "swapId": "…", "payment": { … } }

# 3. The user sends exactly sellAmount to depositAddress, then poll:
curl "https://torrentswap.com/api/v1/status?swapId=…"

How a swap works

  1. Quote: routes from NEAR Intents, Chainflip and Flashnet, best amount first.
  2. Confirm the route and both addresses with the user.
  3. Create the swap: a one-time deposit address, valid until expiresAt.
  4. The user sends exactly the quoted amount in one transaction.
  5. The protocol pays out to the destination address, or refunds to the refund address.

Built-in safety

  • Addresses are checksum-validated for their network before a swap is created.
  • Quote tokens are sealed: route, amount and fee cannot be altered.
  • Swap creation is idempotent per quote, so retries never create a second deposit address.
  • TorrentSwap never holds funds and never asks for keys.

Questions

Can an AI agent swap crypto with TorrentSwap?

Yes. Connect any MCP-capable assistant to https://torrentswap.com/mcp, or call the REST API. The agent quotes, confirms the addresses with the user and creates a deposit address; the user then sends the funds from their own wallet. The agent never needs a private key.

Do I need an API key or an account?

No. The MCP server and the REST API are open. Requests are rate-limited per IP: 60 quotes per minute, 30 swap creations per 5 minutes and 120 status checks per minute. Contact us for higher limits.

What does it cost?

Fees are already included in every quoted amount, together with network and protocol fees. There is no subscription and no per-request charge.

Which assets and networks are supported?

Bitcoin, Ethereum, Solana, Tron, BNB Chain, Arbitrum, Base, Optimism, Polygon, Avalanche, Litecoin, Dogecoin, Bitcoin Cash, Dash, Zcash, NEAR and Cardano, with stablecoins where available. /api/v1/assets returns the live list.

Who executes the swaps?

Open cross-chain protocols such as NEAR Intents, Chainflip and Flashnet. Every quote names the protocol, and routes are ranked by what the user receives.

Is the fee different from the website?

Fees are fixed when the quote is issued and sealed into the quote token, so they cannot change between quote and swap.

Try it in your assistant

Add https://torrentswap.com/mcp as an MCP connector and ask for a quote. Or start a swap on the website.