MCP-ODOS
The MCP-ODOS server enables interaction with decentralized exchanges (DEXs), providing two primary functions:
Fetch Quotes for Swaps: Use the
ODOS_GET_QUOTEtool to get swap quotes by specifying parameters likechainId,sellToken,buyToken, andsellAmount.Execute Swaps: Use the
ODOS_EXECUTE_SWAPtool to execute token swaps with parameters includingchainId,sellToken,buyToken,sellAmount,quote, andwalletProvider.
The server is designed to work seamlessly with MCP-compatible clients such as AI assistants or IDE extensions, and can be configured using environment variables like WALLET_PRIVATE_KEY.
Requires Node.js runtime (v18 or newer) to execute the MCP server for decentralized exchange operations.
Implements the MCP server functionality using TypeScript, providing type-safe interaction with decentralized exchanges.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP-ODOS get a quote for swapping 1 ETH to USDC on Ethereum"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🔄 Odos MCP Server
📖 Overview
The Odos MCP Server enables AI agents to interact with Odos, a leading DEX aggregator that finds optimal swap routes across multiple decentralized exchanges. This server provides comprehensive access to quote retrieval and swap execution functionality.
By implementing the Model Context Protocol (MCP), this server allows Large Language Models (LLMs) to fetch swap quotes, compare prices, and execute token swaps directly through their context window, bridging the gap between AI and decentralized finance.
Related MCP server: CCXT MCP Server
✨ Features
Quote Retrieval: Get optimal swap quotes with best routes across multiple DEXs.
Multi-Chain Support: Execute swaps on various blockchain networks including Fraxtal, Ethereum, and more.
Swap Execution: Execute token swaps with automatic allowance handling.
Chain ID Lookup: Retrieve chain IDs for supported blockchain networks.
📦 Installation
🚀 Using npx (Recommended)
To use this server without installing it globally:
npx @iqai/mcp-odos🔧 Build from Source
git clone https://github.com/IQAIcom/mcp-odos.git
cd mcp-odos
pnpm install
pnpm run build⚡ Running with an MCP Client
Add the following configuration to your MCP client settings (e.g., claude_desktop_config.json).
📋 Minimal Configuration
{
"mcpServers": {
"odos": {
"command": "npx",
"args": ["-y", "@iqai/mcp-odos"],
"env": {
"WALLET_PRIVATE_KEY": "your_wallet_private_key_here"
}
}
}
}⚙️ Advanced Configuration (Local Build)
{
"mcpServers": {
"odos": {
"command": "node",
"args": ["/absolute/path/to/mcp-odos/dist/index.js"],
"env": {
"WALLET_PRIVATE_KEY": "your_wallet_private_key_here"
}
}
}
}🔐 Configuration (Environment Variables)
Variable | Required | Description | Default |
| Yes | Your wallet private key for executing swaps | - |
💡 Usage Examples
🔍 Getting Quotes
"Get a quote to swap 1000 USDC for FRAX on Fraxtal."
"What's the best rate to swap ETH for USDC?"
"How much FRAX will I get for 100 USDC on Fraxtal?"
💱 Executing Swaps
"Swap 100 USDC for FRAX on Fraxtal."
"Execute a trade: sell 1000 USDC for ETH."
"Trade my USDC for the maximum amount of FRAX."
🔗 Chain Information
"What is the chain ID for Fraxtal?"
"Get the chain ID for Ethereum mainnet."
🛠️ MCP Tools
ODOS_GET_CHAIN_ID
Get the chain ID for a given chain name
Parameter | Type | Required | Description |
| string | ✅ | The chain name to get the ID for |
ODOS_GET_QUOTE
Get a quote for a swap or exchange operation
Parameter | Type | Required | Default | Description |
| string | "fraxtal" | The blockchain network to execute the transaction on. uses fraxtal as default | |
| string | ✅ | The token to swap from (address). | |
| string | ✅ | The token to swap to (address). | |
| string | ✅ | The amount of tokens to swap, in wei. | |
| boolean | true | Whether to pretty format the quote. |
ODOS_SWAP
Execute a swap transaction
Parameter | Type | Required | Default | Description |
| string | "fraxtal" | The blockchain network to execute the transaction on. uses fraxtal as default | |
| string | ✅ | The token to swap from (address). | |
| string | ✅ | The token to swap to (address). | |
| string | ✅ | The amount of tokens to swap, in wei. | |
| boolean | true | Whether to pretty format the quote. |
👨💻 Development
🏗️ Build Project
pnpm run build👁️ Development Mode (Watch)
pnpm run watch✅ Linting & Formatting
pnpm run lint
pnpm run format📁 Project Structure
src/tools/: Individual tool definitionssrc/services/: API client and business logicsrc/utils/: Shared utilitiessrc/index.ts: Server entry point
📚 Resources
⚠️ Disclaimer
This project is an unofficial tool and is not directly affiliated with Odos. It interacts with financial data and decentralized exchanges. Users should exercise caution and verify all data independently. Trading on decentralized exchanges involves risk.
📄 License
Available Tools
3 toolsODOS_GET_CHAIN_IDA
Get the chain ID for a given chain name
Inputs: chain (required).
ODOS_GET_QUOTEB
Get a quote for a swap or exchange operation
Inputs: fromToken (required), toToken (required), amount (required), chain, +1 more.
ODOS_SWAPC
Execute a swap transaction
Inputs: fromToken (required), toToken (required), amount (required), chain, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool targets a distinct step in the swap process: chain ID lookup, quote retrieval, and execution. No ambiguity or overlap exists.
All tools use a consistent ODOS_ prefix followed by clear verb_noun patterns (GET_CHAIN_ID, GET_QUOTE, SWAP), making them predictable.
With 3 tools, the server is well-scoped for the core swap workflow without unnecessary bloat or deficiency.
The tools cover the essential swap steps but lack a token approval tool, which is commonly required for many swaps, creating a potential gap.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Multi-aggregator swap router for AI agents on Base. 10 bps fee. MCP-native, non-custodial.
A Model Context Protocol server for Wix AI tools
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server enabling AI agents to interact with the Solana blockchain for DeFi operations like checking balances, transferring tokens, executing swaps, and fetching price data.45 npm21MIT
- AlicenseBqualityDmaintenanceA server that allows AI models to interact with cryptocurrency exchange APIs through the Model Context Protocol, providing access to over 100 exchanges and their trading capabilities.20486 npm95MIT
- FlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI agents to autonomously execute cross-chain trading operations on Paloma DEX across seven EVM chains including Ethereum, Arbitrum, and Polygon.21-
- AlicenseNot gradedqualityNot gradedmaintenanceA comprehensive Model Context Protocol server that enables AI agents to interact with BNB Chain, opBNB, and other EVM networks through natural language. It provides tools for DeFi trading, DEX swaps, smart contract deployment, token operations, security analysis, and market data across multiple blockchain networks.31 npm-