Skip to content

feat(wallet-mcp): add LI.FI plugin - #25

Open
brucexu-eth wants to merge 2 commits into
coinbase:mainfrom
brucexu-eth:feat/wallet-mcp-lifi-plugin
Open

brucexu-eth wants to merge 2 commits into
coinbase:mainfrom
brucexu-eth:feat/wallet-mcp-lifi-plugin

Conversation

@brucexu-eth

@brucexu-eth brucexu-eth commented Nov 16, 2026 •

Copy link
Copy Markdown

Description

Adds a LI.FI plugin (skills/wallet-mcp/plugins/lifi.md) for cross-chain bridging and swap-and-bridge. No current Wallet MCP plugin moves funds between chains, and Wallet MCP has no bridge tool.

How it works:

  1. get_wallets → wallet address.
  2. GET https://li.quest/v1/quote → route plus unsigned source-chain transactionRequest.
  3. The agent checks four things before showing the quote: chain ID, from, to == approvalAddress == LI.FI Diamond (0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE), and value (native = fromAmount, ERC-20 = 0x0).
  4. send_calls on the source chain: exact-amount approve + bridge call in one batch for ERC-20 (USDT on Ethereum gets an approve(0) first), bridge call only for native input.
  5. After approval: get_request_status → source tx hash → GET https://li.quest/v1/status until DONE. Success is reported only for DONE / COMPLETED; PARTIAL and REFUNDED are reported as such.

Frontmatter: integration: http-api, chains arbitrum, avalanche, base, bsc, ethereum, optimism, polygon, allowlist: [li.quest], auth: none, risk: [slippage, irreversible]. All LI.FI calls are GETs, so the user-paste fallback from references/custom-plugins.md works when li.quest is not allowlisted.

Per Contribution Scope, the diff is the plugin file plus two new tags (bridge, cross-chain) appended to the vocabulary in plugin-spec.md. The SKILL.md registry table is left to maintainers.

Change type

  • Harness integration or metadata
  • Skill workflow
  • Bug fix
  • Documentation
  • Breaking change (describe migration)

Validation

Run:

  • Self-check against the plugin-spec Authoring Checklist (required frontmatter fields, required sections for http-api, allowlist, risk tags): 38/38.
  • python3 -m unittest discover -s tests: OK.
  • Live /v1/quote responses mapped to send_calls payloads with the steps in the plugin, all checks passing: 10 USDC Base→Arbitrum, 0.005 ETH Base→Arbitrum (re-run 2026-11-16), 20 USDT Ethereum→USDC Base.
  • Bridge-specific quotes (Base→Arbitrum, USDC and ETH, allowBridges = across, relay, mayan, symbiosis, celercircle, stargateV2, glacis; 12 routes returned): every transactionRequest.value equals the expected native amount (fromAmount or 0, plus native feeCosts with included: false). Stargate and Glacis charge such a fee; the second commit relaxes the earlier value == 0 / value == fromAmount check to accept it.
  • transactionRequest.to and estimate.approvalAddress equal the LI.FI Diamond on all 7 listed chains.
  • Read-only eth_call of the native ETH bridge call on Base: no revert.
  • /v1/status on a real Base→Arbitrum transfer: DONE / COMPLETED.

Not run:

  • No Wallet MCP session: get_wallets, send_calls and get_request_status were not exercised, and no transaction was signed. It is unverified whether get_request_status returns the on-chain tx hash (needed for /v1/status) or a user-op ID, and whether the approve + bridge batch executes atomically.
  • Whether li.quest is on the web_request allowlist.
  • The plugin-review skill referenced in plugin-spec.md is not in the repository, so it was not run.
  • robinhood-chain is left out until its Wallet MCP chain ID is confirmed against LI.FI's chain list.

Checklist (harness/packaging items do not apply to a plugin file):

  • Generated portable manifest and MCP config validate against the vendored Agent Plugins schemas — n/a
  • Package paths and skill references remain inside each generated plugin root — n/a
  • Marketplace, skills, MCP, and icon paths are valid — n/a
  • Exactly one canonical skill library; generated copies are not committed
  • Claude compatibility metadata/endpoint and marketplace sources agree with the portable package — n/a
  • Tool schemas, authorization, and retry behavior reviewed
  • README and changelog updated; versions consistent — left to maintainers per Contribution Scope
  • No unapproved disclosures or sensitive data
  • Signed commits

Release considerations

  • Maintainers decide whether to add LI.FI to the SKILL.md plugin table and whether to allowlist li.quest for web_request.
  • An end-to-end test through a Coinbase Wallet session is still outstanding. Happy to run one if that helps review.
  • I work at LI.FI (DevRel).

@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
1 if authored by an app that is not allowlisted and lacks verified human attribution 0
Sum 1

Some bridges (Stargate's LayerZero fee, Glacis) add a native fee to
transactionRequest.value. The value check now expects fromAmount (native
input) or 0 (ERC-20 input) plus every native feeCosts entry with
included: false, and the user is shown that fee before confirming.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants