Trading MCP Server

Cryptocurrency trading and technical analysis tools for Claude Desktop

README.md

Trading MCP Server

MCP (Model Context Protocol) server for cryptocurrency trading with Claude Desktop. Connect to MEXC, Binance, Bybit, and other exchanges via CCXT.

Features

  • 20 Trading Tools for Claude Desktop
  • Multi-Exchange Support via CCXT (MEXC, Binance, Bybit, OKX, and 100+ more)
  • Demo Mode for safe testing
  • Real-time Market Data (tickers, orderbook, OHLCV, spreads)
  • Technical Analysis (RSI, MACD, EMA, Bollinger Bands, Stochastic)
  • Market Scanning (spread detection, TA signals, comprehensive opportunity finder)
  • Order Management (place, cancel, list)
  • Perpetual Futures (leverage, positions, P&L tracking)

Installation

npm install trading-mcp-server

Quick Start

1. Create `.env` file

EXCHANGE=mexc
MEXC_API_KEY=your_api_key
MEXC_SECRET=your_secret
TRADING_MODE=demo
MARKET_TYPE=spot

2. Add to Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "trading": {
      "command": "npx",
      "args": ["trading-mcp-server"],
      "env": {
        "EXCHANGE": "mexc",
        "MEXC_API_KEY": "your_key",
        "MEXC_SECRET": "your_secret",
        "TRADING_MODE": "demo"
      }
    }
  }
}

3. Restart Claude Desktop

Available Tools

Account Tools (2)

Tool Description
get_balance Get account balance (spot or futures)
get_positions Get open futures positions with P&L

Market Data Tools (6)

Tool Description
get_ticker Get current price for spot or perpetual pair
get_multiple_tickers Get ticker data for multiple symbols at once
get_orderbook Get order book depth
get_ohlcv Get historical candlesticks (OHLCV)
get_all_pairs Get all USDT pairs with volume and spread
get_spread Get bid-ask spread for a pair

Order Tools (4)

Tool Description
place_order Place spot or perpetual order (demo mode simulates)
cancel_order Cancel an open order
cancel_all_orders Cancel all open orders (optionally for specific symbol)
get_open_orders List all open orders

Futures Tools (2)

Tool Description
set_leverage Set leverage for perpetual futures (1-125x)
get_leverage Get current leverage setting

Technical Analysis Tools (2)

Tool Description
analyze_symbol_ta Full TA analysis (RSI, MACD, EMA, Bollinger, Stochastic) with buy/sell/hold recommendation
get_indicator Get specific indicator (RSI, MACD, EMA, Bollinger, Stochastic, or all)

Market Scanning Tools (3)

Tool Description
find_ta_signals Scan ALL USDT pairs for TA signals, ranked by confidence
scan_spreads Find wide bid-ask spreads for market-making opportunities
scan_best_opportunities Comprehensive scan combining spread, volume, and TA signals

System Tools (1)

Tool Description
get_mode Get current trading mode (demo/live)

Total: 20 Tools (2 Account + 6 Market + 4 Order + 2 Futures + 2 TA + 3 Scanner + 1 System)

Example Prompts for Claude

Account & Balance

"Show my balance"
"Show my futures balance"
"What are my open positions?"

Spot Trading

"Get the current price of BTC/USDT"
"Show me the top 10 pairs by volume"
"What's the spread on ETH/USDT?"
"Place a $50 market buy for SOL/USDT"

Perpetual Futures Trading

"Set 10x leverage for BTC/USDT:USDT short positions"
"Place a short order for 0.001 BTC/USDT:USDT at $90,000 with 10x leverage"
"Place a limit sell for BTC/USDT:USDT with stop loss at $91,000 and take profit at $88,000"
"Get current leverage for BTC/USDT:USDT"

Technical Analysis

"Run technical analysis on BTC/USDT"
"Find buy signals across all USDT pairs"
"What's the RSI for ETH/USDT on the 1h timeframe?"
"Show me all indicators for SOL/USDT"
"Find the top 10 buy signals with at least 60% confidence"

Market Scanning

"Scan for wide spreads with high volume"
"Find the best trading opportunities right now"
"Show me pairs with spreads above 0.2% and volume over 100k USDT"
"Find opportunities sorted by combined score"

Multi-Timeframe Analysis

"Analyze BTC/USDT across multiple timeframes"
"Find pairs with strong buy signals on 15m and 1h"

Trading Modes

Mode Description
demo Orders are simulated (safe for testing)
live Orders are real (use with caution)

Always start with demo mode!

Technical Analysis

The server includes 5 technical indicators:

Indicator Description Signal Generation
RSI (14) Relative Strength Index Oversold <35, Overbought >65
MACD (12,26,9) Moving Average Convergence Divergence Crossovers and h

Tools 20

get_balanceGet account balance for spot or futures
get_positionsGet open futures positions with P&L
get_tickerGet current price for spot or perpetual pair
get_multiple_tickersGet ticker data for multiple symbols at once
get_orderbookGet order book depth
get_ohlcvGet historical candlesticks (OHLCV)
get_all_pairsGet all USDT pairs with volume and spread
get_spreadGet bid-ask spread for a pair
place_orderPlace spot or perpetual order
cancel_orderCancel an open order
cancel_all_ordersCancel all open orders
get_open_ordersList all open orders
set_leverageSet leverage for perpetual futures
get_leverageGet current leverage setting
analyze_symbol_taFull TA analysis with buy/sell/hold recommendation
get_indicatorGet specific technical indicator
find_ta_signalsScan all USDT pairs for TA signals
scan_spreadsFind wide bid-ask spreads for market-making
scan_best_opportunitiesComprehensive scan combining spread, volume, and TA
get_modeGet current trading mode

Environment Variables

EXCHANGErequiredThe exchange to connect to (e.g., mexc)
MEXC_API_KEYrequiredAPI key for the exchange
MEXC_SECRETrequiredAPI secret for the exchange
TRADING_MODErequiredSet to demo for testing or live for real trading
MARKET_TYPEType of market (spot or futures)

Try it

What are my current open positions and their P&L?
Run technical analysis on BTC/USDT and tell me if I should buy or sell.
Place a market buy order for $50 of SOL/USDT.
Find the top 10 USDT pairs with the strongest buy signals right now.
Scan for trading opportunities with spreads above 0.2% and high volume.

Frequently Asked Questions

What are the key features of Trading MCP Server?

Multi-exchange support for 100+ exchanges via CCXT. Comprehensive technical analysis including RSI, MACD, and Bollinger Bands. Automated market scanning for TA signals and wide spreads. Perpetual futures management including leverage control. Safe demo mode for testing trading strategies.

What can I use Trading MCP Server for?

Automating technical analysis reports for specific crypto pairs. Executing trades based on natural language instructions in Claude. Scanning the entire market for high-spread opportunities for market-making. Monitoring portfolio performance and open positions in real-time.

How do I install Trading MCP Server?

Install Trading MCP Server by running: npm install trading-mcp-server

What MCP clients work with Trading MCP Server?

Trading MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Trading MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare