# @blockrun/alpha
AI-powered crypto trading MCP server with technical analysis, sentiment, and execution tools.
## Installation
```bash
claude mcp add alpha npx @blockrun/alpha
```
## Tools
| Tool | Description |
|------|-------------|
| `alpha_signal` | Technical analysis (RSI, MACD, EMA) via CoinGecko |
| `alpha_dex` | DEX market data via DexScreener |
| `alpha_sentiment` | Social sentiment analysis (requires BlockRun wallet) |
| `alpha_swap` | Token swap quotes + execution on Base |
| `alpha_portfolio` | Position tracking and management |
| `alpha_memory` | Vector-based trade memory search |
| `alpha_risk` | Risk management checks |
| `alpha_extensions` | Discover additional MCPs (Nansen, Dune, etc.) |
## Usage Examples
```
> "Get ETH technical signals"
Uses alpha_signal to fetch RSI, MACD, EMA indicators
> "Check PEPE market data"
Uses alpha_dex for DexScreener data
> "Find similar trades to ETH breakout"
Uses alpha_memory for semantic search
> "Check if $500 ETH buy passes risk limits"
Uses alpha_risk to validate against position limits
> "Swap 100 USDC for ETH"
Uses alpha_swap with execute=true to swap on Base
```
## Data Sources
- **CoinGecko API** - Price data and technical indicators (free)
- **DexScreener** - DEX market data (free)
- **Swap Aggregators** - Uses first available:
- 1inch (set `ONEINCH_API_KEY`)
- 0x (set `ZEROX_API_KEY`)
- Paraswap (no key required, default fallback)
- **BlockRun Twitter** - Sentiment analysis (paid, requires wallet)
## Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| `ONEINCH_API_KEY` | No | 1inch API key for best rates |
| `ZEROX_API_KEY` | No | 0x API key as alternative |
| (none) | - | Falls back to Paraswap (free, no key) |
## Risk Limits (Hardcoded)
| Rule | Value |
|------|-------|
| Max position size | 15% |
| Max total exposure | 50% |
| Daily loss limit | 5% |
| Min cash reserve | 50% |
| Stop loss | 15% |
## Data Storage
Data is stored locally in `~/.blockrun/alpha/alpha.db`:
- Portfolio positions
- Trade history
- Trade memory with vector embeddings
## Requirements
- Node.js 18+
- BlockRun wallet (optional, for sentiment and swaps)
## Extend with More MCPs
Use `alpha_extensions` to discover additional capabilities:
| MCP | What it adds | Pricing |
|-----|--------------|---------|
| **Nansen** | Smart Money tracking, whale data | Free tier / $49/mo |
| **BlockRun** | AI models, X/Twitter data | Pay-per-request |
| **Dune** | Custom SQL analytics | Free tier |
```bash
# Example: Add Nansen for on-chain data
claude mcp add --transport http nansen https://mcp.nansen.ai/ra/mcp \
--header "NANSEN-API-KEY: YOUR_KEY"
```
## Related
- [@blockrun/mcp](https://github.com/blockrunai/blockrun-mcp) - AI model access
- [alpha-trader](https://github.com/blockrunai/alpha-trader) - Claude Code trading agent
## License
MIT