Skip to main content

Example Workflows

Cross-Chain Swap

A full order lifecycle from quote to settlement:

Solver Operations

Managing your solver presence and diagnosing issues:

Example Prompts

These prompts work with any MCP-compatible AI tool connected to the LI.FI Intents MCP server.

Discover Routes

Prompt: “What cross-chain routes are available on LI.FI Intents?” Tool called: get-supported-routes Returns available chain + token pairs with fees, activity status, and supported settlement methods.

Get a Quote

Prompt: “Get me a quote for 5 USDC from Ethereum to Base for 0x42fB…749b” Tool called: request-quote with chain names, token symbol, and recipient address. The server handles EIP-7930 encoding internally — no need to convert amounts to smallest units.

Submit an Order

Prompt: “Prepare and submit an order from that quote” Tools called:
  1. prepare-order — builds the StandardOrder from the cached quote
  2. The AI prompts you to sign the order using EIP-712
  3. submit-order — submits the signed order to the order server

Check Route Health

Prompt: “Check the health of the Ethereum Sepolia to Base Sepolia USDC route” Tool called: check-route-health — runs composite diagnostics including route support, quote inventory, and recent activity. Useful for diagnosing why orders aren’t being filled.

Debug an Order

Prompt: “Debug order intent_YaY_b3qxF3…” Tool called: debug-order — returns the order’s full lifecycle, transaction hashes on both chains, solver info, and settlement status.

End-to-End Settlement Flow

To complete a full cross-chain swap (not just submit an order, but actually move tokens on-chain), you need to:
  1. Approve the escrow settler to spend your tokens
  2. Request a quote, prepare, and submit the order via MCP
  3. Deposit funds into the escrow contract on-chain
Once deposited, a solver picks up the order, delivers tokens on the destination chain, and the settlement completes automatically.

Step 1: Token Approval

Approve the escrow settler contract to spend your input token. The escrow settler address is the same on all chains:
Using viem/TypeScript:

Step 2: Submit Order via MCP

Use the MCP tools in sequence:
After submission, the order status is Signed — but funds are not yet locked on-chain.

Step 3: Deposit into Escrow

Call open() on the escrow settler contract to lock your tokens. This triggers a transferFrom using your prior approval.

What Happens Next

Once the escrow is funded:
  1. Solver sees the deposit and delivers tokens on the destination chain
  2. Settlement happens automatically via the Polymer oracle
  3. Order status progresses: Signed -> Deposited -> Delivered -> Settled
Use track-order to monitor the full lifecycle. A typical mainnet settlement takes ~10 minutes.

Testnet vs Mainnet