A modern, modular MCP (Model Context Protocol) server with scalable service architecture, supporting multiple MCP services including DeFi, Gaming, and search tools.
- Modular Service Architecture: Plugin-based service loading and management
- Service Registry: Dynamic service discovery, registration, and health monitoring
- Multiple Connection Types: HTTP, SSE, WebSocket, and standard MCP protocol
- Service Management: Add, remove, enable/disable, and reload services dynamically
- Built-in Tools: DuckDuckGo search and enhanced web search
- FastAPI Backend: High-performance async web framework
# Install dependencies
pip install -r requirements.txt
# Run server
python run.pyGET /- Server information and statusGET /health- Health check with service statusGET /services- List all registered servicesGET /tools- List all available toolsGET /statistics- Detailed service and tool statistics
POST /services/reload/{service_id}- Reload a specific servicePOST /services/load- Load services from configurationPOST /services/add- Add a new service dynamicallyDELETE /services/{service_id}- Remove a servicePOST /services/{service_id}/enable- Enable a disabled servicePOST /services/{service_id}/disable- Disable a serviceGET /services/{service_id}/status- Get detailed service status
POST /mcp- Standard MCP endpoint (POST)GET /mcp- Standard MCP endpoint (SSE)GET /sse- Server-Sent Events endpointPOST /api/mcp/olaxbt-gateway- Custom MCP endpoint
POST /mcp/tools/list- List all available toolsPOST /mcp/tools/call- Call a specific toolPOST /mcp/services/list- List all available services
curl http://localhost:3000/servicescurl http://localhost:3000/toolscurl http://localhost:3000/services/meteora/status{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "crypto_price",
"arguments": {
"coin_id": "bitcoin",
"vs_currency": "usd",
"include_market_data": true,
"include_24hr_change": true
}
}
}{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "portfolio_tracker",
"arguments": {
"action": "create",
"portfolio_id": "my_portfolio",
"name": "My Crypto Portfolio"
}
}
}{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "defi_protocol",
"arguments": {
"protocol": "meteora",
"action": "pools"
}
}
}{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "market_analysis",
"arguments": {
"coin_id": "bitcoin",
"analysis_type": "technical_indicators",
"timeframe": "7d"
}
}
}{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "apy_calculator",
"arguments": {
"calculation_type": "liquidity_pool",
"protocol": "meteora",
"principal": 10000,
"time_period": 365
}
}
}{
"jsonrpc": "2.0",
"id": 6,
"method": "tools/call",
"params": {
"name": "nft_marketplace",
"arguments": {
"action": "collection_stats",
"collection_slug": "bored-ape-yacht-club",
"chain": "ethereum"
}
}
}{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "nft_marketplace",
"arguments": {
"action": "floor_price",
"collection_slug": "degen-ape-academy",
"chain": "solana"
}
}
}curl -X POST http://localhost:3000/services/add \
-H "Content-Type: application/json" \
-d '{
"name": "My Service",
"description": "Custom service description",
"url": "http://localhost:3003",
"tools": ["my_tool"],
"metadata": {"category": "custom"}
}'Services can be configured through:
- Configuration files
- Dynamic API calls
- Environment variables
Client → MCP Gateway → Service Manager → Service Registry
↓
Router → Local Tools
The server provides:
- Service Manager: Handles service lifecycle and configuration
- Service Registry: Manages service registration and health monitoring
- Router: Routes requests to appropriate services or local tools
- Local Tools: Built-in search and utility tools
- Install dependencies:
pip install -r requirements.txt- Run locally:
python run.py- Add new service:
python scripts/add_service.pyThe MCP server includes comprehensive tools for:
- Cryptocurrency price data
- DeFi protocol interactions
- Portfolio tracking and analysis
- Crypto news aggregation
- NFT marketplace data
- Market analysis and technical indicators
- APY calculations
- Social media integration
- Communication tools
- Utility functions
All tools include comprehensive error handling and fallback to reasonable defaults when APIs are unavailable.
Deploy to any server that supports Python applications:
- Upload your code to your server
- Install dependencies:
pip install -r requirements.txt - Run the server:
uvicorn app.mcp.server:app --host 0.0.0.0 --port 3000 - Set environment variables:
MCP_HOST=0.0.0.0 MCP_PORT=3000 MCP_DEBUG=false
Add .vscode/mcp.json for HTTP or SSE connections:
{
"servers": {
"olaxbt-mcp": {
"url": "http://localhost:3000/mcp",
"type": "http"
}
},
"inputs": []
}duckduckgo_search- Web search using DuckDuckGoweb_search- Enhanced search (text, news, images, videos)crypto_news- Cryptocurrency-specific news aggregation with sentiment analysis
crypto_price- Real-time cryptocurrency prices and market data from CoinGeckodefi_protocol- Interact with DeFi protocols (Meteora liquidity pools, Jupiter swap aggregator)portfolio_tracker- Track and analyze cryptocurrency portfolios with real-time pricingapy_calculator- Calculate APY using real DeFi protocol data:- Liquidity pool APY with impermanent loss estimates
- Yield farming APY with compound interest calculations
- Staking APY with real protocol data
- Compound interest with monthly breakdowns
- Real-time DeFi protocol data from CoinGecko
nft_marketplace- Real-time NFT marketplace data from OpenSea, Magic Eden, and other major marketplaces- Collection information and statistics
- Floor prices with 24h/7d changes
- Trading volume and sales data
- Recent sales with transaction details
- Support for Ethereum, Solana, and Polygon chains
market_analysis- Advanced market analysis with real-time data:- Technical indicators (RSI, MACD, Bollinger Bands, Moving Averages)
- Trend analysis with momentum and key levels
- Market sentiment using Fear & Greed Index and social metrics
- Volatility analysis with risk metrics (VaR, Sharpe ratio, Sortino ratio)
- Real-time data from CoinGecko API
notification- Set up and manage alerts with real market integration:- Price alerts with real-time CoinGecko price checking
- News alerts for cryptocurrency and DeFi topics
- Portfolio alerts with market summary data
- Real-time market data integration for alert testing
Tools are dynamically loaded from registered services and can include:
- DeFi protocols (Meteora, etc.)
- Gaming platforms (GMGN, etc.)
- Analytics services
- Custom integrations
app/mcp/
├── server.py # Main server with FastAPI
├── service_manager.py # Service lifecycle management
├── router.py # Request routing and MCP handling
├── config.py # Configuration management
├── tools.py # Local tool implementations
└── services/ # Service implementations
├── base_service.py # Base service class
├── meteora.py # Meteora DeFi service
└── gmgn.py # GMGN Gaming service
- Python 3.8+
- FastAPI
- uvicorn
- duckduckgo-search
- aiohttp
- websockets
- pydantic
For full functionality, set the following environment variables:
# NFT Marketplace APIs (optional but recommended)
OPENSEA_API_KEY=your_opensea_api_key_here
RESERVOIR_API_KEY=your_reservoir_api_key_here
# Server Configuration
MCP_HOST=0.0.0.0
MCP_PORT=3000
MCP_DEBUG=false-
OpenSea API Key:
- Visit OpenSea API Documentation
- Sign up for an API key at OpenSea Developer Portal
-
Reservoir API Key (optional):
- Visit Reservoir API Documentation
- Get an API key for enhanced Ethereum/Polygon data
Note: The NFT marketplace tool will work without API keys but with rate limits. API keys provide higher rate limits and better reliability.
You can run this service as part of the OlaXBT Nexus stack and settle usage directly on BNB Chain (BSC / BNB Smart Chain).
Fund your Nexus-connected wallet with BNB or supported stablecoins on BNB Chain, then buy credits through the Nexus interface; all metered usage is settled on BNB Chain with low fees, and can later be expanded to opBNB or Greenfield–aligned workflows.
This lets agents and trading tools consume data and actions through Nexus while keeping payments and accounting native to the BNB Chain ecosystem.
This project is licensed under the MIT License.