Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | Server port | 3000 |
| RELAY_API_KEY | No | Optional API key for higher rate limits | |
| RELAY_API_URL | No | Relay API base URL | https://api.relay.link |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_supported_chains | 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. |
| get_supported_tokens | 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. |
| get_bridge_quote | 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. |
| get_swap_quote | 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. |
| estimate_fees | 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. |
| execute_bridge | 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:
For native tokens (ETH), there is usually just ONE step:
Some routes may also include a "signature" step (EIP-712 signing instead of a transaction). Each step has a "kind" field:
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. |
| get_transaction_status | 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. |
| get_transaction_history | Get past Relay bridge and swap transactions for a wallet address. Returns transaction IDs, statuses, chains, and timestamps. Supports pagination via cursor. |
| get_relay_app_url | 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. |
| wallet | 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:
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 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |