lifi_swap_quote MCP tool; your backend signs approval and route transactions with the agent wallet accessKey.
Supported chains
ethereum, base, polygon, arbitrum-one, bsc
Same-chain swaps use one network slug. Cross-chain routes set chain (source) and to_chain (destination).
Dashboard setup
- Open Agentic Stack → Integrations for your application.
- Enable LiFi and enter:
- Integrator name — from the LiFi partner portal
- API key — for higher rate limits (
x-lifi-api-key) - Integrator fee — decimal fraction (e.g.
0.005= 0.5%)
- Save — credentials are encrypted server-side and included in agent validation for MCP calls.
LiFi credentials are stored per application, not per end user. All agents under that app share the integration when enabled.
MCP tool: lifi_swap_quote
| Parameter | Required | Description |
|---|---|---|
chain | Yes | Source EVM network slug |
to_chain | No | Destination slug (defaults to chain for same-chain) |
input_token | Yes | Symbol (ETH, USDC) or 0x address on source chain |
output_token | Yes | Symbol or address on destination chain |
amount | Yes | Human-readable sell amount on source chain |
slippage_bps | No | Default 50 (0.5%) |
LiFi specialist chat
In the sample web app, open chat with?serviceAgent=lifi (or pick the LiFi category). The backend:
- Filters tools to LiFi-relevant MCP calls
- Injects LiFi-specific system prompts
- Routes swap and bridge requests to
lifi_swap_quote(not Uniswap orevm_swap_quote)
Execution modes
TRANSFER_REQUIRE_CONFIRMATION | Behavior |
|---|---|
true (default) | User sees a swap confirmation card in chat — Confirm / Cancel before signing |
false | Backend auto-signs approval (if needed) and the route transaction |
Transaction history
Confirmed routes are recorded aschat_lifi_swap (and approvals as chat_lifi_approval) in agent transaction history.
Related
Third-party integrations
BYOK overview, architecture, and deployment.
Swap confirmation
Confirm / cancel UX and REST endpoints.
MCP tools reference
Full tool catalog including
lifi_swap_quote.Uniswap integration
Same-chain Uniswap swaps via
uniswap_swap_quote.