LI.FI
Cross-chain swaps, bridging, and DeFi yield discovery via the LI.FI aggregator.
What it can do
- Get Allowance: 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 sw
- Get Chain By Id: 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
- Get Chain By Name: 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.
What data it sees
Do you need an account
No: the server works without sign-in
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.
How to connect
How to connect LI.FI to Claude
The server address to paste into Claude settings:
https://lifi-mcp--li-fi.run.tools
- Open Claude (claude.ai or the desktop app).
- Go to Settings → Connectors.
- Click Add custom connector.
- Paste the server address copied below into Remote MCP server URL and click Add.
- In a chat, click + → Connectors and switch the new connector on.
Custom connectors are available on Free, Pro, Max, Team and Enterprise plans (Free is limited to one). On Team and Enterprise an organization Owner adds the connector first under Organization settings → Connectors.
Authorization
After you click Add, a sign-in window for the service opens. Sign in with your own account and approve access. Claude never sees your password.
How to connect LI.FI to ChatGPT
The server address to paste into ChatGPT settings:
https://lifi-mcp--li-fi.run.tools
- Open ChatGPT in a browser (chatgpt.com). A Plus, Pro, Business, Enterprise or Edu plan is required.
- Turn on developer mode once: Settings → Apps → Advanced settings → Developer mode.
- Open Settings → Connectors and click Create.
- Fill in the form: Name (anything), Description (one line about what the service does), MCP server URL (copy it below).
- Under Authentication choose OAuth if the service requires sign-in, otherwise None. Click Create.
- In a new chat open + → Apps/Connectors and enable the connector.
OpenAI has renamed this section before (Connectors → Apps/Plugins). If the label differs, search settings for "developer mode". On Business/Enterprise workspaces an admin must allow custom connectors first.
Authorization
On first use ChatGPT opens the service's sign-in window. Sign in and approve access.
How to connect LI.FI to Cursor
The server address to paste into Cursor settings:
https://lifi-mcp--li-fi.run.tools
Fastest: click Open in Cursor below and confirm the prompt.
Manually:
- In Cursor open Settings → Cursor Settings → MCP and click Add new global MCP server.
- Paste the JSON copied below into
~/.cursor/mcp.json(per project:.cursor/mcp.jsonin the repo root). - Save the file. The server appears in the MCP list; authorize it there if asked.
Authorization
If the service needs sign-in, an authorize button appears next to the server in the MCP list.
Server tool list (25)
Raw names from tools/list. Only developers need these.
| get-allowance | 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. |
| get-chain-by-id | 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. |
| get-chain-by-name | 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. |
| get-chains | 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. |
| get-connections | 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. |
| get-earn-chains | 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-portfolio | 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. |
| get-earn-protocols | 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-vault | 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. |
| get-earn-vaults | 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 'nextCursor'. Workflow: discover vaults here → get-earn-vault for full details → get-quote with the vault's address as toToken and vault's chainId as toChain to generate a deposit transaction. |
| get-gas-prices | 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-suggestion | 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. |
| get-native-token-balance | 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. |
| get-quote | 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 approve tokens first if allowance is insufficient. |
| get-quote-with-calls | 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. |
| get-routes | 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. |
| get-status | 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. |
| get-step-transaction | 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. |
| get-token | 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. |
| get-token-balance | 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. |
| get-token-balances | 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. |
| get-tokens | 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. |
| get-tools | 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). |
| health-check | 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-key | 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. |