Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoServer port3000
RELAY_API_KEYNoOptional API key for higher rate limits
RELAY_API_URLNoRelay API base URLhttps://api.relay.link

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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:

  1. approve — An ERC-20 approval transaction allowing Relay to spend the token.

  2. deposit — The actual bridge/swap transaction.

For native tokens (ETH), there is usually just ONE step:

  1. 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.

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:

  1. Render the returned URI as a QR code using the bash command below.

  2. 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

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pedromcunha/relay-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server