What is MCP?
Model Context Protocol (MCP) is an open standard that allows AI assistants to securely connect to external tools and data sources. The LeoKit MCP server exposes swap functionality as tools that Claude can use directly.Features
- Multi-protocol quotes - Get swap quotes from THORChain, MAYAChain, Chainflip, Relay, and NEAR
- Cross-chain swaps - Generate unsigned transactions for 30+ blockchains
- Transaction tracking - Monitor swap status across protocols
- Asset discovery - List all supported tokens with current prices
- Balance queries - Check wallet balances across multiple chains
Installation
Configuration
Environment Variables
Claude Desktop Setup
Add to your Claude Desktop configuration file:- macOS / Linux
- Windows
Edit
~/.config/claude/claude_desktop_config.json:Available Tools
leokit_get_quote
Get swap quotes from multiple DEX protocols.
Parameters:
| Parameter | Required | Description |
|---|---|---|
from_asset | Yes | Source asset (e.g., ETH.ETH, BTC.BTC) |
to_asset | Yes | Destination asset |
amount | Yes | Amount to swap (human-readable, e.g., 1.5) |
origin | Yes | Sender wallet address |
destination | Yes | Recipient wallet address |
api_key | No | Override default API key |
leokit_create_deposit
Generate unsigned transactions for executing a swap.
Parameters:
| Parameter | Required | Description |
|---|---|---|
quote_id | Yes | Quote ID from leokit_get_quote |
protocol | Yes | Protocol to use (thorchain, mayachain, chainflip, relay, near) |
api_key | No | Override default API key |
The returned transaction is unsigned and must be signed by the user’s wallet before broadcasting.
leokit_check_status
Check the status of a swap transaction.
Parameters:
| Parameter | Required | Description |
|---|---|---|
quote_id | Yes | Original quote ID |
tx_id | Yes | Transaction hash on source chain |
protocol | No | Protocol hint for faster lookup |
api_key | No | Override default API key |
leokit_get_assets
List supported tokens across blockchains.
Parameters:
| Parameter | Required | Description |
|---|---|---|
chain | No | Filter by chain (ETH, BTC, ARB, BSC, POLYGON, AVAX, NEAR) |
api_key | No | Override default API key |
leokit_get_balances
Get wallet balances across multiple chains.
Parameters:
| Parameter | Required | Description |
|---|---|---|
wallets | Yes | Array of { address, chain } objects |
api_key | No | Override default API key |
Example Workflow
Here’s how Claude might help you execute a swap:Get a Quote
Ask Claude: “I want to swap 0.5 ETH for USDC on Arbitrum”Claude uses
leokit_get_quote to fetch quotes from multiple protocols and presents the best options.Review Options
Claude shows you quotes from THORChain, Chainflip, and Relay with expected output amounts and fees.
Generate Transaction
You select THORChain. Claude uses
leokit_create_deposit to generate the unsigned transaction.Asset Format
LeoKit uses a standardized asset format:CHAIN.SYMBOL-ADDRESS
Native assets:
BTC.BTC- BitcoinETH.ETH- EthereumNEAR.NEAR- NEAR Protocol
ETH.USDC-0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48- USDC on EthereumARB.USDC-0xaf88d065e77c8cC2239327C5EDb3A432268e5831- USDC on Arbitrum
Development
Troubleshooting
Claude doesn't see LeoKit tools
Claude doesn't see LeoKit tools
Cause: Config file not loaded or path incorrectSolution:
- Verify the path to
dist/index.jsis absolute and correct - Ensure you ran
npm run buildinapps/leokit-mcp - Restart Claude Desktop after editing config
API key errors
API key errors
Cause: Missing or invalid API keySolution: Verify
LEOKIT_API_KEY is set correctly in the config’s env sectionNo quotes returned
No quotes returned
Cause: Unsupported swap route or insufficient liquiditySolution: Check that both assets are supported using
leokit_get_assets