SuperAPI AI 工具集

lifi-mcp-skill

智能体与模型

查看项目

更新于 10-15 22:14

技能介绍

用途:该技能通过 uxc 调用 LI.FI 托管的 MCP 端点 https://mcp.li.quest/mcp,用于跨链路线发现、桥接与 DEX 可用性检查、代币与链查询,以及余额、授权和 gas 等执行前检查。

主要能力:链与代币发现(get-chains、get-chain-by-id、get-chain-by-name、get-tokens、get-token);路线与提供方可用性(get-connections、get-tools);报价与路线规划(get-quote、get-routes、get-step-transaction、get-quote-with-calls);钱包预检(get-native-token-balance、get-token-balance、get-allowance、get-gas-prices、get-gas-suggestion);监控与服务检查(get-status、test-api-key、health-check)。

使用方式:需先安装 uxc 并确保在 PATH 中,且能访问上述端点。可选设置 LI.FI API key 以提高速率限制:uxc auth credential set lifi-mcp --auth-type bearer --secret-env LIFI_API_KEY,再执行 uxc auth binding add --id lifi-mcp --host mcp.li.quest --path-prefix /mcp --scheme https --credential lifi-mcp --priority 100。默认使用固定链接命令:uxc link lifi-mcp-cli https://mcp.li.quest/mcp,随后用 lifi-mcp-cli <operation> ... 调用。建议先探测帮助(uxc https://mcp.li.quest/mcp -h、lifi-mcp-cli get-quote -h),再按发现、报价、执行前检查的顺序操作。

限制:从智能体视角该端点是只读的,不签名、不广播交易,只返回未签名的 transactionRequest 供外部钱包执行;get-quote 与 get-step-transaction 是执行计划而非已执行交易。ERC20 路线需先检查 allowance。默认用 get-quote 取最佳路线,仅在用户明确需要多个备选时用 get-routes。实测中代币、余额、授权工具更可靠地接受数字链 ID,建议发现后优先使用数字 ID。自动化应解析 JSON 输出信封的 ok、kind、protocol、data、error 字段,不要依赖 --text。