Skip to main content
Glama
warengonzaga

Relay Protocol MCP Server

by warengonzaga

relay_swap_multi_input

Execute cross-chain token swaps from multiple blockchain networks to a single destination, supporting both exact input and exact output trade types.

Instructions

Execute multi-chain token swaps. IMPORTANT: For EXACT_INPUT, do NOT include "amount" at root level - only in origins array. For EXACT_OUTPUT, include "amount" at root level. Always use TOKEN CONTRACT ADDRESSES. Examples:

EXACT_INPUT (Bridge 1 USDC from Ethereum to Optimism): {"user": "0x123...", "origins": [{"chainId": 1, "currency": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "amount": "1000000"}], "destinationChainId": 10, "destinationCurrency": "0x0b2c639c533813f4aa9d7837caf62653d097ff85", "tradeType": "EXACT_INPUT"}

EXACT_OUTPUT (Get exactly 100 USDC on Base): {"user": "0x123...", "amount": "100000000", "origins": [{"chainId": 1, "currency": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "amount": "50000000"}], "destinationChainId": 8453, "destinationCurrency": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "tradeType": "EXACT_OUTPUT"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userYesUser wallet address that will make deposits and receive tokens
originsYesArray of origin tokens to swap from multiple chains
destinationCurrencyYesDestination token contract address (e.g., "0x0b2c639c533813f4aa9d7837caf62653d097ff85" for USDC on Optimism)
destinationChainIdYesDestination chain ID (e.g., 10 for Optimism, 8453 for Base, 42161 for Arbitrum)
tradeTypeYesEXACT_INPUT: Use exact amounts from origins. EXACT_OUTPUT: Get exact amount at destination (requires "amount" field)
recipientNoOptional: recipient address (defaults to user address)
refundToNoOptional: refund address in case of failure
amountNoONLY for EXACT_OUTPUT: exact amount to receive at destination (in smallest unit)
txsNoOptional: additional transactions to execute
txsGasLimitNoGas limit for additional transactions
partialNoAllow partial fills if full amount not available
referrerNoReferrer address for fee sharing
gasLimitForDepositSpecifiedTxsNoGas limit for deposit-specified transactions

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/warengonzaga/relay-protocol-mcp-server'

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