LI.FI MCP 服务器与 LI.FI API 集成,为用户提供跨链兑换功能,支持多个流动资金池和桥接服务,极大地提升了资产在不同链之间的流通性。
⚠️ 重要提示
请勿使用此工具处理您的主钱包 keystore 或包含重要资金的_wallets_!此工具仅用于测试和实验用途。由于软件错误或安全漏洞、交易错误或配置问题、网络问题或智能合约故障等原因,可能会导致资金损失。LI.FI 或此工具的开发人员不对因使用此开源软件而导致的资金损失负责。请仅使用测试钱包!
您可以将 LI.FI MCP 服务器作为全局命令安装到您的系统中:
npm install -g li-fi-mcp-server
您也可以在项目中进行局部安装:
npm install li-fi-mcp-server
启动 MCP 服务器(位于当前目录的 node_modules/.bin
或全局安装的位置):
li-fi-mcp-server
要使用自定义配置文件,请提供 --config
参数:
li-fi-mcp-server --config ./path/to/config.json
GetTokens
chains
, chainTypes
, minPriceUSD
GetToken
chain
(必需), token
(必需)GetChains
chainTypes
GetChainById
id
(必需)GetChainByName
name
(必需)GetQuote
fromChain
, toChain
, fromToken
, toToken
, fromAddress
, fromAmount
等。GetStatus
txHash
(必需), bridge
, fromChain
, toChain
GetConnections
fromChain
, toChain
, fromToken
, toToken
, chainTypes
GetTools
chains
GetWalletAddress
GetNativeTokenBalance
rpcUrl
(必需), address
(必需)GetTokenBalance
tokenContractAddress
(必需), accountAddress
GetNativeBalance
TransferEth
toAddress
, amountInEth
TransferToken
toAddress
, tokenContractAddress
, amountInTokens
以下是配置文件 config.json
的示例:
{
"port": "8080", // MCP 服务器监听的端口(默认:8080)
"keystore": "./wallets/keys", // 存放 keystore 文件的目录路径(默认:./wallets/keys)
"etherscanKey": "", // 可选,Etherscan API 密钥
"polygonScanKey": "" // 可选,Polygon Scan API 密钥
}
MIT