LayerHop
v0.9.0Best-price cross-chain swap quotes across 70 chains, EVM and Solana.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_chains List supported chains
List every blockchain LayerHop can swap from or to: slug, numeric chain id, name, VM type (evm or svm = Solana) and native coin. Read-only.
list_tokens List tokens on a chain
List LayerHop's built-in tokens on one chain (symbol, contract address or mint, decimals). Symbols can be used directly in get_quote; other tokens can be quoted by address. Read-only.
| Parameter | Type | Description |
|---|---|---|
chain * | string | number | The chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains. |
get_quote Get swap/bridge quotes
Get the best price to swap or bridge tokens, within one chain or across chains (EVM <-> Solana). Asks every liquidity provider and returns the best quote plus alternatives with human-readable amounts, minimum received after slippage, fees (LayerHop fee, partner fee, provider fee, gas) and ETA. Returns a quoteId (valid until expiresAt) and a layerhop.com swapLink a human can open to review and sign. Read-only: The LayerHop MCP server holds no private keys and never signs or broadcasts transactions. Always show the user the fees and output and get confirmation before proceeding.
| Parameter | Type | Description |
|---|---|---|
amount * | string | number | Amount to send in HUMAN units of fromToken as a decimal string, e.g. "100" for 100 USDC or "0.05" for 0.05 ETH. NOT base units/wei/lamports. Must be greater than 0. |
fromChain * | string | number | Source chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains. |
fromToken * | string | Token to send (source) token: symbol from list_tokens ("USDC", "ETH", "SOL") or the token contract address / SPL mint. Use "native" for the chain's gas coin. |
sender * | string | Wallet address that sends the funds on the source chain (0x... for EVM, base58 for Solana). Only used to build the quote; no access is needed. |
toChain * | string | number | Destination chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains. |
toToken * | string | Token to receive (destination) token: symbol from list_tokens ("USDC", "ETH", "SOL") or the token contract address / SPL mint. Use "native" for the chain's gas coin. |
fromTokenDecimals | integer | Only needed when fromToken is an address that is not in list_tokens: the token's decimals (e.g. 6 for USDC, 18 for most ERC-20s). |
gasless | boolean | Optional gasless swap (same EVM chain, ERC-20 input, where the API enables it): the user signs EIP-712 typed data instead of a transaction and the network fee is taken from fromToken. This server cann… |
recipient | string | Address that receives funds on the destination chain. Defaults to sender when both chains use the same VM; REQUIRED for EVM <-> Solana. |
slippageBps | integer | Max slippage in basis points (1 bp = 0.01%). Default 50 (= 0.5%). |
toTokenDecimals | integer | Only needed when toToken is an address that is not in list_tokens: the token's decimals (e.g. 6 for USDC, 18 for most ERC-20s). |
build_transaction Build the unsigned transaction for a quote
Turn a quoteId from get_quote into the UNSIGNED transaction the user's own wallet must sign: EVM {chainId, to, data, value in wei, optional ERC-20 approval to send first} or Solana {serializedTx base64}. Includes plain-language signing steps. The LayerHop MCP server holds no private keys and never signs or broadcasts transactions. Only use this when the user has their own signer and explicitly wants raw transaction data, after they confirmed the quote; otherwise give them the swap link.
| Parameter | Type | Description |
|---|---|---|
quoteId * | string | quoteId from get_quote (starts with "q_"). Quotes expire after a short time (see expiresAt). |
simulate_transaction Dry-run a quote's transaction
Build the transaction for a quoteId and dry-run it on-chain (EVM eth_call + gas estimate from the sender; Solana simulateTransaction) without sending anything or recording an order. Reports whether it would succeed, gas / compute units, whether an ERC-20 approval is still needed, and the error if it would fail. Read-only: The LayerHop MCP server holds no private keys and never signs or broadcasts transactions.
| Parameter | Type | Description |
|---|---|---|
quoteId * | string | quoteId from get_quote (starts with "q_"). Quotes expire after a short time (see expiresAt). |
report_submitted Report a broadcast transaction
Tell LayerHop that the user's wallet broadcast the transaction for a quoteId, so the order is tracked (status, webhooks). Call this once after broadcasting, with the EVM tx hash (0x + 64 hex) or Solana signature. Idempotent. Does not sign or send anything.
| Parameter | Type | Description |
|---|---|---|
quoteId * | string | quoteId from get_quote (starts with "q_"). Quotes expire after a short time (see expiresAt). |
txHash * | string | Source-chain transaction hash (EVM 0x...) or Solana signature (base58). |
get_order_status Get swap/bridge order status
Check the status of a swap or bridge after the source transaction was sent: pending, filled (funds delivered), refunded, failed, or unknown (some same-chain providers; check the tx on an explorer). Read-only.
| Parameter | Type | Description |
|---|---|---|
provider * | string | The provider of the quote that was executed (the `provider` field from get_quote / build_transaction). |
txHash * | string | Source-chain transaction hash (EVM) or signature (Solana). |
list_orders List orders for a wallet
List LayerHop orders (swaps built or submitted through LayerHop) where the address is the sender or recipient, newest first, with status. Public data (addresses only). Read-only.
| Parameter | Type | Description |
|---|---|---|
address * | string | Wallet address (EVM 0x... or Solana base58). |
cursor | string | nextCursor from a previous list_orders call, for the next page. |
limit | integer | Max orders to return (default set by the API). |
status | string | Only orders with this status. |
get_swap_link Get a layerhop.com swap link
Create a https://layerhop.com/swap link prefilled with the swap, which the user opens to review the live quote and fees and sign in their own wallet. This is the default, safest way to execute a swap. The LayerHop MCP server holds no private keys and never signs or broadcasts transactions. The amount is in human units.
| Parameter | Type | Description |
|---|---|---|
fromChain * | string | number | Source chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains. |
fromToken * | string | Token to send (source) token: symbol from list_tokens ("USDC", "ETH", "SOL") or the token contract address / SPL mint. Use "native" for the chain's gas coin. |
toChain * | string | number | Destination chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains. |
toToken * | string | Token to receive (destination) token: symbol from list_tokens ("USDC", "ETH", "SOL") or the token contract address / SPL mint. Use "native" for the chain's gas coin. |
amount | string | number | Amount to send in HUMAN units of fromToken as a decimal string, e.g. "100" for 100 USDC or "0.05" for 0.05 ETH. NOT base units/wei/lamports. Must be greater than 0. |
recipient | string | Optional destination address to prefill (the user can still edit it). |
slippageBps | integer | Max slippage in basis points (1 bp = 0.01%). Default 50 (= 0.5%). |
lookup_token Look up a token by address
Get one token's symbol, name, decimals, USD price and verified flag from its contract address or SPL mint. The chain is optional: LayerHop finds it (Solana for a mint, else the EVM chain where the token has the most liquidity). verified false means it is on no curated list: confirm the address with the user before swapping. Read-only.
| Parameter | Type | Description |
|---|---|---|
address * | string | Token contract address (EVM 0x...) or SPL mint (Solana). |
chain | string | number | Optional: the token's chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains. |
get_token_risk Check a token for risks
Safety report for a token before the user buys or receives it: honeypot (can't sell), buy/sell/transfer taxes, owner powers (mint, blacklist, pause, freeze), unpublished code, few holders, and fake majors (a token calling itself USDC/ETH/SOL at the wrong address). level is ok, caution, danger or unknown (no source answered; never block a swap on unknown alone). On danger, warn the user and get explicit confirmation before get_quote. Read-only.
| Parameter | Type | Description |
|---|---|---|
chain * | string | number | The token's chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains. |
token * | string | The token to check: symbol or token: symbol from list_tokens ("USDC", "ETH", "SOL") or the token contract address / SPL mint. Use "native" for the chain's gas coin. |
list_limit_orders List limit orders
List limit orders (Solana: Jupiter Trigger; EVM: CoW Protocol) of a wallet, or of the API key's account without a wallet: what is sold, the minimum received, status (built, open, filled, cancelled, expired, failed) and fills. Read-only.
| Parameter | Type | Description |
|---|---|---|
cursor | string | nextCursor from a previous call, for the next page. |
limit | integer | Max orders to return. |
status | string | Only orders with this status. |
wallet | string | Wallet (Solana base58 or EVM 0x) whose limit orders to list. Without it: the API key's account (needs a key). |
get_limit_order Get a limit order
Get one limit order with its fills (each fill is an order whose quoteId starts with lof_). Read-only.
| Parameter | Type | Description |
|---|---|---|
id * | string | Limit order id (starts with "lo_"). |
create_limit_order Create a limit order (unsigned)
Build a limit order: sell sellAmount of sellToken once the market gives at least minReceive of buyToken. Solana (default, Jupiter Trigger): returns an UNSIGNED transaction; LayerHop's fee applies when buyToken is SOL, USDC or USDT. EVM chains with CoW Protocol (Ethereum, Arbitrum, Base, BNB Chain, Polygon, Avalanche, Gnosis, Linea, Plasma, Ink): returns EIP-712 typed data plus the token approval it needs; sellToken must be an ERC-20. Then the maker's own wallet signs and you call submit_limit_order. Worth at least $5. The LayerHop MCP server holds no private keys and never signs or broadcasts…
| Parameter | Type | Description |
|---|---|---|
buyToken * | string | Token to buy token: symbol from list_tokens ("USDC", "ETH", "SOL") or the token contract address / SPL mint. Use "native" for the chain's gas coin. |
minReceive * | string | number | Minimum HUMAN units of buyToken for the whole sellAmount (the limit price is minReceive / sellAmount), e.g. "0.5" for 0.5 SOL. |
sellAmount * | string | number | HUMAN units of sellToken to sell, e.g. "50" for 50 USDC. |
sellToken * | string | Token to sell token: symbol from list_tokens ("USDC", "ETH", "SOL") or the token contract address / SPL mint. Use "native" for the chain's gas coin. |
wallet * | string | The maker's wallet (Solana base58 or EVM 0x): signs the order and receives buyToken. |
chain | string | number | Chain of the order (default solana) chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains. |
expiresInMinutes | integer | Cancel automatically after this many minutes. Solana: omit for good-till-cancelled. EVM: default 90 days. |
submit_limit_order Submit a signed limit order or cancellation
Send a limit order's create or cancel step AFTER the maker's own wallet signed it (from create_limit_order or cancel_limit_order): the signed Solana transaction, or the EIP-712 signature of an EVM order. This only relays what the wallet signed; The LayerHop MCP server holds no private keys and never signs or broadcasts transactions.
| Parameter | Type | Description |
|---|---|---|
id * | string | Limit order id (starts with "lo_"). |
signature | string | EVM: the wallet's eth_signTypedData_v4 signature of typedData. |
signedTransaction | string | Solana: the wallet-signed transaction, base64. |
cancel_limit_order Cancel a limit order (unsigned)
Cancel an open limit order: returns the UNSIGNED cancel transaction (Solana) or the cancellation typed data (EVM, no gas) for the maker's wallet to sign, then submit_limit_order. An order that was never submitted is cancelled at once (nothing to sign). Confirm with the user first. The LayerHop MCP server holds no private keys and never signs or broadcasts transactions.
| Parameter | Type | Description |
|---|---|---|
id * | string | Limit order id (starts with "lo_"). |
create_deposit_address Create a deposit address
Create an address the user sends tokens to; every deposit is swapped/bridged and delivered as toToken on toChain to recipient. No wallet connection or signing needed. Non-custodial: the address belongs to the liquidity provider (Relay), LayerHop never holds funds. Tell the user: send ONLY srcToken on srcChain to the address (other tokens or chains may be lost for good), at least $1 worth; refundTo must be the user's own address on srcChain, never an exchange (CEX) deposit address. Needs a LayerHop API key; test keys (lh_test_) give a fake sandbox address that must never receive real funds. The…
| Parameter | Type | Description |
|---|---|---|
fromChain * | string | number | Source (deposit) chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains. |
fromToken * | string | The ONLY token the user may send to the address (source) token: symbol from list_tokens ("USDC", "ETH", "SOL") or the token contract address / SPL mint. Use "native" for the chain's gas coin. |
recipient * | string | Address that receives toToken on toChain. |
refundTo * | string | The user's OWN address on fromChain for refunds. NEVER an exchange (CEX) deposit address: refunds never go back to an exchange. |
toChain * | string | number | Destination chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains. |
toToken * | string | Token to deliver (destination) token: symbol from list_tokens ("USDC", "ETH", "SOL") or the token contract address / SPL mint. Use "native" for the chain's gas coin. |
amount | string | number | HUMAN units of fromToken ("25" = 25 USDC). Required when reusable is false (the exact amount to send); otherwise only sizes the estimate. Minimum worth $1. |
fromTokenDecimals | integer | Only needed when fromToken is an address that is not in list_tokens: the token's decimals (e.g. 6 for USDC, 18 for most ERC-20s). |
label | string | Your reference for this address (1-64 chars), filterable in list_deposit_addresses. |
metadata | object | Up to 20 string key-value pairs stored on the address. |
reusable | boolean | true (default): reusable for this route with any amount. false: one-time address for exactly `amount`. |
list_deposit_addresses List deposit addresses
List the deposit addresses of the API key's account and mode (live or test), newest first: address, route, status, deposit count. Needs a LayerHop API key. Read-only.
| Parameter | Type | Description |
|---|---|---|
cursor | string | nextCursor from a previous call, for the next page. |
label | string | Only addresses with this label. |
limit | integer | Max addresses to return (default set by the API). |
status | string | Only addresses with this status. |
get_deposit_address Get a deposit address and its deposits
Get one deposit address with its 20 most recent deposits (orders, quoteId starting with dep_): amount deposited and delivered, status (submitted, pending, filled, refunded, failed) and tx hashes. Tell the user: send ONLY srcToken on srcChain to the address (other tokens or chains may be lost for good), at least $1 worth; refundTo must be the user's own address on srcChain, never an exchange (CEX) deposit address. Needs a LayerHop API key; test keys (lh_test_) give a fake sandbox address that must never receive real funds. Read-only.
| Parameter | Type | Description |
|---|---|---|
id * | string | Deposit address id (starts with "da_"). |
refresh_deposit_address Check a deposit address for deposits now
Ask LayerHop to check a deposit address for new deposits right away (instead of waiting for the next scheduled check). Call it when the user says they sent funds, then call get_deposit_address after ~15-30 s. Needs a LayerHop API key.
| Parameter | Type | Description |
|---|---|---|
id * | string | Deposit address id (starts with "da_"). |
disable_deposit_address Disable a deposit address
Disable a deposit address: LayerHop stops tracking it (no more orders or webhooks for it). The provider may still process funds sent to it later, so the user must stop using it. Cannot be undone. Confirm with the user first. Needs a LayerHop API key.
| Parameter | Type | Description |
|---|---|---|
id * | string | Deposit address id (starts with "da_"). |
simulate_deposit Simulate a deposit (test mode only)
TEST MODE ONLY (lh_test_ key and a test deposit address): record a fake deposit so the integration can be tested end to end; it becomes a test order that settles with webhooks. The amount decides the outcome: base units ending in 4001 -> refunded, 4002 -> failed, anything else -> filled. Moves no real funds. Fails with a live key.
| Parameter | Type | Description |
|---|---|---|
id * | string | Deposit address id (starts with "da_"). |
amount | string | number | Deposit amount in HUMAN units of the address token ("25" = 25 USDC). Give this or amountBaseUnits. |
amountBaseUnits | string | Deposit amount in base units (e.g. "25004001" to test a refund for a 6-decimal token). Give this or amount. |