🔄 MCP ODOS
Package: @iqai/mcp-odos
Purpose: Interact with decentralized exchanges through ODOS aggregation
✨ Features
Section titled “✨ Features”- Interact with decentralized exchanges through ODOS aggregation
- Fetch a quote for a swap
- Execute a swap
🔧 Available Tools
Section titled “🔧 Available Tools”ODOS_GET_QUOTE
Section titled “ODOS_GET_QUOTE”Fetch a quote for a swap:
- Parameters:
chainId(number): The chain ID of the DEXsellToken(string): The token you want to sellbuyToken(string): The token you want to buysellAmount(string): The amount of tokens you want to sell
ODOS_EXECUTE_SWAP
Section titled “ODOS_EXECUTE_SWAP”Execute a swap:
- Parameters:
chainId(number): The chain ID of the DEXsellToken(string): The token you want to sellbuyToken(string): The token you want to buysellAmount(string): The amount of tokens you want to sellquote(string): The quote from the get-quote servicewalletProvider(string): The wallet provider to use
Environment Variables
Section titled “Environment Variables”WALLET_PRIVATE_KEY: Required forLEND,BORROW,ADD_COLLATERAL,REMOVE_COLLATERAL,REPAY,WITHDRAW- The private key of the wallet to be used for interacting with the Fraxlend platform (e.g., signing transactions for lending, borrowing, etc.).
Configuration Example
Section titled “Configuration Example”{ "mcpServers": { "odos-server": { "command": "pnpm", "args": ["dlx", "mcp-odos"], "env": { "WALLET_PRIVATE_KEY": "your_wallet_private_key_here" } } }}💬 Usage Examples
Section titled “💬 Usage Examples”📊 GET_SWAP_QUOTE
Section titled “📊 GET_SWAP_QUOTE”- “Get me a quote for swapping 1 wfrxEth to FRAX on Fraxtal”
- “What rate would I get for trading 0.5 ETH to USDC?”
- “Check current exchange rate between DAI and FXS”
💱 EXECUTE_TOKEN_SWAP
Section titled “💱 EXECUTE_TOKEN_SWAP”- “Swap 100 DAI to FXS”
- “Exchange 0.1 ETH for USDT”
- “Trade my wfrxEth for FRAX”
📊 Response Examples
Section titled “📊 Response Examples”💱 Quote Details{ "inTokens": ["0x..."], "outTokens": ["0x..."], "inAmounts": ["1000000000000000000"], "outAmounts": ["990000000000000000"], "pathId": "0x...", "gasEstimate": 200000, "gasEstimateValue": 0.1, "netOutValue": 100, "priceImpact": 0.01}❌ Error Handling
Section titled “❌ Error Handling”The server provides detailed error messages to help diagnose issues. Errors typically include a detail message, a traceId for debugging, and an errorCode.
Example Error Response:
{ "detail": "Failed to fetch quote: invalid fromToken address", "traceId": "...", "errorCode": "INVALID_ADDRESS"}