RAVN examples
MCP serverCommerce & financeravn lets your AI swap tokens across more than 16 blockchains, including native Bitcoin and Solana. Swaps carry no fees, and because it is non-custodial you keep control of your funds from start to finish.
Use RAVN examples in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add RAVN examples and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the ravn quote tool from RAVN examples
No key or account is asked for. Not verified by us yet: Ahel has not run a call through it.
Details
Available today. Use it from your connected AI after setup.
No key or account is asked for. Not verified by us yet: Ahel has not run a call through it.
After adding ravn, tell your AI which tokens you want to swap and which chains they should move between.
What your AI can do with it
- Swap tokens across 16+ blockchains
- Move funds to and from native Bitcoin and Solana
- Find swap routes across chains in one place
- Swap without paying fees
- Keep control of your funds during every swap
Install RAVN examples
The server’s own address, for the clients that take one directly. Or connect Ahel once and every client you use reads it from one address, with the account kept on Ahel rather than in each client’s config.
Claude Code
claude mcp add --transport http --scope user ravn-examples 'https://app.ravn.exchange/api/mcp'Run it once in your project, then open /mcp to approve any sign-in the server asks for.
Claude Desktop
https://app.ravn.exchange/api/mcpAdd a custom connector in Settings, paste this address, and approve the sign-in.
Cursor
cursor://anysphere.cursor-deeplink/mcp/install?name=ravn-examples&config=eyJ1cmwiOiJodHRwczovL2FwcC5yYXZuLmV4Y2hhbmdlL2FwaS9tY3AifQ==Open the link and Cursor adds the server at that address.
ChatGPT
https://app.ravn.exchange/api/mcpIn Settings, enable Developer mode, create an MCP app, and paste this address. Your plan and workspace must allow custom apps.
Codex
codex mcp add ravn-examples --url 'https://app.ravn.exchange/api/mcp'Run it once, then sign in with codex mcp login ravn-examples if the server asks for an account.
From the project's README
As published by ravndex/ravn-examples in README.md.
Working code for the RAVN cross-chain swap API — including native Bitcoin, not wrapped BTC.
One integration covers EVM chains, native Bitcoin and Solana. Every quote races every live execution venue 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.
git clone https://github.com/ravndex/ravn-examples
cd ravn-examples && npm install
npm run health
The examples
| 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. |
The contract
Four calls, always the same order.
POST /quote → best route + an opaque quoteToken
POST /execute → an execution payload tagged by executionType
(+ submit-signature, when the type is SIGNATURE)
GET /status → pending → processing → success (or refunded / failed)
Everything branches on one field:
switch (execution.executionType) {
case "TRANSACTION": // sign and broadcast it yourself
case "SIGNATURE": // sign typed data; RAVN submits it, no gas
case "DEPOSIT": // send the input asset to an address
}
The one thing that trips people up
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.
if (execution.approval) {
const hash = await wallet.sendTransaction(execution.approval);
await client.waitForTransactionReceipt({ hash }); // MINED, not just broadcast
}
// …now send the swap
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.
Amounts
Always strings, always the token's smallest unit — wei, lamports, satoshis. Never floats.
toBaseUnits() / fromBaseUnits() in src/ravn.ts convert safely.
Cross-ecosystem swaps
Selling on EVM and receiving BTC or SOL needs a destinationAddress — the payout chain has no
idea what your EVM address is.
Rate limits
| 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.
Errors
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.
Links
- Docs — https://docs.ravn.exchange
- App — https://app.ravn.exchange
- MCP server —
https://app.ravn.exchange/api/mcp - OpenAPI spec (Postman / Insomnia import) —
https://app.ravn.exchange/openapi.json - Partnerships — team@ravn.exchange · @ravnexchange
MIT licensed. Issues and PRs welcome.
Tools it offers (10)
What this server listed when Ahel dialed its public endpoint in Oct 2026, with no key and no account of yours. The names are the server’s own.
ravn_quoteravn_executeravn_submit_signatureravn_statusravn_healthravn_tokensravn_tokens_resolveravn_btc_coverageravn_chainsravn_btc_prepare_send
Signals
- Last commit
- Sep 2026
Advanced
- Delivery
- ravn MCP server → your Ahel connector (mcp.ahel.ai) → your AI.
- Item type
- mcp-server
- Key
exchange-ravn-ravn- Source
- github.com/ravndex/ravn-examples
- Hosted endpoint
https://app.ravn.exchange/api/mcp
github.com/ravndex/ravn-examples
More in Commerce & finance
MCP server · mikeypetrillo
More in Commerce & financecrypto-quant-signal-mcp
MCP server · algovaultlabs
More in Commerce & financeHive Intelligence MCP
MCP server · hive-intel
More in Commerce & financekeryx
MCP server · tang-vu
More in Commerce & financetruss44-mcp-crypto-price
MCP server · truss44
More in Commerce & financetrading-mcp
MCP server · ai-rook
More in Commerce & finance