Hosted MCP server · #150 most used on Smithery

LI.FI

li-fi/lifi-mcp

Cross-chain swaps, bridging, and DeFi yield discovery via the LI.FI aggregator. Provides MCP tools for quotes, routes, token and chain metadata, transaction status, ERC20 allowances, and yield vaults across 58 chains, 27+ bridges, and 31+ DEXes. Read-only — returns unsigned transaction requests for the agent's wallet to sign and broadcast. An optional LI.FI API key (Bearer or X-LiFi-Api-Key header) unlocks higher rate limits.

Uses
3.6k
Tools
25
Runs
Hosted
Listed
6mo ago

Get started

Add it to your agent

npx -y @smithery/cli@latest install li-fi/lifi-mcp --client claude

Swap --client claude for cursor, vscode, windsurf or another client. The CLI asks for any required settings.

What it can do

25 tools

get-allowance5 paramsCheck how many ERC20 tokens a spender is approved to use on behalf of an owner (EVM chains only). IMPORTANT: Before executing a swap with…

Check how many ERC20 tokens a spender is approved to use on behalf of an owner (EVM chains only). IMPORTANT: Before executing a swap with ERC20 tokens, verify the allowance is >= the swap amount. If insufficient, the user must approve tokens first. The spender address for LI.FI swaps is returned in the get-quote response.

ParameterTypeDescription
chainstringChain identifier - either numeric ID (e.g., '1' for Ethereum) or name (e.g., 'ethereum'). The RPC URL is looked up automatically.
rpcUrlstringOptional: Custom RPC endpoint URL. Overrides the default RPC for the chain.
ownerAddressstringWallet address that owns the tokens (the 'fromAddress' in swaps).
tokenAddressstringERC20 token contract address to check allowance for.
spenderAddressstringContract address that would spend the tokens. For LI.FI swaps, use the address from transactionRequest.to in the get-quote response.
get-chain-by-id1 paramLook up chain details by numeric chain ID. Returns chain name, native token info, RPC URLs, and block explorer. Use this to convert a cha…

Look up chain details by numeric chain ID. Returns chain name, native token info, RPC URLs, and block explorer. Use this to convert a chain ID to human-readable information or to get RPC URLs.

ParameterTypeDescription
idstringNumeric chain ID (e.g., '1' for Ethereum, '137' for Polygon, '42161' for Arbitrum, '10' for Optimism, '56' for BSC).
get-chain-by-name1 paramLook up chain details by name or key. Performs case-insensitive matching against chain name, key, or ID. Use this when you know the chain…

Look up chain details by name or key. Performs case-insensitive matching against chain name, key, or ID. Use this when you know the chain name but need its ID or RPC URL.

ParameterTypeDescription
namestringChain name (e.g., 'Ethereum', 'Polygon'), key (e.g., 'eth', 'pol'), or ID as string (e.g., '1').
get-chains1 paramGet a list of all blockchain networks supported by LI.FI. Returns chain IDs, names, native tokens, RPC URLs, and block explorer URLs. Use…

Get a list of all blockchain networks supported by LI.FI. Returns chain IDs, names, native tokens, RPC URLs, and block explorer URLs. Use this to discover available chains or get RPC URLs for blockchain interactions.

ParameterTypeDescription
chainTypesstringFilter by chain type: 'EVM' for Ethereum-compatible chains (Ethereum, Polygon, Arbitrum, etc.), 'SVM' for Solana. Comma-separated for multiple.
get-connections6 paramsDiscover which token pairs can be swapped between chains. Use this to check if a specific swap route exists before calling get-quote. Ret…

Discover which token pairs can be swapped between chains. Use this to check if a specific swap route exists before calling get-quote. Returns available bridges and their supported tokens for the specified route.

ParameterTypeDescription
toChainstringDestination chain ID. Omit to see connections to all chains.
toTokenstringDestination token address to filter for specific token pairs.
fromChainstringSource chain ID (e.g., '1' for Ethereum). Omit to see connections from all chains.
fromTokenstringSource token address to filter connections for a specific token.
chainTypesstringFilter by chain type: 'EVM', 'SVM', or comma-separated combination.
allowBridgesarrayFilter to show only specific bridges (e.g., ['stargate', 'hop']).
get-earn-chainsList blockchain networks that have indexed yield vaults in the Earn API. Returns chain IDs, names, and CAIP-2 identifiers. This is a SUBS…

