The Relay MCP Server enables AI agents to interact with the Relay Protocol for cross-chain token bridging and swapping. All tools are read-only — they return quotes, fees, steps, and status, but do not sign or broadcast transactions directly (execution requires wallet integration).
Discover Supported Networks — List blockchain networks supported by Relay, filterable by VM type (EVM, SVM), to resolve chain names to IDs.
Find Supported Tokens — Search for tokens across chains by name or symbol, with filtering by chain IDs and verified status.
Get Bridge Quotes — Obtain quotes for bridging the same token between chains (e.g., ETH on Ethereum → ETH on Base), including fees and time estimates.
Get Swap Quotes — Obtain quotes for swapping different tokens, optionally across chains (e.g., ETH on Ethereum → USDC on Base).
Estimate Fees — Get a detailed fee breakdown (gas, relayer fees, total cost) for a bridge or swap without committing to execution.
Execute Bridges/Swaps — Retrieve unsigned transaction steps (approvals + deposits) needed to complete a bridge or swap, for both ERC-20 and native token flows.
Wallet Integration via WalletConnect — Pair a user's wallet (MetaMask, Rainbow, etc.) via QR code, check connection status, execute multi-step transaction flows, and disconnect. Private keys never leave the user's device.
Check Transaction Status — Poll the status of an in-progress or completed transaction using a request ID (waiting, pending, success, failure, refund).
View Transaction History — Retrieve past bridge and swap transactions for a wallet address, with pagination support.
Generate Deep Links — Create pre-filled URLs to the Relay web app so users can initiate transactions directly in their browser.
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 "Install 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 ServerBridge 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 |
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 |
| — | Optional API key for higher rate limits |
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.