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.Documentation Index
Fetch the complete documentation index at: https://docs.li.fi/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Add the hosted LI.FI MCP server to your AI tool. No installation required: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 likeget-quote, get-chains, and get-token.
Example Workflow
A typical cross-chain swap via the MCP server follows this flow: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_keyX-LiFi-Api-Key: your_api_key
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
| Chain | ID | Native Token |
|---|---|---|
| Ethereum | 1 | ETH |
| Polygon | 137 | MATIC |
| Arbitrum | 42161 | ETH |
| Optimism | 10 | ETH |
| BSC | 56 | BNB |
| Avalanche | 43114 | AVAX |
| Base | 8453 | ETH |
| Solana | 1151111081099710 | SOL |
Next Steps
Installation
Setup instructions for Claude, Cursor, Windsurf, VS Code, and more
Available Tools
Complete reference for all MCP tools
Examples
Example prompts, responses, and code samples
GitHub Repository
Source code and self-hosting instructions

