Uses .env files for environment variable configuration, particularly for managing API keys like ZERION_API_KEY
Supports Poetry for Python dependency management and running the MCP server
Uses Pydantic models for API response validation and data structure modeling
Python-based MCP server implementation with comprehensive DeFi trading and portfolio analytics capabilities
Provides zap operations for single-transaction liquidity provision quotes through the Odos DEX aggregation platform
Odos MCP Client
A Model Context Protocol (MCP) client for interacting with the Odos DEX aggregation platform and Zerion portfolio analytics. This tool provides comprehensive access to DeFi trading data, swap quotes, portfolio analysis, and transaction history across multiple blockchain networks.
Features
Odos API Integration
Swap Quotes: Get optimal swap routes and pricing across DEX liquidity sources
Zap Operations: Single-transaction liquidity provision quotes
Chain Support: Access all Odos-supported blockchain networks
Token Data: Real-time pricing and metadata for supported tokens
Router Information: Contract addresses and blockchain infrastructure details
Zerion Analytics
Portfolio Analysis: Complete wallet holdings and composition breakdown
Transaction History: Detailed historical transaction data and analysis
Performance Tracking: Historical portfolio performance and returns
Gas Price Monitoring: Real-time gas estimates across networks
Installation
Usage
Ensure you have set up the required environment variables (see Configuration section), then start the MCP server:
Note: Make sure ZERION_API_KEY
is set if you plan to use any Zerion analytics tools.
Verifying Your Setup
Run the verification script to ensure everything is configured correctly:
This script will:
Test all module imports
Verify environment configuration
Check API connectivity
Validate helper functions
Provide a comprehensive setup report
Available Tools
API Tools (src/client/tools/api/
)
Tool | Description |
| Get swap quotes and transaction data |
| Get zap quotes for liquidity provision |
| List supported blockchain networks |
| Retrieve tradeable tokens by chain |
| Real-time token pricing data |
| Bulk token prices across chains |
| Fiat currency exchange rates |
| Smart contract details and metadata |
| Odos router contract addresses |
| Current block numbers and network status |
| Available DEX integrations |
Zerion Tools (src/client/tools/zerion/
)
Note: These tools require the ZERION_API_KEY
environment variable to be set.
Tool | Description |
| Portfolio holdings and composition |
| Historical transaction analysis |
| Portfolio performance tracking |
| Network gas price estimates |
Project Structure
Configuration
Environment Variables
The client requires the following environment variables:
Getting API Keys
Zerion API Key
To use Zerion analytics tools, you'll need a Zerion API key:
Visit Zerion Developer Portal
Sign up for a developer account
Create a new API key
Set the
ZERION_API_KEY
environment variable
Setting Environment Variables
Create a .env
file in the project root:
Or set them directly in your shell:
API Endpoints
The following API endpoints are used (hardcoded in the application):
Odos API:
https://api.odos.xyz
(no authentication required)Zerion API:
https://api.zerion.io
(requires API key)
Development
Setup Development Environment
Adding New Tools
Create tool file in appropriate directory (
api/
orzerion/
)Add brief description docstring
Implement using FastMCP decorator pattern
Update
__init__.py
exportsAdd tests in
tests/
directory
Contributing
Fork the repository
Create feature branch (
git checkout -b feature/amazing-feature
)Commit changes (
git commit -m 'Add amazing feature'
)Push to branch (
git push origin feature/amazing-feature
)Open Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For questions or issues:
Create an issue in the repository
Check existing documentation and tool descriptions
Review the Odos API documentation for parameter details
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables interaction with DeFi trading and portfolio analytics through Odos DEX aggregation and Zerion APIs. Provides access to swap quotes, liquidity operations, token pricing, portfolio analysis, and transaction history across multiple blockchain networks.