
Featured
Product
You can build an AI agent that trades on-chain in about 10 minutes: Claude for reasoning, the Velora MCP server for quotes and orders, and a small wallet module that signs only within limits you set. It executes gasless swaps through Velora Delta, falls back to the Market API when needed, and needs no API key to start.
Asking an AI model for the price of ETH is easy. Letting it actually trade takes more: correct token addresses, the right execution path, approvals, signatures, and a way to stop it before it does something you didn't intend.
The Velora MCP server handles the first half of that. MCP (Model Context Protocol) is the open standard AI assistants such as Claude, Cursor and VS Code use to call external tools. Velora (formerly ParaSwap) runs one that gives any agent quotes, routing decisions and ready-to-sign orders for both execution paths, gasless Delta intents and Market swaps, across 10 chains, with no API key and no SDK to wire up. It never signs anything, so the second half stays with you: a small wallet module that signs only what you've allowed and asks you before it does.
In this guide you'll build both: a command-line agent you can tell "swap 25 USDC to ETH on Base" and watch it quote, explain, ask for your confirmation and execute.
What you'll build: an AI agent that swaps tokens on-chain

Velora MCP server (
https://ai.velora.xyz/mcp): 18velora_*tools for quotes, Delta orders, Market transactions, order status, tokens and docs. Public, read-and-build only.Wallet tools: five tools you write and run locally. Your private key never leaves your machine and never reaches the model.
Two execution paths:
Velora Delta: intent-based and gasless. The agent signs an order, solvers compete to fill it, and you get MEV (maximal extractable value) protection built in.
Market API: classic aggregator swap through Augustus v6.2. The agent sends a transaction and pays gas. Used when Delta isn't available for a pair or when selling native ETH.
Before you start
Node.js 20.12 or later (for the built-in
.envloader)An Anthropic API key
A fresh wallet used only for this agent, funded on Base with a small amount of USDC and a little ETH for gas (approval transactions and Market swaps need gas; Delta orders signed with a permit don't)
A Base RPC URL (the public https://mainnet.base.org works for testing)
Use a burner wallet. You're giving software the ability to sign for it.
Step 1 (minute 1): Connect the Velora MCP server to Claude
If you use Claude Code, add the server and talk to it directly:
Then ask:
Quote 25 USDC to ETH on Base. Which execution path would Velora use, and why?
Claude will call velora_get_quote and velora_explain_quote and tell you whether you'd get a Delta or a Market route. Configs for Cursor, VS Code and Windsurf are in the MCP installation guide.
That's an agent that can plan trades. Next, you'll give it a way to execute them.
Step 2 (minutes 2–3): Set up a TypeScript project
--save-exact pins versions. For anything that holds keys, pin your dependencies and commit the lockfile.
Create .env:
Step 3 (minutes 3–7): Give the agent a wallet with spending limits
The Velora MCP server returns unsigned payloads: an EIP-712 order for Delta, or a transaction for Market. Your wallet module decides what gets signed. Every rule here is enforced in code, not in the prompt:
One chain (Base) and an allowlist of tokens, each with its address, decimals and a maximum amount per trade
Gasless EIP-2612 permits to the Delta contract for tokens that support them, such as USDC
Otherwise, approvals only to the two Velora spenders: the Delta contract and Augustus v6.2, for exact amounts
Transactions only to Augustus v6.2
Delta orders only if you're the owner and the amount is within limits
A y/N prompt in your terminal before anything is signed

Create wallet.ts:
A few details worth knowing:
Permits come first. USDC on Base supports EIP-2612, so for a Delta trade the agent signs a permit for the exact amount instead of sending an approval transaction. The permit travels inside the Delta order, so the whole trade costs no gas. WETH doesn't support permits, and
velora_build_transactiontakes no permit, so those cases fall back to an exact approval.Exact approvals cap your exposure. The Market path can't easily inspect swap calldata, so the approval is the real limit: the agent can only ever spend what you approved, for that one trade. Native ETH has no approval, which is why
MAX_ETHcaps the transaction value instead.The agent only trades tokens in
TOKENS. To support another token, add its address, decimals and per-trade max there.Delta signatures are ERC-2098 compact. Velora expects the 64-byte form, which is what
serializeCompactSignatureproduces.
Step 4 (minutes 7–9): Write the agent with the Claude Agent SDK
The agent is Claude, running through the Claude Agent SDK, with two MCP servers attached: Velora's (remote) and your wallet (in-process). The system prompt encodes Velora's agent rules: quote with mode=ALL, branch on the response type, pass routes verbatim, and show the numbers before asking for a signature.
Create agent.ts:
Step 5 (minute 10): Run your first AI swap
If it stops with "Credit balance is too low", add credits to the Anthropic account behind your API key in the Claude Console under Billing.
You'll see the agent work through the steps and stop at your terminal before anything is signed. A Delta run looks like this (trimmed, your numbers will differ):
Try a few variations:
"Sell 0.005 ETH for USDC on Base": native ETH goes through the Market path, so you'll get a transaction to confirm instead of an order. (Delta can also sell native ETH with an extra deposit step, which this agent skips for simplicity.)
"Swap 500 USDC to ETH": over the 100 USDC limit. The agent sees the limit in
wallet_infoand stops, and the wallet would refuse to sign anyway."Sell my PEPE": not in the wallet's token list, so the agent stops before quoting.
Velora Delta vs Market API: how the agent picks an execution path
You don't hard-code the path. The agent asks for mode=ALL and Velora returns exactly one route:

With Delta, the agent signs an order and the solver pays gas. With the Market API, the agent sends a transaction and pays gas itself; Velora returns a Market route when Delta doesn't support the pair or size, or when you sell native ETH.
When the answer is Market, velora_explain_quote returns the fallbackReason, so the agent can tell you why. If you need MEV protection specifically, ask for mode=DELTA; Velora returns an error rather than silently falling back.
Next steps: TWAP, limit orders and cross-chain swaps
This agent does one trade per run, on one chain, with you approving each step. From here:
Run it on a schedule. Swap the CLI argument for a strategy ("buy $20 of ETH every Monday") and replace the terminal prompt with a policy: auto-approve under a threshold, ask on Telegram above it, as in the Telegram trading bot prompt.
Use TWAP and limit orders. The MCP server also exposes
velora_build_twap_delta_orderandsubmit_twap_order, and Delta orders take alimitAmount, for larger trades or price-sensitive ones. Two changes to the wallet: these orders settle over time, so they need an on-chain approval instead of a permit, andsign_delta_ordermust also accept the TWAP order type. See the TWAP API guide.Go cross-chain. Pass
destChainIdtovelora_get_quoteand Delta handles the bridge (how crosschain swaps work, crosschain Delta docs). Add the destination chain's tokens to your allowlist.Check plans before you run them.
velora_validate_agent_planflags common mistakes, such as usingnetworkinstead ofchainIdor asking for MEV protection on a Market route.
Moving a trading agent to production
Every Velora endpoint is public. The partner value you pass identifies your traffic, and the free tier is rate-limited. When your agent, or the product you build around it, needs more throughput, create an account in Velora Portal to pick a Pro API plan, register your app, set where partner fees are paid, and track swaps and volume.
Before giving an agent real funds:
Test the agent with a handful of prompts, including ones it should refuse, and rerun them whenever you change the model or prompt (evals for trading agents will get their own article)
Keep the private key out of the model's reach, as here, and preferably in a hardware wallet, KMS or smart account with spending limits
Keep limits, allowlists and confirmations in code, not in the prompt
Pin exact dependency versions and commit your lockfile
Log every quote, signature and order id
FAQ
Do I need an API key to use the Velora MCP server?
No. The Velora MCP server and the Velora API are public. Pass a partner name to identify your traffic. For higher rate limits, pick a Pro API plan in Velora Portal.
Can the Velora MCP server sign or execute trades?
No. It returns unsigned payloads only: EIP-712 orders for Delta and transactions for the Market API. Signing happens in your own wallet code, so your private key never reaches the server or the model.
What is Velora Delta?
Velora Delta is an intent-based execution layer. You sign an order, solvers compete to fill it, and the solver pays gas. Orders are protected from MEV by design. How Delta works.
Which chains does the agent support?
Velora supports Ethereum, Optimism, BNB Chain, Gnosis, Unichain, Polygon, Base, Arbitrum, Avalanche and Robinhood Chain (chains and contracts). This guide uses Base. To trade elsewhere, change the chain and token addresses in wallet.ts and the chainId in the system prompt.
Does this work with AI models other than Claude?
Yes. Any MCP-compatible client or agent framework can use the Velora MCP server. The wallet guardrails in this guide are plain TypeScript and work with any agent loop.
Is it safe to let an AI agent trade crypto?
Only when limits are enforced outside the model. This guide uses a dedicated wallet, a token allowlist, per-trade caps, permits or exact approvals, and a human confirmation before every signature. Start with small amounts.















