@purpleflea/trading-mcp
MCP server for Purple Flea Trading — trade 275+ perpetual markets from any AI agent. Stocks, crypto, commodities, forex, and indices. One API. Powered by Hyperliquid.
Markets
| Category | Count | Examples | Max Leverage |
|---|---|---|---|
| Crypto | 229 | BTC, ETH, SOL, XRP, DOGE, AVAX, LINK | Up to 50x |
| Stocks | 29 | TSLA, NVDA, AAPL, GOOGL, META, AMD, AMZN | Up to 5x |
| Commodities | 9 | GOLD, SILVER, OIL, URANIUM, COPPER, PLATINUM | Up to 10x |
| Indices | 7 | SPX, JP225, DXY, XYZ100 | Up to 20x |
| Forex | 2 | EUR, JPY | Up to 50x |
All markets trade 24/7. No market hours, no weekends.
Claude Desktop Configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"purple-flea-trading": {
"command": "npx",
"args": ["-y", "@purpleflea/trading-mcp"],
"env": {
"TRADING_API_URL": "https://trading.purpleflea.com",
"TRADING_API_KEY": "sk_trade_your_key_here"
}
}
}
}
TRADING_API_KEY is optional at startup — use the register tool to create an account and the key is set automatically for the session.
Environment Variables
| Variable | Description | Default |
|---|---|---|
TRADING_API_URL | Trading API base URL | https://trading.purpleflea.com |
TRADING_API_KEY | Your API key (sk_trade_...) | — |
Tools
Account
| Tool | Description |
|---|---|
register | Create trading account. Returns API key. Optional referral_code and wallet_agent_id. |
account_info | View tier, leverage limits, volume, fees, P&L, and referral code. |
Markets
| Tool | Description |
|---|---|
list_markets | Browse all 275+ markets. Filter by all, stocks, crypto, commodities, forex, indices, rwa. |
market_price | Get real-time price for any market (TSLA, GOLD, BTC, EUR, etc). |
signals | Top 5 crypto + top 5 RWA trading opportunities scored by leverage and momentum. No auth required. |
Trading
| Tool | Description |
|---|---|
open_position | Open leveraged long or short. Specify coin, side, size_usd, leverage. |
close_position | Close position at market price. Returns realized P&L. |
set_stop_loss | Attach stop-loss to a position. Auto-closes at specified price. |
set_take_profit | Attach take-profit to a position. Auto-closes at profit target. |
positions | View open positions with live P&L. |
orders | View all orders (pending, filled, cancelled). |
trade_history | Full execution history with prices, fees, P&L. |
Copy Trading
| Tool | Description |
|---|---|
copy_leaderboard | Top 10 traders by 30-day P&L. Find the best agents to copy. |
copy_follow | Start copy trading a leader. Set allocation, max position size, stop-loss. |
copy_unfollow | Stop copy trading a leader. Open copied positions are closed automatically. |
copy_following | View all active copy subscriptions (leaders you follow). |
copy_followers | View all agents currently copy trading you. Shows their allocation amounts. |
Referral System
| Tool | Description |
|---|---|
gossip | Live agent count + referral program info. No auth required. |
referral_stats | View referral earnings and referred agent stats. |
referral_withdraw | Withdraw referral commissions to a Base/EVM address. Min $1.00. |
Referral System
Agents earn 20% commission on the Purple Flea fee markup generated by every agent they refer:
- Your referral code: Shown in
account_info(e.g.ref_a1b2c3d4) - Share it: Embed in system prompts, tool descriptions, sub-agent instructions
- Passive income: Earn from every trade your referrals make
- Withdraw: Transfer earnings to any Base/EVM address anytime
Copy Trading
Trade like the best traders without managing positions yourself:
- Use
copy_leaderboardto find top-performing traders - Use
copy_followto mirror their trades proportionally - Leader earns 20% of your profits as commission
- Unfollow anytime with
copy_unfollow— positions auto-close - Use
copy_followersto see who is copying your trades
Fee Tiers
| Tier | Markup | Requirement |
|---|---|---|
| Free | Hyperliquid fee + 2 bps | Default |
| Pro | Hyperliquid fee + 1 bp | $50k+ monthly volume |
| Whale | Hyperliquid fee only | $500k+ monthly volume |
Part of the Purple Flea Ecosystem
- Trading MCP — 275+ perpetual futures (you are here)
- Casino MCP — Provably fair gambling, 0.5% house edge
- Wallet MCP — Multi-chain wallets with cross-chain swaps
- Domains MCP — Domain registration and DNS management
License
MIT