Skip to main content
The LI.FI MCP Server exposes the following tools, organized by category. Each tool maps to a corresponding LI.FI API endpoint.

Token Information

get-tokens

Retrieve all tokens supported by LI.FI. Use this to discover available tokens before requesting swaps.

get-token

Get details about a specific token including price, decimals, and contract address.

Chain Information

get-chains

List all supported blockchain networks. Returns chain IDs, names, RPC URLs, and block explorer links.

get-chain-by-id

Look up a chain by its numeric ID.

get-chain-by-name

Look up a chain by name (case-insensitive).

Quote & Swap

These are the primary tools for executing cross-chain transfers.

get-quote

Get the best route for a swap. This is the primary tool for most use cases. It returns the optimal route, fees, estimated time, and a transactionRequest object ready for signing.
The response includes a transactionRequest object with to, data, value, gasLimit, and chainId fields, ready to sign and broadcast with any wallet.

get-routes

Get multiple route options for comparison. Unlike get-quote, this returns several alternatives to choose from. Use with get-step-transaction to execute a specific route.

get-step-transaction

Convert a route step into an executable transaction.

get-status

Track the progress of a cross-chain transfer.

get-quote-with-calls

Get a quote with custom contract calls (Zaps). Execute complex DeFi operations like bridge + deposit/stake in a single transaction.

Discovery & Routing

get-connections

Check available swap routes between chains. Use this to verify if a route exists before calling get-quote.

get-tools

List available bridges and DEXes. Returns both key values (for use in API calls) and name values (human-readable).
Use the key values returned by get-tools in get-quote with the allowBridges or allowExchanges parameters to filter routes to specific providers.

Gas Information

get-gas-prices

Get current gas prices for all supported chains. Returns fast, standard, and slow prices in gwei. No parameters required.

get-gas-suggestion

Get detailed gas parameters for a specific chain, including recommended gas amount in USD.

Balance & Allowance Queries

get-native-token-balance

Check the native token balance (ETH, MATIC, etc.) for a wallet address.

get-token-balance

Check an ERC20 token balance for a wallet address.

get-allowance

Check token spending approval. Verify allowance before swaps. If insufficient, the user must approve tokens using their wallet before executing the transaction.
Always check allowance before executing ERC20 swaps. If the allowance is less than the swap amount, the transaction will fail. Native token transfers (ETH, MATIC, etc.) do not require approval.

API Key & Health

test-api-key

Verify that your API key is valid. Returns key status and rate limit information.
The API key must be provided via the Authorization: Bearer or X-LiFi-Api-Key header in your MCP client configuration.

health-check

Check server health and version. Returns server status and version information. No parameters required.

Common Token Addresses

Use get-token with the symbol (e.g., "USDC") to dynamically fetch the correct address for any chain instead of hardcoding addresses.