The LI.FI Cross-Chain Swap MCP Server integrates with the LI.FI API to provide cross-chain swap functionality across multiple liquidity pools and bridges. This tool is designed for testing and experimental purposes, and users are advised to avoid using it with wallets containing significant funds due to potential risks.
⚠️ IMPORTANT SECURITY DISCLAIMER ⚠️
DO NOT use this tool with your main wallet keystore or wallets containing significant funds!
This tool is for testing and experimental purposes only. There is potential for loss of funds due to software bugs, transaction errors, or network issues. Neither LI.FI nor the developers of this tool are responsible for any loss of funds resulting from its use. Use at your own risk with test wallets only.
chains
, chainTypes
, minPriceUSD
chain
(required), token
(required)chainTypes
id
(required)name
(required)fromChain
, toChain
, fromToken
, toToken
, fromAddress
, fromAmount
, etc.txHash
(required), bridge
, fromChain
, toChain
fromChain
, toChain
, fromToken
, toToken
, chainTypes
chains
rpcUrl
(required), address
(required)rpcUrl
, tokenAddress
, walletAddress
rpcUrl
, tokenAddress
, ownerAddress
, spenderAddress
rpcUrl
, transactionRequest
rpcUrl
, tokenAddress
, spenderAddress
, amount
rpcUrl
, tokenAddress
, to
, amount
rpcUrl
, to
, amount
curl https://raw.githubusercontent.com/lifinance/lifi-mcp/refs/heads/main/install.sh | bash
go install github.com/lifinance/lifi-mcp@latest
lifi-mcp server --keystore <keystore-name> --password <keystore-password>
The server will search for a file containing this name in the standard Ethereum keystore directory:
- Linux: ~/.ethereum/keystore
- macOS: ~/Library/Ethereum/keystore
- Windows: %APPDATA%\Ethereum\keystore
lifi-mcp new-wallet --name <wallet-name> --password <wallet-password>
This generates a new Ethereum wallet, saves it to the standard keystore location, and displays the wallet address.
To integrate this server with the desktop app, add the following to your app's server configuration:
{
"mcpServers": {
"lifi": {
"command": "lifi-mcp",
"args": ["server"]
}
}
}
For wallet functionality, include keystore parameters:
{
"mcpServers": {
"lifi": {
"command": "lifi-mcp",
"args": ["server", "--keystore", "your-keystore", "--password", "your-password"]
}
}
}
MIT