返回顶部
l

lifi-mcp-skill跨链路由查询

Use the LI.FI MCP server through UXC for cross-chain route discovery, bridge/DEX availability checks, token and chain lookup, gas/balance/allowance checks, quote generation, and transfer status tracking. Use when tasks involve planning or monitoring cross-chain swaps and bridges without signing or broadcasting transactions.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
168
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

lifi-mcp-skill

LI.FI MCP 技能

使用此技能通过 uxc 运行 LI.FI MCP 操作。

复用 uxc 技能进行通用协议发现、认证绑定、信封解析和错误处理。

前置条件

  • - uxc 已安装并位于 PATH 环境变量中。
  • 可访问 https://mcp.li.quest/mcp 网络端点。
  • 可选:用于更高速率限制的 LI.FI API 密钥。

核心工作流程

  1. 1. 通过帮助优先探测验证端点和协议:
- uxc https://mcp.li.quest/mcp -h - 确认协议为 MCP(信封中 protocol == mcp)。
  1. 2. 可选:为更高速率限制设置认证:
- uxc auth credential set lifi-mcp --auth-type bearer --secret-env LIFIAPIKEY - uxc auth binding add --id lifi-mcp --host mcp.li.quest --path-prefix /mcp --scheme https --credential lifi-mcp --priority 100 - LI.FI 接受 Authorization: Bearer 或 X-LiFi-Api-Key;除非端点行为发生变化,否则优先使用 bearer 方式。
  1. 3. 默认使用固定链接命令:
- command -v lifi-mcp-cli - 如果缺失,创建它: - uxc link lifi-mcp-cli https://mcp.li.quest/mcp - lifi-mcp-cli -h
  1. 4. 执行前检查操作模式:
- lifi-mcp-cli get-chains -h - lifi-mcp-cli get-token -h - lifi-mcp-cli get-quote -h - lifi-mcp-cli get-status -h
  1. 5. 优先进行发现,然后是路由/报价,最后是执行预检查查询。

能力映射

  • - 链和代币发现:
- 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

在依赖操作名称或参数结构之前,始终检查当前端点版本的主机帮助和操作帮助。

推荐使用模式

  1. 1. 动态发现链 ID:
- lifi-mcp-cli get-chains - lifi-mcp-cli get-chain-by-name name=base
  1. 2. 报价前解析代币地址:
- lifi-mcp-cli get-token chain=8453 token=USDC
  1. 3. 请求报价前检查路由是否存在:
- lifi-mcp-cli get-connections fromChain=8453 toChain=42161
  1. 4. 生成报价:
- lifi-mcp-cli get-quote fromChain=8453 toChain=42161 fromToken=USDC toToken=USDC fromAddress=<钱包地址> fromAmount=<最小单位金额>
  1. 5. 验证执行前置条件:
- lifi-mcp-cli get-allowance ... - lifi-mcp-cli get-native-token-balance ...
  1. 6. 仅在外部签名交易已广播后使用 get-status。

防护措施

  • - 保持自动化使用 JSON 输出信封;不要依赖 --text。
  • 优先解析稳定字段:ok、kind、protocol、data、error。
  • 使用 lifi-mcp-cli 作为默认命令路径。
  • 当配置了相同的认证绑定时,lifi-mcp-cli <操作> ... 等同于 uxc https://mcp.li.quest/mcp <操作> ...。
  • 仅在链接设置不可用时,临时使用直接的 uxc <端点> ... 作为后备方案。
  • 简单参数优先使用 key=value 格式,嵌套对象使用位置 JSON。
  • 从代理角度来看,此端点是只读的:
- 它签署交易 - 它广播交易 - 它返回未签名的 transactionRequest 对象供外部钱包执行
  • - 不要将 get-quote 或 get-step-transaction 呈现为已执行的交易;它们只是执行计划。
  • 在建议 ERC20 路由可执行之前,如果路由需要授权,请检查授权额度。
  • 仅当用户明确想要多个备选方案时,才优先使用 get-routes;默认使用 get-quote 获取最佳路由。
  • 在实际测试中,链查询工具接受名称,但代币/余额/授权工具在使用数字链 ID 时更可靠。发现后优先使用数字 ID。

经过测试的真实场景

通过 uxc 主机发现验证了端点,并返回了包含以下工具的实时 MCP 工具列表:

  • - get-allowance
  • get-chain-by-id
  • get-chain-by-name
  • get-chains
  • get-connections
  • get-gas-prices
  • get-gas-suggestion
  • get-quote
  • get-routes
  • get-status
  • get-token
  • get-tokens
  • get-tools
  • health-check

这确认了技能目标是一个可通过 UXC 访问的真实托管 MCP 接口。

参考

  • - 调用模式:
- references/usage-patterns.md

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 lifi-mcp-skill-1776362702 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 lifi-mcp-skill-1776362702 技能

通过命令行安装

skillhub install lifi-mcp-skill-1776362702

下载

⬇ 下载 lifi-mcp-skill v1.0.0(免费)

文件大小: 5.31 KB | 发布时间: 2026-4-17 15:13

v1.0.0 最新 2026-4-17 15:13
lifi-mcp-skill v1.0.0

- Initial release: Enables discovery and monitoring of cross-chain swaps and bridges using the LI.FI MCP server via UXC.
- Supports chain and token lookup, provider availability checks, quote generation, allowance and gas checks, and transfer status tracking.
- Recommends using `lifi-mcp-cli` as a linked command for all operations.
- Ensures clear guardrails: no transaction signing/broadcasting, output is for planning and monitoring only.
- Includes robust usage guidance and best practices for read-only interactions.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部