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 claudeSwap --client claude for cursor, vscode, windsurf or another client. The CLI asks for any required settings.
claude mcp add --transport http li-fi https://server.smithery.ai/li-fi/lifi-mcp/mcpA hosted server: nothing to install. Run /mcp in Claude Code to sign in if it asks.
[mcp_servers.li-fi]
url = "https://server.smithery.ai/li-fi/lifi-mcp/mcp"Add to ~/.codex/config.toml.
{
"mcpServers": {
"li-fi": {
"url": "https://server.smithery.ai/li-fi/lifi-mcp/mcp"
}
}
}Add to ~/.cursor/mcp.json.
{
"servers": {
"li-fi": {
"type": "http",
"url": "https://server.smithery.ai/li-fi/lifi-mcp/mcp"
}
}
}Add to .vscode/mcp.json.
gemini mcp add --transport http li-fi https://server.smithery.ai/li-fi/lifi-mcp/mcpSaved to .gemini/settings.json.
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.
| Parameter | Type | Description |
|---|---|---|
chain | string | Chain identifier - either numeric ID (e.g., '1' for Ethereum) or name (e.g., 'ethereum'). The RPC URL is looked up automatically. |
rpcUrl | string | Optional: Custom RPC endpoint URL. Overrides the default RPC for the chain. |
ownerAddress | string | Wallet address that owns the tokens (the 'fromAddress' in swaps). |
tokenAddress | string | ERC20 token contract address to check allowance for. |
spenderAddress | string | Contract 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.
| Parameter | Type | Description |
|---|---|---|
id | string | Numeric 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.
| Parameter | Type | Description |
|---|---|---|
name | string | Chain 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.
| Parameter | Type | Description |
|---|---|---|
chainTypes | string | Filter 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.
| Parameter | Type | Description |
|---|---|---|
toChain | string | Destination chain ID. Omit to see connections to all chains. |
toToken | string | Destination token address to filter for specific token pairs. |
fromChain | string | Source chain ID (e.g., '1' for Ethereum). Omit to see connections from all chains. |
fromToken | string | Source token address to filter connections for a specific token. |
chainTypes | string | Filter by chain type: 'EVM', 'SVM', or comma-separated combination. |
allowBridges | array | Filter 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.
| Parameter | Type | Description |
|---|---|---|
walletAddress | string | Wallet 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.
| Parameter | Type | Description |
|---|---|---|
address | string | Vault contract address (0x... format). From the vault's address field in get-earn-vaults response. |
chainId | string | Chain 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
| Parameter | Type | Description |
|---|---|---|
tags | string | Filter by vault tags: 'stablecoin' (USD-pegged assets), 'single' (single-asset vaults). |
asset | string | Filter by underlying asset symbol (e.g., 'USDC', 'ETH', 'WBTC'). Matches the token deposited into the vault. |
limit | string | Maximum number of vaults to return per page (e.g., '10', '25'). Default varies. |
cursor | string | Pagination cursor from a previous response's 'nextCursor' field to fetch the next page. |
sortBy | string | Sort metric: 'apy' (annual percentage yield) or 'tvl' (total value locked in USD). |
chainId | string | Filter by chain ID (e.g., '8453' for Base, '1' for Ethereum, '42161' for Arbitrum). Use get-earn-chains to see all supported chains. |
protocol | string | Filter 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. |
sortDirection | string | Sort 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.
| Parameter | Type | Description |
|---|---|---|
chainId | string | Chain 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.
| Parameter | Type | Description |
|---|---|---|
chain | string | Chain 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 |
rpcUrl | string | Optional: 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). |
address | string | Wallet 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
| Parameter | Type | Description |
|---|---|---|
order | string | Route optimization preference: 'RECOMMENDED' (balanced), 'FASTEST' (minimize time), 'CHEAPEST' (minimize fees), 'SAFEST' (most reliable bridges). |
toChain | string | Destination chain ID. Use same as fromChain for same-chain swaps, different for cross-chain bridges. |
toToken | string | Destination token address or vault address. For standard swaps: ERC20 contract address or '0x0000000000000000000000000000000000000000' for native tokens. For yield vault deposits: use the vault contra |
slippage | string | Maximum 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. |
fromChain | string | Source chain ID (e.g., '1' for Ethereum, '137' for Polygon, '42161' for Arbitrum, '10' for Optimism). |
fromToken | string | Source token address. For EVM: use '0x0000000000000000000000000000000000000000' for native tokens (ETH, MATIC, etc.) or the ERC20 contract address. For Solana: use '11111111111111111111111111111111' f |
toAddress | string | Recipient's wallet address (EVM or Solana format). Defaults to fromAddress if not specified. Use for cross-chain bridges where source and destination chains differ. |
fromAmount | string | Amount 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). |
integrator | string | Your integrator identifier for tracking and fee sharing. Contact LI.FI for an integrator ID. |
fromAddress | string | Sender's wallet address. EVM: 0x-prefixed hex address. Solana: Base58-encoded address. |
allowBridges | array | Whitelist specific bridges (e.g., ['stargate', 'hop', 'across']). Use get-tools to see available bridges. |
allowExchanges | array | Whitelist 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.
| Parameter | Type | Description |
|---|---|---|
toChain | string | Destination chain ID where contract calls will execute. |
toToken | string | Intermediate token on destination chain (0x... format, before contract calls). |
slippage | string | Maximum slippage as decimal (e.g., '0.03' for 3%). |
fromChain | string | Source chain ID (e.g., '1' for Ethereum). |
fromToken | string | Source token address to bridge (0x... format). |
fromAmount | string | Amount in smallest unit (wei). |
fromAddress | string | Sender's wallet address (0x... format). |
contractCalls | array | Array 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.
| Parameter | Type | Description |
|---|---|---|
order | string | How to rank routes: 'RECOMMENDED', 'FASTEST', 'CHEAPEST', or 'SAFEST'. |
slippage | string | Maximum slippage as decimal (e.g., '0.03' for 3%). |
toAddress | string | Recipient wallet address (EVM or Solana format). Defaults to fromAddress. |
toChainId | string | Destination chain ID for cross-chain swaps, or same as fromChainId for same-chain. |
fromAmount | string | Amount in the token's smallest unit (wei for EVM, lamports for Solana). E.g., '1000000' for 1 USDC. |
integrator | string | Your integrator identifier for tracking and fee sharing. Contact LI.FI for an integrator ID. |
fromAddress | string | Sender's wallet address (EVM 0x-prefixed or Solana Base58 format). |
fromChainId | string | Source chain ID (e.g., '1' for Ethereum, '137' for Polygon). |
toTokenAddress | string | Destination token contract address on the target chain (EVM hex or Solana Base58 format). |
fromTokenAddress | string | Source 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.
| Parameter | Type | Description |
|---|---|---|
bridge | string | Bridge name used for the transfer (e.g., 'stargate', 'hop'). Speeds up status lookup if known. |
txHash | string | The transaction hash from the source chain. |
toChain | string | Destination chain ID. Required for some bridges to track the receiving transaction. |
fromChain | string | Source 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.
| Parameter | Type | Description |
|---|---|---|
step | object | A 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.
| Parameter | Type | Description |
|---|---|---|
chain | string | Chain identifier - either numeric ID (e.g., '1' for Ethereum, '137' for Polygon) or name (e.g., 'ethereum', 'polygon'). |
token | string | Token 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.
| Parameter | Type | Description |
|---|---|---|
chain | string | Chain 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. |
rpcUrl | string | Optional: Custom RPC endpoint URL. Overrides the default RPC for the chain. |
tokenAddress | string | Token contract address. EVM: 0x-prefixed ERC20 address. Solana: Base58-encoded SPL token mint address. |
walletAddress | string | Wallet 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.
| Parameter | Type | Description |
|---|---|---|
chain | string | Chain identifier - numeric ID (e.g., '1') or name (e.g., 'ethereum'). |
rpcUrl | string | Optional: Custom RPC endpoint URL. |
walletAddress | string | Wallet address to check balances for (0x... format). |
tokenAddresses | array | Array 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.
| Parameter | Type | Description |
|---|---|---|
chains | string | Comma-separated chain IDs to filter tokens (e.g., '1,137,42161' for Ethereum, Polygon, Arbitrum). Omit for all chains. |
chainTypes | string | Filter by chain type: 'EVM' for Ethereum-compatible chains, 'SVM' for Solana. Comma-separated for multiple (e.g., 'EVM,SVM'). |
minPriceUSD | string | Minimum 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).
| Parameter | Type | Description |
|---|---|---|
chains | array | Filter 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.