npm package: @fr3k/behemoth-mcp
Description: BEHEMOTH v77 MCP Server - 219 Crypto Trading Intelligence Tools with Real Exchange APIs
Author: FR3K AI
Latest version: 2.0.0

# 🌌 BEHEMOTH v77 MCP Server

**The most advanced crypto trading intelligence system available via Model Context Protocol**

## 🚀 Features

- **219 Consolidated Trading Tools** - Comprehensive crypto trading toolkit
- **Real Exchange Integration** - Bybit, Binance, Bitget live APIs
- **Advanced Order Management** - Market, limit, TP/SL, trailing stops
- **50+ Technical Indicators** - RSI, MACD, Bollinger Bands, Stochastic, ADX, ATR, and more
- **Cosmic Intelligence Engine** - Lunar phases, planetary positions, sacred geometry
- **ML/AI Analysis** - LSTM, Transformers, Reinforcement Learning, Neural Networks
- **Risk Management** - Portfolio optimization, position sizing, liquidation protection
- **High-Performance Trading** - Sub-second execution, parallel processing

## 📦 Installation

### As NPM Package (Recommended)

```bash
npm install -g behemoth-mcp-v77
```

### As MCP Server

Add to your MCP client configuration (e.g., Claude Desktop):

```json
{
  "mcpServers": {
    "behemoth-v77": {
      "command": "npx",
      "args": ["behemoth-mcp-v77"]
    }
  }
}
```

Or with local installation:

```json
{
  "mcpServers": {
    "behemoth-v77": {
      "command": "node",
      "args": ["/path/to/behemoth-mcp-v77/index.js"]
    }
  }
}
```

## 🔑 API Key Setup

Create a `.env` file in your working directory:

```env
BYBIT_API_KEY=your_bybit_api_key
BYBIT_API_SECRET=your_bybit_api_secret
BYBIT_USE_TESTNET=false

BITGET_API_KEY=your_bitget_api_key
BITGET_API_SECRET=your_bitget_api_secret
BITGET_API_PASSPHRASE=your_bitget_passphrase

LOG_LEVEL=info
```

**Note:** Binance APIs work without authentication for public endpoints.

## 🎯 Available Tools (219 Total)

### Exchange Integration
- **Ticker Data** - Real-time prices for spot and futures across all exchanges
- **Order Management** - Place, cancel, modify orders with full TP/SL support
- **Market Data** - Order books, trades, funding rates, open interest, klines
- **Wallet Management** - Balance queries, position tracking

### Technical Analysis
- **Indicators** - RSI, MACD, Bollinger Bands, Stochastic, ADX, ATR, Momentum, Volatility
- **Pattern Recognition** - Candlestick patterns, chart patterns, harmonic patterns
- **Volume Analysis** - OBV, VWAP, volume profiles, accumulation/distribution
- **Trend Analysis** - Support/resistance, Fibonacci, Elliott Wave

### Advanced Features
- **Trading Strategies** - Multi-timeframe, arbitrage, delta-neutral, momentum, mean reversion
- **ML/AI Models** - LSTM price prediction, transformer pattern recognition, RL trading
- **Risk Management** - Portfolio optimization, VaR calculation, position sizing
- **Cosmic Intelligence** - Lunar cycles, planetary positions, sacred geometry analysis

## 📖 Usage Examples

### 1. Get Account Balance

```javascript
{
  "tool": "exchange_wallet_management",
  "args": {
    "action": "get_balance",
    "exchange": "bybit"
  }
}
```

### 2. Get Market Ticker

```javascript
{
  "tool": "exchange_ticker",
  "args": {
    "exchange": "bybit",
    "symbol": "BTCUSDT",
    "market_type": "futures"
  }
}
```

### 3. Place High Leverage Trade

```javascript
{
  "tool": "exchange_order_management",
  "args": {
    "exchange": "bybit",
    "action": "place_order",
    "symbol": "DOGEUSDT",
    "side": "Buy",
    "orderType": "Market",
    "qty": 566,
    "takeProfit": 0.223,
    "stopLoss": 0.201
  }
}
```

### 4. Calculate RSI

```javascript
{
  "tool": "technical_indicator",
  "args": {
    "indicator": "rsi",
    "symbol": "ETHUSDT",
    "period": 14
  }
}
```

### 5. Run Trading Strategy

```javascript
{
  "tool": "trading_strategy",
  "args": {
    "strategy_type": "momentum_breakout",
    "symbol": "BTCUSDT",
    "timeframe": "1h"
  }
}
```

### 6. Get Cosmic Analysis

```javascript
{
  "tool": "cosmic_analysis",
  "args": {
    "analysis_type": "lunar_phase",
    "symbol": "BTCUSDT"
  }
}
```

## 🛠️ Tool Categories

