Cross-chain swap aggregator across 16+ chains, incl. native Bitcoin/Solana. 0% fees, non-custodial.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Working code for the RAVN cross-chain swap API β including native Bitcoin, not wrapped BTC.
One integration covers 16 chains (14 EVM + Bitcoin + Solana). Every quote races 12 execution venues in parallel and the best net output wins. RAVN takes 0 bps on every route. Non-custodial: RAVN never holds your funds and writes no smart contracts of its own.
No signup required to start. Every example below runs anonymously.
| What it shows | |
|---|---|
src/health.ts | 10-second smoke test β which venues are racing right now. Start here. |
src/btc-out.ts | USDC on Base β native BTC, end to end. The one most swap APIs can't do. Dry-runs without a wallet. |
src/agent-swap.ts | Claude tool-calling loop: the model picks the swap, your code keeps the keys. |
src/x402-client.ts | Pay-per-call over x402 β no key, no account. |
src/ravn.ts | The whole client, ~150 lines. There is no SDK because you don't need one β copy this file. |
MCP.md | Point Claude or Cursor at the hosted MCP server. Three lines of config. |
Four calls, always the same order.
Everything branches on one field:
An ERC-20 swap is really two transactions. Before any contract can move your tokens you must
sign a separate on-chain permission β an approve(). TRANSACTION and SIGNATURE payloads carry
that ready to send, as approval, whenever it's needed.
Broadcasting the swap before the allowance is mined reverts on transferFrom and the user eats
the gas. On gasless venues (CoW, Bebop) it's quieter and worse: the order is accepted and simply
never fills, with no error. Native-coin sells, already-approved tokens and DEPOSIT routes omit
approval entirely.
RAVN doesn't read the chain for you, so approval can appear on a token you've already approved β
check the allowance for approval.spender and skip it when it already covers approval.amount.
unlimitedRecommended: true (CoW) means the venue would rather you approve once for a large amount
than pay approval gas on every swap. data still encodes the exact amount; raising it is your call.
Always strings, always the token's smallest unit β wei, lamports, satoshis. Never floats.
toBaseUnits() / fromBaseUnits() in src/ravn.ts convert safely.
Selling on EVM and receiving BTC or SOL needs a destinationAddress β the payout chain has no
idea what your EVM address is.
| No key | 30 req/min per IP |
| Free key, instant, no review | 120 req/min |
Pass it as x-api-key. CORS is enabled on every endpoint, so browser-side dapps and wallet
widgets can call the API directly with no server-side proxy.
Branch on the stable code, never the message.
INVALID_REQUEST Β· UNSUPPORTED_TOKEN Β· UNSUPPORTED_CHAIN Β· NO_LIQUIDITY Β· QUOTE_EXPIRED Β·
QUOTE_INVALID Β· RATE_LIMITED Β· UNAUTHORIZED Β· INTERNAL
Every response carries x-request-id. Quote it if you report a bad quote β it's how we find it.
https://app.ravn.exchange/api/mcphttps://app.ravn.exchange/openapi.jsonMIT licensed. Issues and PRs welcome.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/ravn-2)<a href="https://allmcps.com/mcp/ravn-2"><img src="https://allmcps.com/api/badge/ravn-2?style=directory" alt="RAVN on AllMCPs" /></a>