LayerHop

v0.9.0
com.layerhop/mcp Checked 1 day ago Published 11 days ago

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

ParameterTypeDescription
chain *string | numberThe 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.

ParameterTypeDescription
amount *string | numberAmount 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 | numberSource chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains.
fromToken *stringToken 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 *stringWallet 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 | numberDestination chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains.
toToken *stringToken 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.
fromTokenDecimalsintegerOnly 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).
gaslessbooleanOptional 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…
recipientstringAddress that receives funds on the destination chain. Defaults to sender when both chains use the same VM; REQUIRED for EVM <-> Solana.
slippageBpsintegerMax slippage in basis points (1 bp = 0.01%). Default 50 (= 0.5%).
toTokenDecimalsintegerOnly 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.

ParameterTypeDescription
quoteId *stringquoteId 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.

ParameterTypeDescription
quoteId *stringquoteId 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.

ParameterTypeDescription
quoteId *stringquoteId from get_quote (starts with "q_"). Quotes expire after a short time (see expiresAt).
txHash *stringSource-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.

ParameterTypeDescription
provider *stringThe provider of the quote that was executed (the `provider` field from get_quote / build_transaction).
txHash *stringSource-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.

ParameterTypeDescription
address *stringWallet address (EVM 0x... or Solana base58).
cursorstringnextCursor from a previous list_orders call, for the next page.
limitintegerMax orders to return (default set by the API).
statusstringOnly orders with this status.

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.

ParameterTypeDescription
address *stringToken contract address (EVM 0x...) or SPL mint (Solana).
chainstring | numberOptional: 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.

ParameterTypeDescription
chain *string | numberThe token's chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains.
token *stringThe 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.

ParameterTypeDescription
cursorstringnextCursor from a previous call, for the next page.
limitintegerMax orders to return.
statusstringOnly orders with this status.
walletstringWallet (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.

ParameterTypeDescription
id *stringLimit 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…

ParameterTypeDescription
buyToken *stringToken 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 | numberMinimum HUMAN units of buyToken for the whole sellAmount (the limit price is minReceive / sellAmount), e.g. "0.5" for 0.5 SOL.
sellAmount *string | numberHUMAN units of sellToken to sell, e.g. "50" for 50 USDC.
sellToken *stringToken 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 *stringThe maker's wallet (Solana base58 or EVM 0x): signs the order and receives buyToken.
chainstring | numberChain of the order (default solana) chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains.
expiresInMinutesintegerCancel 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.

ParameterTypeDescription
id *stringLimit order id (starts with "lo_").
signaturestringEVM: the wallet's eth_signTypedData_v4 signature of typedData.
signedTransactionstringSolana: 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.

ParameterTypeDescription
id *stringLimit 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…

ParameterTypeDescription
fromChain *string | numberSource (deposit) chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains.
fromToken *stringThe 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 *stringAddress that receives toToken on toChain.
refundTo *stringThe user's OWN address on fromChain for refunds. NEVER an exchange (CEX) deposit address: refunds never go back to an exchange.
toChain *string | numberDestination chain: slug ("base", "solana", "ethereum", "arbitrum"...) or numeric chain id (Solana is 7565164). See list_chains.
toToken *stringToken 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.
amountstring | numberHUMAN units of fromToken ("25" = 25 USDC). Required when reusable is false (the exact amount to send); otherwise only sizes the estimate. Minimum worth $1.
fromTokenDecimalsintegerOnly 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).
labelstringYour reference for this address (1-64 chars), filterable in list_deposit_addresses.
metadataobjectUp to 20 string key-value pairs stored on the address.
reusablebooleantrue (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.

ParameterTypeDescription
cursorstringnextCursor from a previous call, for the next page.
labelstringOnly addresses with this label.
limitintegerMax addresses to return (default set by the API).
statusstringOnly 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.

ParameterTypeDescription
id *stringDeposit 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.

ParameterTypeDescription
id *stringDeposit 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.

ParameterTypeDescription
id *stringDeposit 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.

ParameterTypeDescription
id *stringDeposit address id (starts with "da_").
amountstring | numberDeposit amount in HUMAN units of the address token ("25" = 25 USDC). Give this or amountBaseUnits.
amountBaseUnitsstringDeposit amount in base units (e.g. "25004001" to test a refund for a 6-decimal token). Give this or amount.