LI.FI MCP Skill

Use this skill to run LI.FI MCP operations through uxc.

Reuse the uxc skill for generic protocol discovery, auth binding, envelope parsing, and error handling.

Prerequisites

Core Workflow

  1. Verify endpoint and protocol with help-first probing:
    • uxc https://mcp.li.quest/mcp -h
    • Confirm protocol is MCP (protocol == "mcp" in the envelope).
  2. Optional auth setup for higher rate limits:
    • 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
    • LI.FI accepts either Authorization: Bearer <key> or X-LiFi-Api-Key; prefer bearer unless endpoint behavior changes.
  3. Use a fixed link command by default:
    • command -v lifi-mcp-cli
    • If missing, create it:
      • uxc link lifi-mcp-cli https://mcp.li.quest/mcp
    • lifi-mcp-cli -h
  4. Inspect operation schema before execution:
    • lifi-mcp-cli get-chains -h
    • lifi-mcp-cli get-token -h
    • lifi-mcp-cli get-quote -h
    • lifi-mcp-cli get-status -h
  5. Prefer discovery first, then route/quote, then execution-precheck queries.

Capability Map

Always inspect host help and operation help in the current endpoint version before relying on an operation name or argument shape.

Recommended Usage Pattern

  1. Discover chain IDs dynamically:
    • lifi-mcp-cli get-chains
    • lifi-mcp-cli get-chain-by-name name=base
  2. Resolve token addresses before quoting:
    • lifi-mcp-cli get-token chain=8453 token=USDC
  3. Check whether a route exists before asking for a quote:
    • lifi-mcp-cli get-connections fromChain=8453 toChain=42161
  4. Generate the quote:
    • lifi-mcp-cli get-quote fromChain=8453 toChain=42161 fromToken=USDC toToken=USDC fromAddress=<wallet> fromAmount=<smallest-unit-amount>
  5. Validate execution preconditions:
    • lifi-mcp-cli get-allowance ...
    • lifi-mcp-cli get-native-token-balance ...
  6. Use get-status only after the externally signed transaction has been broadcast.

Guardrails

Tested Real Scenario

The endpoint was verified through uxc host discovery and returned a live MCP tool list including:

This confirms the skill target is a real hosted MCP surface accessible via UXC.

References