Robyn AnyGas

Integration cookbook

Copy-paste recipes to wire Robyn AnyGas into an agent or app. Every client defaults to the live gateway with zero config — no key required for reads. Base URL: https://api.anygas.xyz/svc.

Keyless reads Zero-config clients Sandbox = zero funds 0.25% routing fee
Honesty note. The MCP server, SDKs and adapters are MIT-licensed; the hosted relayer, routing service and contracts are proprietary — build on Robyn, don't clone it. Use sandbox mode (x-anygas-sandbox: 1) to test the full execute → status → DONE flow with no funds and no funded relayer.

1 MCP client config

Add Robyn to any MCP client — Claude Desktop, Cursor, or any agent runtime. Run it locally with npx, or point at the hosted, read-only streamable-HTTP endpoint (no install, no key).

mcp.json  ·  local (npx)
{
  "mcpServers": {
    "robyn": { "command": "npx", "args": ["anygas-mcp"] }
  }
}
hosted · zero install (read-only)
# Streamable HTTP MCP endpoint — public, read-only, no key:
https://api.anygas.xyz/mcp

# also on JSR:  npx jsr add @anygas/mcp
# tools: robyn_mesh · robyn_quote · robyn_cross_chain · robyn_route_status

Reads (robyn_mesh, robyn_quote, robyn_route_status) need no signer. robyn_cross_chain builds a route; execution requires a signer / funded relayer or sandbox mode.

2 Raw HTTP — quote, sandbox, compare

No SDK, no key. All paths sit under /svc. Amounts are strings in the token's smallest units (USDC 6dp → "5000000" = 5 USDC).

curl · quote the best gasless route
curl -s https://api.anygas.xyz/svc/api/route/quote \
  -G --data-urlencode "fromChain=42161" \
     --data-urlencode "toChain=8453" \
     --data-urlencode "token=USDC" \
     --data-urlencode "amount=5000000"
# -> { gasless:true, bestOf:N, compared:[...], robynRouteFeeBps:25, durationSec:… }
curl · sandbox execute (zero funds, x-anygas-sandbox: 1)
curl -s https://api.anygas.xyz/svc/api/route/execute \
  -H 'content-type: application/json' \
  -H 'x-anygas-sandbox: 1' \
  -d '{"fromChain":42161,"toChain":8453,"fromToken":"USDC",
       "toToken":"USDC","amount":"5000000",
       "toAddress":"0xYourRecipient…"}'
# -> { status:"BRIDGING", sandbox:true, id:"sbx_…", robynRouteFeeBps:25 }
# poll: GET /svc/api/route/status?id=sbx_…  → RECEIVING → SWAPPING → SENDING → COMPLETED (~40s)
curl · compare rails for a cross-chain move
curl -s https://api.anygas.xyz/svc/api/route/compare \
  -G --data-urlencode "fromChain=42161" \
     --data-urlencode "toChain=solana" \
     --data-urlencode "fromToken=USDC" \
     --data-urlencode "toToken=USDC" \
     --data-urlencode "amount=50000000"
# non-EVM nodes are literal strings: "solana" · "stellar" · "bitcoin"

The API is keyless. Passing x-anygas-key: <key> only tags requests for usage visibility — it is never required. Over the per-IP limit → 429 {"error":"rate limited"}.

3 JavaScript / TypeScript

The Agent Kit wraps the whole API and defaults to the live gateway. Read methods need no signer; pass one only to execute.

install
npm i anygas-agent-kit   # MIT · also on JSR as @anygas/agent-kit
agent.ts
import { RobynAgent } from 'anygas-agent-kit';

// zero-config → defaults to https://anygas.xyz/svc
const robyn = new RobynAgent();

// gasless cross-chain quote — no signer needed for reads
const quote = await robyn.route({
  fromChain: 42161, toChain: 8453,
  fromToken: 'USDC', toToken: 'USDC', amount: '5000000'
});

// to execute, construct with a signer:
// const robyn = new RobynAgent({ signer });
// await robyn.crossChain({ fromChain: 42161, toChain: 8453, token: 'USDC', amount: '5000000' });

4 Python

Same zero-config default. Great for backends, notebooks, and data pipelines.

install
pip install anygas
agent.py
from anygas import Robyn

robyn = Robyn()                       # zero-config → this gateway
mesh  = robyn.chains()                 # the live route graph

quote = robyn.compare(
    fromChain=42161, toChain="solana",
    fromToken="USDC", toToken="USDC", amount="50000000")
print(quote)

5 Framework adapters

Robyn ships MIT adapters on npm as anygas-adapters for the Vercel AI SDK, LangChain and Coinbase AgentKit. For any runtime that speaks MCP — including CrewAI — the fastest, always-current path is to attach the hosted MCP server directly.

Vercel AI SDK — anygas-adapters
import { robynTools } from 'anygas-adapters/ai-sdk';
import { generateText } from 'ai';

await generateText({
  model, tools: robynTools(),   // quote/route/compare as AI-SDK tools
  prompt: 'Move 5 USDC from Arbitrum to Base gaslessly'
});
LangChain — anygas-adapters
# JS: import { robynLangchainTools } from 'anygas-adapters/langchain'
from anygas import Robyn
robyn = Robyn()
# expose robyn.chains / robyn.compare as LangChain Tools
# in your agent's tool list.
Coinbase AgentKit — anygas-adapters
import { robynActionProvider } from 'anygas-adapters/agentkit';

// register alongside your other
// AgentKit action providers
const providers = [ robynActionProvider() ];
CrewAI / any MCP runtime — attach the server
# CrewAI supports MCP servers — point it at Robyn,
# no bespoke adapter needed:
{
  "mcpServers": {
    "robyn": { "command": "npx", "args": ["anygas-mcp"] }
  }
}
# or hosted HTTP: https://api.anygas.xyz/mcp
Prefer the MCP route when in doubt. Adapter package surfaces evolve; the MCP server (npx anygas-mcp or hosted https://api.anygas.xyz/mcp) exposes the same tools to every MCP-capable framework and is the most verifiable integration path. See the API docs for exact request/response shapes.
Robyn AnyGas · integration cookbook Full API docs → Playground → Status → anygas.xyz