Skip to main content
The LI.FI MCP Server integrates with the LI.FI API to provide cross-chain swap functionality across multiple liquidity pools and bridges via the Model Context Protocol (MCP). MCP is a standard protocol for AI model integration, allowing AI tools like Claude, Cursor, Windsurf, and VS Code Copilot to access external tools and data sources directly.
This server provides read-only tools. It does not sign or broadcast transactions. Quote responses include unsigned transactionRequest objects that must be signed and submitted externally using your own wallet.

Quickstart

Add the hosted LI.FI MCP server to your AI tool. No installation required:
{
  "mcpServers": {
    "lifi": {
      "type": "http",
      "url": "https://mcp.li.quest/mcp"
    }
  }
}
Paste this into your MCP client config and start querying cross-chain swap data. See Installation for tool-specific setup instructions. For higher rate limits, add your LI.FI API key via the X-LiFi-Api-Key header or Authorization: Bearer header.

How It Works

The MCP server wraps the LI.FI REST API into MCP-compatible tools that AI agents can call directly. Instead of constructing HTTP requests, your AI tool discovers and invokes structured tools like get-quote, get-chains, and get-token.
AI Tool (Claude, Cursor, etc.)


MCP Protocol


LI.FI MCP Server (https://mcp.li.quest/mcp)


LI.FI API (https://li.quest)


27+ Bridges & 31+ DEXes across 58 chains

Example Workflow

A typical cross-chain swap via the MCP server follows this flow:
1. get-chains                    # Find chain IDs and RPC URLs
2. get-token (chain, symbol)     # Get token addresses
3. get-quote (...)               # Get best route and transactionRequest
4. get-allowance (...)           # Check if token approval is needed
5. (external) Approve tokens using your wallet if allowance < amount
6. (external) Sign and broadcast transactionRequest using your wallet
7. get-status (txHash)           # Track cross-chain progress

API Key Configuration

Without an API key, the server uses the public rate limit (200 requests / 2 hours). With an API key, you get higher rate limits (200 requests / minute). Pass your API key via HTTP headers in your MCP client config:
  • Authorization: Bearer your_api_key
  • X-LiFi-Api-Key: your_api_key
Use the test-api-key MCP tool to verify your key is valid and check rate limit information.

Get an API Key

Sign up at li.fi to get your API key

Common Chain IDs

ChainIDNative Token
Ethereum1ETH
Polygon137MATIC
Arbitrum42161ETH
Optimism10ETH
BSC56BNB
Avalanche43114AVAX
Base8453ETH
Solana1151111081099710SOL
Use get-chains or get-chain-by-name to dynamically look up chain IDs instead of hardcoding them.

Next Steps