List blockchain networks that have indexed yield vaults in the Earn API. Returns chain IDs, names, and CAIP-2 identifiers. This is a SUBSET of all LI.FI-supported chains (use get-chains for the full list) — only chains with active yield vaults are included. Use chain IDs from this response as the 'chainId' filter in get-earn-vaults.

get-earn-portfolio1 paramCheck a wallet's active yield positions (vault deposits, staking, lending) across all supported protocols and chains in a single call. Re…

Check a wallet's active yield positions (vault deposits, staking, lending) across all supported protocols and chains in a single call. Returns each position with protocol name, asset details, balance in native units and USD value, and chain. Use this when a user asks about their yield earnings, DeFi positions, or where they are earning interest. Note: this returns yield positions only — for token balances use get-token-balances instead.

ParameterTypeDescription
walletAddressstringWallet address to check yield positions for (0x... EVM format).
get-earn-protocolsList all yield protocols integrated with the Earn API. Returns protocol names in kebab-case format (e.g., 'morpho-v1', 'aave-v3', 'euler-…

List all yield protocols integrated with the Earn API. Returns protocol names in kebab-case format (e.g., 'morpho-v1', 'aave-v3', 'euler-v2', 'pendle', 'ethena-usde', 'maple') and their app URLs. Use these exact protocol name strings as the 'protocol' filter in get-earn-vaults to find vaults for a specific protocol.

get-earn-vault2 paramsGet full details for a specific yield vault by chain and contract address. Returns vault name, APY breakdown (base/reward/total), histori…

Get full details for a specific yield vault by chain and contract address. Returns vault name, APY breakdown (base/reward/total), historical APY (apy1d/apy7d/apy30d), TVL in USD, underlying tokens with addresses and decimals, protocol info, and deposit/redeem pack details. Use this after finding a vault via get-earn-vaults — pass the chainId and address fields from that response. To deposit into this vault, call get-quote with toChain=vault's chainId and toToken=vault's address.

ParameterTypeDescription
addressstringVault contract address (0x... format). From the vault's address field in get-earn-vaults response.
chainIdstringChain ID where the vault is deployed (e.g., '8453' for Base, '1' for Ethereum). From the vault's chainId field.
get-earn-vaults8 paramsSearch and discover yield-earning vaults (DeFi yield, APY, interest, staking, lending) across 20+ protocols and 17+ chains. This is the P…

Search and discover yield-earning vaults (DeFi yield, APY, interest, staking, lending) across 20+ protocols and 17+ chains. This is the PRIMARY tool for finding yield opportunities — use it when a user asks about earning yield, best APY, or DeFi deposits. Returns for each vault: name, APY breakdown (analytics.apy.total/base/reward as percentages), TVL (analytics.tvl.usd), underlying tokens, protocol, chain, and deposit support (isTransactional). Results are cursor-paginated via response 'nextCur

ParameterTypeDescription
tagsstringFilter by vault tags: 'stablecoin' (USD-pegged assets), 'single' (single-asset vaults).
assetstringFilter by underlying asset symbol (e.g., 'USDC', 'ETH', 'WBTC'). Matches the token deposited into the vault.
limitstringMaximum number of vaults to return per page (e.g., '10', '25'). Default varies.
cursorstringPagination cursor from a previous response's 'nextCursor' field to fetch the next page.
sortBystringSort metric: 'apy' (annual percentage yield) or 'tvl' (total value locked in USD).
chainIdstringFilter by chain ID (e.g., '8453' for Base, '1' for Ethereum, '42161' for Arbitrum). Use get-earn-chains to see all supported chains.
protocolstringFilter by protocol name in kebab-case (e.g., 'morpho-v1', 'aave-v3', 'euler-v2', 'pendle'). Use get-earn-protocols to list all available protocol names.
sortDirectionstringSort order: 'asc' (lowest first) or 'desc' (highest first). Defaults to 'desc'.
get-gas-pricesGet current gas prices for all supported EVM chains. Returns fast/standard/slow gas prices in gwei. Useful for estimating transaction cos…

Get current gas prices for all supported EVM chains. Returns fast/standard/slow gas prices in gwei. Useful for estimating transaction costs before executing swaps or for monitoring network congestion.

get-gas-suggestion1 paramGet recommended gas parameters for a specific chain including base fee, priority fee, and estimated costs. More detailed than get-gas-pri…

Get recommended gas parameters for a specific chain including base fee, priority fee, and estimated costs. More detailed than get-gas-prices for a single chain. Useful when constructing transactions manually.

ParameterTypeDescription
chainIdstringChain ID to get gas suggestions for (e.g., '1' for Ethereum, '137' for Polygon).
get-native-token-balance3 paramsCheck the native token balance of any wallet address. Supports EVM chains (ETH, MATIC, etc.) and Solana (SOL). Returns the balance in the…

Check the native token balance of any wallet address. Supports EVM chains (ETH, MATIC, etc.) and Solana (SOL). Returns the balance in the smallest unit (wei for EVM, lamports for Solana) along with the token symbol and decimals.

ParameterTypeDescription
chainstringChain identifier - either numeric ID (e.g., '1' for Ethereum, '137' for Polygon, '1151111081099710' for Solana) or name (e.g., 'ethereum', 'solana'). For Solana addresses, defaults to Solana mainnet i
rpcUrlstringOptional: Custom RPC endpoint URL. If provided, overrides the default RPC for the chain. Use this if you have your own RPC endpoint (e.g., Alchemy, Infura, Helius).
addressstringWallet address to check balance for. EVM: 0x-prefixed hex (42 chars). Solana: Base58-encoded address (32-44 chars).
get-quote12 paramsGet a quote for swapping, bridging, or depositing into yield vaults. This is the PRIMARY tool for any token operation. Returns the best r…

Get a quote for swapping, bridging, or depositing into yield vaults. This is the PRIMARY tool for any token operation. Returns the best route including expected output amount, fees, estimated time, and a transactionRequest object. For yield vault deposits: set toToken to the vault contract address from get-earn-vaults (the Composer routes the deposit automatically, even cross-chain). For vault withdrawals: set fromToken to the vault's share token address. For ERC20 tokens, you may need to approv

ParameterTypeDescription
orderstringRoute optimization preference: 'RECOMMENDED' (balanced), 'FASTEST' (minimize time), 'CHEAPEST' (minimize fees), 'SAFEST' (most reliable bridges).
toChainstringDestination chain ID. Use same as fromChain for same-chain swaps, different for cross-chain bridges.
toTokenstringDestination token address or vault address. For standard swaps: ERC20 contract address or '0x0000000000000000000000000000000000000000' for native tokens. For yield vault deposits: use the vault contra
slippagestringMaximum acceptable slippage as a decimal (e.g., '0.03' for 3%, '0.005' for 0.5%). Higher values increase success rate but may result in worse rates.
fromChainstringSource chain ID (e.g., '1' for Ethereum, '137' for Polygon, '42161' for Arbitrum, '10' for Optimism).
fromTokenstringSource token address. For EVM: use '0x0000000000000000000000000000000000000000' for native tokens (ETH, MATIC, etc.) or the ERC20 contract address. For Solana: use '11111111111111111111111111111111' f
toAddressstringRecipient's wallet address (EVM or Solana format). Defaults to fromAddress if not specified. Use for cross-chain bridges where source and destination chains differ.
fromAmountstringAmount to swap in the token's smallest unit. For EVM tokens use wei (e.g., '1000000000000000000' for 1 ETH). For Solana use lamports (e.g., '1000000000' for 1 SOL).
integratorstringYour integrator identifier for tracking and fee sharing. Contact LI.FI for an integrator ID.
fromAddressstringSender's wallet address. EVM: 0x-prefixed hex address. Solana: Base58-encoded address.
allowBridgesarrayWhitelist specific bridges (e.g., ['stargate', 'hop', 'across']). Use get-tools to see available bridges.
allowExchangesarrayWhitelist specific DEXes (e.g., ['uniswap', 'sushiswap', '1inch']). Use get-tools to see available exchanges.
get-quote-with-calls8 paramsGet a quote that includes custom smart contract calls on the destination chain, also known as 'Zaps' (EVM chains only). This enables comp…

Get a quote that includes custom smart contract calls on the destination chain, also known as 'Zaps' (EVM chains only). This enables complex DeFi operations in a single transaction: bridge tokens AND deposit into a vault, stake in a protocol, or interact with any contract. The contract calls execute atomically after the bridge completes.

ParameterTypeDescription
toChainstringDestination chain ID where contract calls will execute.
toTokenstringIntermediate token on destination chain (0x... format, before contract calls).
slippagestringMaximum slippage as decimal (e.g., '0.03' for 3%).
fromChainstringSource chain ID (e.g., '1' for Ethereum).
fromTokenstringSource token address to bridge (0x... format).
fromAmountstringAmount in smallest unit (wei).
fromAddressstringSender's wallet address (0x... format).
contractCallsarrayArray of contract calls to execute on destination. Each object needs: 'toContractAddress' (target contract), 'toContractCallData' (encoded function call), 'toContractGasLimit' (gas for this call).
get-routes10 paramsGet multiple route options for a swap to compare alternatives. Unlike get-quote which returns the single best route, this returns several…

Get multiple route options for a swap to compare alternatives. Unlike get-quote which returns the single best route, this returns several options ranked by the specified order preference. Useful when you want to show users multiple choices or when the best route fails. Use get-step-transaction to get executable transaction data for a chosen route.

ParameterTypeDescription
orderstringHow to rank routes: 'RECOMMENDED', 'FASTEST', 'CHEAPEST', or 'SAFEST'.
slippagestringMaximum slippage as decimal (e.g., '0.03' for 3%).
toAddressstringRecipient wallet address (EVM or Solana format). Defaults to fromAddress.
toChainIdstringDestination chain ID for cross-chain swaps, or same as fromChainId for same-chain.
fromAmountstringAmount in the token's smallest unit (wei for EVM, lamports for Solana). E.g., '1000000' for 1 USDC.
integratorstringYour integrator identifier for tracking and fee sharing. Contact LI.FI for an integrator ID.
fromAddressstringSender's wallet address (EVM 0x-prefixed or Solana Base58 format).
fromChainIdstringSource chain ID (e.g., '1' for Ethereum, '137' for Polygon).
toTokenAddressstringDestination token contract address on the target chain (EVM hex or Solana Base58 format).
fromTokenAddressstringSource token contract address. For EVM: use '0x0000000000000000000000000000000000000000' for native tokens. For Solana: use '11111111111111111111111111111111' for native SOL or the SPL token mint addr
get-status4 paramsCheck the status of an in-progress or completed cross-chain transfer. Use this to track bridge transactions which can take minutes to hou…

Check the status of an in-progress or completed cross-chain transfer. Use this to track bridge transactions which can take minutes to hours. Returns status (PENDING, DONE, FAILED), source/destination transaction hashes, and any error messages.

ParameterTypeDescription
bridgestringBridge name used for the transfer (e.g., 'stargate', 'hop'). Speeds up status lookup if known.
txHashstringThe transaction hash from the source chain.
toChainstringDestination chain ID. Required for some bridges to track the receiving transaction.
fromChainstringSource chain ID. Helps identify the correct transaction if txHash exists on multiple chains.
get-step-transaction1 paramConvert a route step from get-routes into executable transaction data. Use this when you've chosen a specific route from get-routes and n…

Convert a route step from get-routes into executable transaction data. Use this when you've chosen a specific route from get-routes and need the transaction to sign and send. Returns the same transactionRequest format as get-quote.

ParameterTypeDescription
stepobjectA step object from the get-routes response. Pass the entire step object including its 'action', 'estimate', and other properties.
get-token2 paramsGet detailed information about a specific token including its address, symbol, decimals, and current price. Use this to verify token deta…

Get detailed information about a specific token including its address, symbol, decimals, and current price. Use this to verify token details before a swap or to look up a token by its symbol.

ParameterTypeDescription
chainstringChain identifier - either numeric ID (e.g., '1' for Ethereum, '137' for Polygon) or name (e.g., 'ethereum', 'polygon').
tokenstringToken identifier - either contract address or symbol (e.g., 'USDC'). For EVM: use '0x0000000000000000000000000000000000000000' for native tokens. For Solana: use '11111111111111111111111111111111' for
get-token-balance4 paramsCheck the token balance of any wallet address. Supports EVM chains (ERC20 tokens) and Solana (SPL tokens). Returns the balance in the tok…

Check the token balance of any wallet address. Supports EVM chains (ERC20 tokens) and Solana (SPL tokens). Returns the balance in the token's smallest unit along with symbol and decimals. Use this before swaps to verify sufficient balance.

ParameterTypeDescription
chainstringChain identifier - either numeric ID (e.g., '1' for Ethereum, '1151111081099710' for Solana) or name (e.g., 'ethereum', 'solana'). For Solana addresses, defaults to Solana mainnet if omitted.
rpcUrlstringOptional: Custom RPC endpoint URL. Overrides the default RPC for the chain.
tokenAddressstringToken contract address. EVM: 0x-prefixed ERC20 address. Solana: Base58-encoded SPL token mint address.
walletAddressstringWallet address to check balance for. EVM: 0x-prefixed hex. Solana: Base58-encoded address.
get-token-balances4 paramsCheck multiple ERC20 token balances for a wallet in a single call using Multicall3. Much more efficient than calling get-token-balance re…

Check multiple ERC20 token balances for a wallet in a single call using Multicall3. Much more efficient than calling get-token-balance repeatedly. Also returns the native token balance. Use this to scan a wallet's portfolio across many tokens on one chain.

ParameterTypeDescription
chainstringChain identifier - numeric ID (e.g., '1') or name (e.g., 'ethereum').
rpcUrlstringOptional: Custom RPC endpoint URL.
walletAddressstringWallet address to check balances for (0x... format).
tokenAddressesarrayArray of ERC20 token contract addresses to check (e.g., ['0xA0b8...', '0x6B17...']).
get-tokens3 paramsRetrieve a list of all tokens supported by LI.FI across multiple chains. Use this to discover available tokens before executing swaps. Re…

Retrieve a list of all tokens supported by LI.FI across multiple chains. Use this to discover available tokens before executing swaps. Returns token addresses, symbols, decimals, and price information. Can filter by chain or minimum price to reduce response size.

ParameterTypeDescription
chainsstringComma-separated chain IDs to filter tokens (e.g., '1,137,42161' for Ethereum, Polygon, Arbitrum). Omit for all chains.
chainTypesstringFilter by chain type: 'EVM' for Ethereum-compatible chains, 'SVM' for Solana. Comma-separated for multiple (e.g., 'EVM,SVM').
minPriceUSDstringMinimum token price in USD to filter out low-value tokens (e.g., '0.01' for tokens worth at least 1 cent).
get-tools1 paramList all available bridges and DEX aggregators that LI.FI can route through. Use this to discover which protocols are available or to get…

List all available bridges and DEX aggregators that LI.FI can route through. Use this to discover which protocols are available or to get bridge/exchange names for filtering in get-quote. Returns key (identifier to use in API calls) and name (human-readable).

ParameterTypeDescription
chainsarrayFilter to show only tools available on specific chains (e.g., ['1', '137'] for Ethereum and Polygon).
health-checkCheck the health status of the LiFi MCP server. Returns server version and API connectivity status. Use this for health monitoring and or…

Check the health status of the LiFi MCP server. Returns server version and API connectivity status. Use this for health monitoring and orchestration.

test-api-keyTest if the LI.FI API key provided in the request header is valid. Returns key status and rate limit information. Requires API key to be …

Test if the LI.FI API key provided in the request header is valid. Returns key status and rate limit information. Requires API key to be passed via Authorization header (Bearer token) or X-LiFi-Api-Key header.