### Core Exchange Tools (34)
- `exchange_ticker` - Get ticker data
- `exchange_order_management` - Place/manage orders
- `exchange_market_data` - Get market data
- `exchange_wallet_management` - Wallet operations

### Technical Analysis Tools (50+)
- `technical_indicator` - Calculate indicators
- `pattern_analysis` - Detect patterns
- `volume_analysis` - Volume-based analysis

### Advanced Trading Tools (100+)
- `trading_strategy` - Execute strategies
- `ml_prediction` - ML-based predictions
- `ai_analysis` - AI-powered analysis
- `risk_analysis` - Risk management
- `portfolio_optimization` - Portfolio tools

### Intelligence Tools (30+)
- `cosmic_analysis` - Cosmic intelligence
- `quantum_trading` - Quantum analysis
- `sentiment_analysis` - Market sentiment
- `onchain_analysis` - On-chain metrics

## 🔒 Security

- API keys stored in environment variables (never in code)
- All requests use HMAC SHA256 signatures
- TLS/SSL encrypted connections
- Never logs sensitive data
- Use read-only API keys when possible

## ⚡ Performance

- **Sub-second latency** for market data
- **Parallel processing** for multi-pair analysis
- **Connection pooling** for optimal throughput
- **Error handling** with automatic retries
- **Rate limit management** built-in

## 📊 Example: Complete Trading Workflow

```javascript
// 1. Check balance
exchange_wallet_management({ action: "get_balance", exchange: "bybit" })

// 2. Analyze market
technical_indicator({ indicator: "rsi", symbol: "DOGEUSDT" })

// 3. Get best strategy
trading_strategy({ strategy_type: "momentum_breakout", symbol: "DOGEUSDT" })

// 4. Set leverage
exchange_order_management({ 
  action: "set_leverage", 
  symbol: "DOGEUSDT", 
  leverage: 10 
})

// 5. Place trade with TP/SL
exchange_order_management({
  action: "place_order",
  exchange: "bybit",
  symbol: "DOGEUSDT",
  side: "Buy",
  qty: 566,
  takeProfit: 0.223,
  stopLoss: 0.201
})

// 6. Monitor position
exchange_order_management({ action: "get_positions", exchange: "bybit" })
```

## 🎓 Supported Exchanges

| Exchange | Spot | Futures | Testnet | Authentication |
|----------|------|---------|---------|----------------|
| Bybit    | ✅   | ✅      | ✅      | API Key        |
| Binance  | ✅   | ✅      | ❌      | Optional       |
| Bitget   | ✅   | ✅      | ❌      | API Key        |

## 🐛 Troubleshooting

### API Key Issues

**Error:** "Your api key has expired"  
**Solution:** Generate fresh API keys from exchange dashboard

**Error:** "Invalid request, please check your server timestamp"  
**Solution:** Sync system time with `sudo ntpdate pool.ntp.org`

### MCP Connection Issues

**Problem:** Server not connecting  
**Solution:** 
```bash
# Test standalone
npx behemoth-mcp-v77

# Check logs
LOG_LEVEL=debug npx behemoth-mcp-v77
```

## 📚 Documentation

- [Full Tool Reference](./TOOLS.md)
- [Trading Strategies Guide](./STRATEGIES.md)
- [API Integration](./API.md)
- [Risk Management](./RISK.md)

## 🌟 Pro Tips

1. **Start with small positions** - Test with 1-5% of capital
2. **Always set TP/SL** - Never trade without stops
3. **Use appropriate leverage** - 5-10x max for most strategies
4. **Monitor liquidation prices** - Keep 20%+ buffer
5. **Diversify across pairs** - Don't put all capital in one trade

## 📝 Version History

### v1.0.0 (Current)
- 219 consolidated trading tools
- Real Bybit, Binance, Bitget integration
- Advanced order management with TP/SL
- 50+ technical indicators
- ML/AI analysis capabilities
- Cosmic intelligence engine
- Production-ready MCP server

## 🤝 Contributing

Contributions welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md)

## 📄 License

MIT License - see [LICENSE](./LICENSE)

## ⚠️ Disclaimer

**IMPORTANT:** This software is for educational and research purposes only. Cryptocurrency trading carries substantial risk of loss. Never trade with money you cannot afford to lose. Past performance does not guarantee future results. The authors are not responsible for any financial losses incurred through use of this software.

Always:
- Use proper risk management
- Test on demo/testnet first
- Understand the markets you're trading
- Never invest more than you can afford to lose

## 🔗 Links

- [Model Context Protocol](https://modelcontextprotocol.io)
- [Bybit API Docs](https://bybit-exchange.github.io/docs/)
- [Binance API Docs](https://binance-docs.github.io/apidocs/)
- [Bitget API Docs](https://www.bitget.com/api-doc/)

---

**Built with 🌌 by FR3K AI**  
*Cosmic Trading Intelligence for the Modern Era*