Relay MCP Server
Relay MCP Server gives AI agents cross-chain bridge/swap tooling on Relay Protocol — quoting, discovery, fee estimation, execution, and transaction tracking.
Quote & estimate —
get_bridge_quote(same token across chains),get_swap_quote(different tokens, same- or cross-chain),estimate_fees(gas + relayer fee breakdown).Discover chains & tokens —
get_supported_chains(optionalvmTypefilter) andget_supported_tokens(search by name/symbol, with limit, chain IDs, verified filters).Execute transfers —
execute_bridgereturns the quote plus every unsigned step (ERC-20 approve + deposit; single deposit for native ETH; sometimes an EIP-712 signature step) and arequestId.Connect a wallet —
walletwithpair(WalletConnect QR, requireschainIds),status(blocks up to 60s for scan),execute(runs all steps in order),disconnect.Track transactions —
get_transaction_status(waiting / pending / success / failure / refund; poll every 5–10s) andget_transaction_history(paginated by cursor, default 10).Share deep links —
get_relay_app_urlbuilds a pre-filled Relay web app URL (trade type defaults toEXACT_INPUT) so a user can start a transfer in the UI.Per README (not in schema) — chain-name resolution/aliases, tool-picking guidance, slim responses, and
get_trending_tokens,get_token_price,get_token_details,get_swap_sources,check_chain_status,index_transaction,get_app_fees,get_api_schema.
Note: the README advertises 16 read-only tools, but this schema exposes 11 and adds write-capable ones (execute_bridge, wallet).
Provides tools for cross-chain bridging and swapping assets on Ethereum, including chain and token support discovery, fee estimation, and transaction data generation for AI agents.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Relay MCP Server Bridge 0.1 ETH from Ethereum to Base"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Relay MCP Server
A Model Context Protocol server for Relay Protocol — cross-chain bridge and swap tools for AI agents.
Tools (16)
Quoting & Routing
Tool | Description |
| Quote for bridging same token across chains |
| Quote for swapping between different tokens (same-chain or cross-chain) |
| Fee breakdown for a bridge or swap route |
Token & Chain Discovery
Tool | Description |
| List supported blockchain networks (slim response) |
| Search for tokens across chains |
| Currently trending tokens across Relay-supported chains |
| Current USD price of a token |
| Full token fundamentals: price, market cap, volume, liquidity, optional price chart |
| List DEX aggregators and AMMs that Relay routes through |
Chain Health
Tool | Description |
| Chain health, solver liquidity, and route configuration (3 API calls in 1 tool) |
Transaction Tracking
Tool | Description |
| Check status by request ID or on-chain tx hash |
| Past transactions for a wallet |
| Tell Relay to index a transaction it may have missed |
Integrator Tools
Tool | Description |
| Claimable app fee balances and claim history (2 API calls in 1 tool) |
| Deep link to the Relay web app with pre-filled parameters |
| Discover Relay API endpoints and inspect their schemas |
Related MCP server: Hyperlane MCP Server
Usage
Claude Desktop / Claude Code
Add to your claude_desktop_config.json or .claude.json:
{
"mcpServers": {
"relay": {
"command": "npx",
"args": ["-y", "@relayprotocol/relay-mcp"]
}
}
}Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"relay": {
"command": "npx",
"args": ["-y", "@relayprotocol/relay-mcp"]
}
}
}Run from source
npm install
npm run build
npm startEnvironment variables
Variable | Default | Description |
|
| Relay API base URL |
| — | API key. Required by |
| random per process | HTTP mode only. Signs OAuth tokens; set it so tokens stay valid across restarts |
Features
Chain name resolution — Pass
"base","ethereum","arb"instead of numeric chain IDs. Supports aliases and fuzzy matching.Input validation — Addresses, amounts, and chain IDs are validated before hitting the API, with clear error messages.
Bundled tools —
check_chain_statusandget_app_feescombine multiple API calls into single tools with parallel fetching.Decision-tree descriptions — Tool descriptions guide agents to pick the right tool ("For just the price, use
get_token_price. For full fundamentals, useget_token_details.").Slim responses — Responses are trimmed to essential fields. Chart data is downsampled from ~21KB to ~3KB.
API schema discovery —
get_api_schemalets agents explore available endpoints on demand (progressive disclosure pattern).Tx hash lookup —
get_transaction_statusaccepts either a request ID or an on-chain transaction hash.Structured errors — Errors are categorized (validation, api, network, rate_limit, server, auth) with retryability hints.
Architecture
Transport: Stdio (MCP spec)
Runtime: Node.js >=20
API: Direct HTTP calls to
api.relay.link(no SDK dependency)Read-only: Returns quotes, fees, and status. Does not sign or broadcast transactions.
Agent flow examples
User: "Bridge 0.1 ETH from Ethereum to Base"
1. Agent calls get_bridge_quote(originChainId="ethereum", destinationChainId="base", ...)
→ chain names resolved automatically, quote returned with fees and ETA
2. Agent shows user the quote and a link to execute on relay.linkUser: "What tokens are trending on Base?"
1. Agent calls get_trending_tokens(chainId="base")
→ returns token identities (no prices)
2. Agent calls get_token_price for each interesting token
→ returns current USD pricesLicense
MIT
Available Tools
10 toolsestimate_feesA
Estimate the fees for a bridge or swap without committing to execution. Returns a breakdown of gas fees, relayer fees, and total cost impact. Useful for comparing routes or showing users expected costs.
Inputs: originChainId (required), destinationChainId (required), originCurrency (required), destinationCurrency (required), +2 more.
execute_bridgeA
Get a quote and unsigned transactions for a bridge or swap via Relay. Returns ALL steps required to complete the transfer.
For ERC-20 tokens (like USDC), there are typically TWO steps:
approve — An ERC-20 approval transaction allowing Relay to spend the token.
deposit — The actual bridge/swap transaction.
For native tokens (ETH), there is usually just ONE step:
deposit — The bridge/swap transaction.
Some routes may also include a "signature" step (EIP-712 signing instead of a transaction).
Each step has a "kind" field:
"transaction" → must be signed and broadcast via eth_sendTransaction
"signature" → must be signed via eth_signTypedData_v4, then POSTed to the Relay API
After calling this tool, pass ALL the returned steps to the wallet tool with action "execute" to sign and submit them in order. The wallet tool handles the full multi-step flow automatically.
If a wallet is connected via the wallet tool, the sender defaults to the connected address. Returns a requestId for tracking status via get_transaction_status.
Inputs: originChainId (required), destinationChainId (required), originCurrency (required), destinationCurrency (required), +3 more.
get_bridge_quoteA
Get a quote for bridging the same token from one chain to another (e.g. ETH on Ethereum → ETH on Base). Returns estimated output amount, fees breakdown, and time estimate. Use get_swap_quote instead if you want to change the token type.
Inputs: originChainId (required), destinationChainId (required), currency (required), amount (required), +2 more.
get_relay_app_urlA
Generate a deep link to the Relay web app with pre-filled bridge/swap parameters. The user can open this URL in their browser to START a new transaction via the Relay UI. This is NOT a transaction tracking URL — do NOT use it to check on an in-progress transaction. For tracking, use get_transaction_status with the requestId.
Inputs: destinationChainId (required), fromChainId, fromCurrency, toCurrency, +3 more.
get_supported_chainsA
List all blockchain networks supported by Relay for bridging and swapping. Returns chain IDs, names, native currencies, and status. Use this to resolve chain names to chain IDs before calling other tools.
Inputs: vmType.
get_supported_tokensA
Search for tokens supported by Relay across chains. Use this to find token contract addresses before getting quotes. Returns token symbol, name, address, and chain availability.
Inputs: chainIds, term, verified, limit.
get_swap_quoteA
Get a quote for swapping between different tokens, optionally across chains (e.g. ETH on Ethereum → USDC on Base, or USDC → WETH on the same chain). Returns estimated output amount, fees, and time estimate.
Inputs: originChainId (required), destinationChainId (required), originCurrency (required), destinationCurrency (required), +3 more.
get_transaction_historyA
Get past Relay bridge and swap transactions for a wallet address. Returns transaction IDs, statuses, chains, and timestamps. Supports pagination via cursor.
Inputs: user (required), limit, cursor.
get_transaction_statusA
Check the status of a Relay bridge or swap transaction. Use the requestId returned from execute_bridge.
Statuses: waiting — The origin chain transaction has been broadcast but not yet confirmed on-chain. Just wait — no further action needed. pending — The relay network has picked up the request and is processing the cross-chain transfer. success — Complete. Funds have arrived on the destination chain. failure — The transaction failed. refund — The transaction was refunded to the sender.
IMPORTANT: After the wallet "execute" action completes all steps (approval + deposit), Relay handles the cross-chain delivery automatically. Poll every 5-10 seconds until success or failure. The user does NOT need to do anything else after execution completes — just wait.
Inputs: requestId (required).
walletA
Connect a user's wallet via WalletConnect. The user scans a QR code with their mobile wallet (MetaMask, Rainbow, etc.) to approve transactions — private keys never leave their device.
Actions: pair — Returns a WalletConnect URI. You MUST then display it as a QR code (see below), then IMMEDIATELY call status to wait for connection. status — Waits up to 60s for the wallet to connect. Blocks until connected or timeout. Call this right after rendering the QR. execute — Execute ALL steps from execute_bridge in order. Handles multi-step flows (approval + deposit) and both transaction and signature steps automatically. disconnect — End the wallet session.
IMPORTANT: After calling pair, you must:
Render the returned URI as a QR code using the bash command below.
Immediately call wallet with action 'status' — it will block until the user scans and connects (up to 60s).
Run this bash command to render the QR as an image, substituting the URI:
python3 -c " import qrcode, tempfile, os qr = qrcode.QRCode(border=3, box_size=10, error_correction=qrcode.constants.ERROR_CORRECT_L) qr.add_data('WALLETCONNECT_URI_HERE') qr.make() img = qr.make_image(fill_color='black', back_color='white') p = os.path.join(tempfile.gettempdir(), 'relay-wc-qr.png') img.save(p) os.system(f'open {p}') print(f'QR code opened: {p}') "
If python3 qrcode is not installed, run: pip3 install "qrcode[pil]"
Typical flow: pair → render QR via bash → (user scans) → status → execute_bridge → execute → get_transaction_status
Inputs: action (required), chainIds, steps.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a distinct purpose with clear boundaries. For example, estimate_fees is for cost estimation only, execute_bridge handles transaction preparation, get_bridge_quote and get_swap_quote are for different quote types, and wallet manages wallet connections and execution. No tools appear to overlap or cause confusion.
All tool names follow a consistent verb_noun pattern using snake_case, such as estimate_fees, execute_bridge, get_transaction_status, and wallet. The naming is predictable and uniform across all 10 tools, making them easy to identify and use.
With 10 tools, the server is well-scoped for its purpose of handling cross-chain bridges and swaps. Each tool serves a specific role in the workflow, from setup (get_supported_chains, get_supported_tokens) to execution (execute_bridge, wallet) and monitoring (get_transaction_status, get_transaction_history), with no redundant or missing tools.
The toolset provides complete coverage for the domain of cross-chain transactions. It includes setup tools for chains and tokens, quote and fee estimation tools, execution and wallet management tools, and monitoring tools for status and history. There are no obvious gaps, and the tools support the full lifecycle from preparation to completion.
Related MCP Connectors
Non-custodial cross-chain swaps for AI agents: live route quotes and deposit swaps on 40+ chains.
51Zero-key, non-custodial cross-chain crypto swap aggregator for AI agents: 100+ chains, 15+ providers
Verified EVM, Aptos and finance tools for AI agents; gas for 14 chains. Pay per call (x402).
Warden MCP lets AI agents find tokens, quote swaps and trade onchain on Base, BNB Chain, Robinhood Chain, Arc and Solana, within limits you set. Market tools need no credential: list_chains, search_tokens, trending_tokens, price_history, quote_swap and swap_status. Search by name, ticker or contract address, read USD price candles, and price a swap before committing to it, including cross-chain swaps. Wallet tools act for the wallet whose owner connected the agent, by OAuth sign-in or a wk_ key. agent_permissions shows what the agent may do and its daily limits. prepare_swap builds a trade and hands the owner a review link to sign. With request_session the owner turns on hands-free trading in one tap, and execute_swap then trades within the limits they set. swap_status tracks gasless and cross-chain trades. get_wallet shows holdings on every chain. Gasless trading is available on Base, BNB Chain and Robinhood Chain. Built by Warden Protocol, the team behind Warden Token Terminal.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to perform cross-chain bridging operations using natural language intents, with support for multiple protocols (Across, Stargate) and advanced security features like oracle validation and slippage protection. Provides comprehensive bridging tools including quote estimation, transaction building, and approval management across Arbitrum and Ethereum networks.MIT
- AlicenseBqualityDmaintenanceEnables LLM assistants to interact with the Hyperlane cross-chain protocol for deploying blockchain infrastructure, sending cross-chain messages, managing validators and relayers, and facilitating asset transfers between multiple blockchains.67MIT
- AlicenseAqualityFmaintenanceEnables cross-chain bridging, multi-chain token swaps, and real-time pricing across over 50 blockchain networks using the Relay Protocol REST API. It allows users to browse thousands of tokens, generate quotes, and monitor transaction status directly through natural language.91MIT
- AlicenseAqualityCmaintenanceEnables AI agents to find LayerZero OFT bridge routes by token address and build ready-to-sign cross-chain transactions across 14 EVM networks.362 npm1MIT