Skip to main content
Glama
MAX Exchange MCP Server

MAX Exchange MCP Server

by nicky512500

MAX Exchange MCP Server

Integrate the MAX Exchange API into AI assistants like Claude via the Model Context Protocol (MCP), allowing AI to directly query market data, manage accounts, and place trades.

Prerequisites

  • Python 3.11+

  • MAX Exchange account and API keys (Apply here)

Related MCP server: hyperliquid-mcp

Installation and Startup

No manual installation required, run directly from GitHub:

uvx --from git+https://github.com/nicky512500/max-mcp maxmcp

Method 2: Local Installation

git clone https://github.com/nicky512500/max-mcp
cd max-mcp
pip install -e .
maxmcp

Environment Variable Configuration

MAX API keys are required. Two methods are supported:

Method 1: .env file (Recommended)

Create a .env file in the project root directory:

MAX_API_KEY=your_access_key
MAX_API_SECRET=your_secret_key

Method 2: System Environment Variables

export MAX_API_KEY=your_access_key
export MAX_API_SECRET=your_secret_key

Public query functions (market data, K-lines, etc.) do not require API keys.

Usage in Claude Desktop

Edit the Claude Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "max-exchange": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/nicky512500/max-mcp", "maxmcp"],
      "env": {
        "MAX_API_KEY": "your_access_key",
        "MAX_API_SECRET": "your_secret_key"
      }
    }
  }
}

Restart Claude Desktop to start using it.

Usage in Claude Code

claude mcp add max-exchange -- uvx --from git+https://github.com/nicky512500/max-mcp maxmcp

Feature Overview

Public Information (No API Key Required)

Tool

Description

get_markets

Get a list of all available trading markets

get_currencies

Get a list of all available currencies

get_timestamp

Get the current MAX server time

get_ticker

Get real-time market data for a single market (latest price, bid/ask, 24h volume)

get_tickers

Get real-time market data for multiple markets (can query multiple at once)

get_depth

Get market depth (order book), up to 300 entries

get_public_trades

Get recent public trade history for a market

get_k

Get K-line (candlestick) data, supports multiple timeframes

K-line timeframes (minutes): 1 / 5 / 15 / 30 / 60 / 120 / 240 / 360 / 720 / 1440

M-Wallet Public Information (No API Key Required)

Tool

Description

get_m_index_prices

Get index prices for M-wallet currencies

get_m_limits

Get borrowing limits for M-wallet

get_m_interest_rates

Get borrowing interest rates for M-wallet currencies

Account Management (API Key Required)

Tool

Description

get_user_info

Get account information (KYC status, account ID, etc.)

get_accounts

Get balances for all currencies (Spot or M-wallet)

get_deposit_address

Get the deposit address for a specific currency

get_withdraw_addresses

Get a list of bound withdrawal addresses

Order Management (API Key Required)

Tool

Description

submit_order

Submit a buy/sell order

get_open_orders

Get a list of currently open orders

get_closed_orders

Get closed orders (filled, cancelled, etc.)

get_orders_history

Get order history paginated by ID sequence

get_order

Query details of a single order

cancel_order

Cancel a single open order

cancel_orders

Batch cancel orders in a specific market

Order types (ord_type): limit / market / stop_limit / stop_market / post_only / ioc_limit

Trade History (API Key Required)

Tool

Description

get_trades

Get personal historical trade records

get_order_trades

Get all trade details for a specific order

Instant Swap (API Key Required)

Tool

Description

submit_convert

Execute instant currency swap

get_convert

Query details of a single instant swap

get_converts

Get instant swap history

Deposits and Withdrawals (API Key Required)

Tool

Description

submit_withdrawal

Submit a cryptocurrency withdrawal request

submit_twd_withdrawal

Submit a TWD withdrawal request

get_withdrawal

Query details of a single withdrawal

get_withdrawals

Get withdrawal history

get_deposit

Query details of a single deposit

get_deposits

Get deposit history

get_internal_transfers

Get internal transfer records (transfers between MAX users)

get_rewards

Get reward records (rebates, airdrops, interest rewards, etc.)

M-Wallet (API Key Required)

Tool

Description

get_m_ad_ratio

Get M-wallet AD ratio (Assets / Debt); liquidation is triggered if below threshold

submit_m_loan

Apply for a loan from M-wallet

get_m_loans

Get M-wallet loan history

submit_m_transfer

Transfer funds between Spot wallet and M-wallet

get_m_transfers

Get M-wallet fund transfer history

submit_m_repayment

Repay loans to M-wallet

get_m_repayments

Get M-wallet repayment history

get_m_liquidations

Get M-wallet liquidation history

get_m_liquidation

Get details of a single M-wallet liquidation

get_m_interests

Get M-wallet interest charge history


Usage Examples

Ask directly in natural language within Claude:

查詢 BTC/USDT 目前的價格
幫我看一下我的現貨帳戶餘額
查詢 btcusdt 最近 10 根 1 小時 K 線
幫我在 btcusdt 以限價 90000 掛買單 0.001 BTC
取消 btcusdt 所有未成交的買單

Important Notes

  • Operations such as withdrawals and placing orders are irreversible; please confirm parameters before execution.

  • Keep API keys secure; do not commit them to version control.

  • M-wallet involves leveraged lending; please monitor your AD ratio to avoid liquidation risks.

Available Tools

45 tools
cancel_orderB

取消單筆掛單 :param order_id: 訂單 ID(與 client_oid 擇一) :param client_oid: 自訂訂單 ID(與 order_id 擇一)

Inputs: order_id, client_oid. Returns: result

cancel_ordersB

批次取消某市場的掛單 :param market: 市場 ID(必填),例如 'btcusdt' :param wallet_type: 錢包類型,'spot' 或 'm',預設 'spot' :param side: 只取消特定方向,'buy' 或 'sell';留空取消雙向

Inputs: market (required), wallet_type, side. Returns: result

get_accountsB

取得帳戶各幣種餘額 :param wallet_type: 錢包類型,'spot'(現貨)或 'm'(M 錢包),預設 'spot' :param currency: 只查特定幣種,例如 'btc';留空查全部

Inputs: wallet_type, currency. Returns: result

get_closed_ordersA

取得已關閉的訂單(已成交、已取消等) :param wallet_type: 錢包類型,'spot' 或 'm',預設 'spot' :param market: 篩選市場;留空查全部 :param limit: 回傳筆數,最多 1000,預設 50 :param state: 狀態篩選,done / cancel / finalizing / failed;留空查全部

Inputs: wallet_type, market, limit, state. Returns: result

get_convertB

查詢單筆閃兌詳情 :param uuid: 兌換單 UUID

Inputs: uuid (required). Returns: result

get_convertsB

取得閃兌歷史記錄 :param limit: 每頁筆數,預設 50 :param page: 頁碼,預設 1

Inputs: limit, page. Returns: result

get_currenciesB

取得 MAX 所有可用貨幣列表

Inputs: no named parameters. Returns: result

get_depositB

查詢單筆存款詳情 :param uuid: 存款 UUID

Inputs: uuid (required). Returns: result

get_deposit_addressA

取得指定幣種的充值地址 :param currency_version: 幣種版本,例如 'eth'、'trc20usdt'、'erc20usdt'

Inputs: currency_version (required). Returns: result

get_depositsB

取得存款歷史記錄 :param currency: 篩選幣種;留空查全部 :param limit: 每頁筆數,預設 50 :param page: 頁碼,預設 1 :param state: 狀態篩選;留空查全部

Inputs: currency, limit, page, state. Returns: result

get_depthA

取得市場深度(掛單簿),顯示買賣雙方的掛單價格與數量 :param market: 市場 ID,例如 'btcusdt' :param limit: 回傳筆數,最多 300,預設 20

Inputs: market (required), limit. Returns: result

get_internal_transfersB

取得平台內部轉帳記錄(MAX 用戶間互轉) :param currency: 篩選幣種;留空查全部 :param limit: 每頁筆數,預設 50 :param page: 頁碼,預設 1 :param side: 'in'(收款)或 'out'(付款);留空查全部

Inputs: currency, limit, page, side. Returns: result

get_kA

取得市場 K 線(蠟燭圖)資料 :param market: 市場 ID,例如 'btcusdt' :param period: K 線週期(分鐘),可選 1/5/15/30/60/120/240/360/720/1440,預設 1 :param limit: 回傳筆數,最多 10000,預設 30

Inputs: market (required), period, limit. Returns: result

get_m_ad_ratioA

取得 M 錢包目前 AD 比率(資產 / 借貸),低於門檻會觸發清算

Inputs: no named parameters. Returns: result

get_marketsA

取得 MAX 所有可用交易市場列表

Inputs: no named parameters. Returns: result

get_m_index_pricesB

取得 M 錢包各幣種指數價格

Inputs: no named parameters. Returns: result

get_m_interest_ratesB

取得 M 錢包各幣種目前借貸利率

Inputs: no named parameters. Returns: result

get_m_interestsB

取得 M 錢包利息計費歷史記錄 :param currency: 篩選幣種;留空查全部 :param limit: 每頁筆數,預設 50 :param page: 頁碼,預設 1

Inputs: currency, limit, page. Returns: result

get_m_limitsA

取得 M 錢包目前可用借貸額度上限

Inputs: no named parameters. Returns: result

get_m_liquidationB

取得單筆 M 錢包清算詳情 :param sn: 清算序號

Inputs: sn (required). Returns: result

get_m_liquidationsB

取得 M 錢包清算歷史記錄 :param limit: 每頁筆數,預設 50 :param page: 頁碼,預設 1

Inputs: limit, page. Returns: result

get_m_loansB

取得 M 錢包借貸歷史記錄 :param currency: 篩選幣種;留空查全部 :param limit: 每頁筆數,預設 50 :param page: 頁碼,預設 1

Inputs: currency, limit, page. Returns: result

get_m_repaymentsB

取得 M 錢包還款歷史記錄 :param currency: 篩選幣種;留空查全部 :param limit: 每頁筆數,預設 50 :param page: 頁碼,預設 1

Inputs: currency, limit, page. Returns: result

get_m_transfersB

取得 M 錢包資金轉移記錄 :param currency: 篩選幣種;留空查全部 :param limit: 每頁筆數,預設 50 :param page: 頁碼,預設 1

Inputs: currency, limit, page. Returns: result

get_open_ordersA

取得目前未成交的掛單列表 :param wallet_type: 錢包類型,'spot' 或 'm',預設 'spot' :param market: 篩選市場,例如 'btcusdt';留空查全部 :param limit: 回傳筆數,最多 1000,預設 50

Inputs: wallet_type, market, limit. Returns: result

get_orderB

查詢單筆訂單詳情 :param order_id: 訂單 ID(與 client_oid 擇一) :param client_oid: 自訂訂單 ID(與 order_id 擇一)

Inputs: order_id, client_oid. Returns: result

get_orders_historyA

依 ID 順序分頁取得訂單歷史(適合完整匯出) :param wallet_type: 錢包類型,'spot' 或 'm',預設 'spot' :param market: 篩選市場;留空查全部 :param from_id: 從指定訂單 ID 開始(用於翻頁) :param limit: 回傳筆數,預設 50

Inputs: wallet_type, market, from_id, limit. Returns: result

get_order_tradesB

取得特定訂單的所有成交明細 :param order_id: 訂單 ID(與 client_oid 擇一) :param client_oid: 自訂訂單 ID(與 order_id 擇一)

Inputs: order_id, client_oid. Returns: result

get_public_tradesA

取得市場最近公開成交記錄(無需登入) :param market: 市場 ID,例如 'btcusdt' :param limit: 回傳筆數,預設 30

Inputs: market (required), limit. Returns: result

get_rewardsA

取得獎勵記錄(返傭、空投、利息獎勵等) :param reward_type: 獎勵類型篩選;留空查全部 :param currency: 篩選幣種;留空查全部 :param limit: 每頁筆數,預設 50 :param page: 頁碼,預設 1

Inputs: reward_type, currency, limit, page. Returns: result

get_tickerA

取得單一市場即時行情(最新成交價、買賣一口價、24h 成交量等) :param market: 市場 ID,例如 'btcusdt'、'ethusdt'

Inputs: market (required). Returns: result

get_tickersA

取得多個市場即時行情,可一次查詢多個 :param markets: 逗號分隔的市場 ID,例如 'btcusdt,ethusdt';留空回傳全部

Inputs: markets. Returns: result

get_timestampA

取得 MAX 伺服器目前時間(Unix 時間戳,秒)

Inputs: no named parameters. Returns: result

get_tradesB

取得個人歷史成交記錄 :param wallet_type: 錢包類型,'spot' 或 'm',預設 'spot' :param market: 篩選市場;留空查全部 :param limit: 回傳筆數,預設 50

Inputs: wallet_type, market, limit. Returns: result

get_user_infoA

取得目前登入帳戶的用戶資訊(KYC 狀態、帳號 ID 等)

Inputs: no named parameters. Returns: result

get_withdraw_addressesB

取得已綁定的提現地址列表 :param currency: 篩選特定幣種,例如 'btc';留空查全部

Inputs: currency. Returns: result

get_withdrawalC

查詢單筆提現詳情 :param uuid: 提現 UUID

Inputs: uuid (required). Returns: result

get_withdrawalsB

取得提現歷史記錄 :param currency: 篩選幣種;留空查全部 :param limit: 每頁筆數,預設 50 :param page: 頁碼,預設 1 :param state: 狀態篩選;留空查全部

Inputs: currency, limit, page, state. Returns: result

submit_convertA

執行幣種閃兌(即時換匯) :param from_currency: 賣出幣種,例如 'usdt' :param to_currency: 買入幣種,例如 'btc' :param from_amount: 賣出金額(與 to_amount 二擇一),例如 '1000' :param to_amount: 買入金額(與 from_amount 二擇一),例如 '0.01'

Inputs: from_currency (required), to_currency (required), from_amount, to_amount. Returns: result

submit_m_loanB

向 M 錢包申請借貸 :param currency: 借貸幣種,例如 'usdt'、'btc' :param amount: 借貸金額(字串),例如 '1000'

Inputs: currency (required), amount (required). Returns: result

submit_m_repaymentB

向 M 錢包還款 :param currency: 還款幣種,例如 'usdt' :param amount: 還款金額(字串),例如 '1000'

Inputs: currency (required), amount (required). Returns: result

submit_m_transferA

在現貨錢包與 M 錢包之間轉移資金 :param currency: 幣種,例如 'usdt' :param amount: 金額(字串),例如 '500' :param side: 方向,'in' = 轉入 M 錢包,'out' = 從 M 錢包轉出

Inputs: currency (required), amount (required), side (required). Returns: result

submit_orderB

提交買賣訂單 :param market: 市場 ID,例如 'btcusdt' :param side: 方向,'buy' 或 'sell' :param volume: 交易數量(字串),例如 '0.001' :param price: 限價(字串),市價單可省略 :param ord_type: 訂單類型,limit / market / stop_limit / stop_market / post_only / ioc_limit,預設 limit :param wallet_type: 錢包類型,'spot' 或 'm',預設 'spot' :param stop_price: 止損觸發價,stop 系列訂單需填 :param client_oid: 自訂訂單 ID(最長 36 字元)

Inputs: market (required), side (required), volume (required), price, +4 more. Returns: result

submit_twd_withdrawalB

提交台幣(TWD)出金申請 :param amount: 出金金額(字串),例如 '10000'

Inputs: amount (required). Returns: result

submit_withdrawalA

提交加密貨幣提現申請 :param withdraw_address_uuid: 提現地址 UUID(先用 get_withdraw_addresses 取得) :param amount: 提現金額(字串),例如 '100'

Inputs: withdraw_address_uuid (required), amount (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 45 tools

    Disambiguation4/5

    Tools are generally well-distinguished by resource type and action (e.g., singular vs. plural, spot vs. M-wallet prefixes). Minor potential confusion exists between get_order and get_open_orders/get_closed_orders, but parameter differences (ID lookup vs. state filtering) clarify intent.

    Naming Consistency4/5

    Excellent snake_case consistency with clear verb_noun patterns (get_*, submit_*, cancel_*). All margin wallet tools use the m_ prefix predictably. Minor deduction for get_k being cryptic (should be get_klines or get_candles) and get_m_ad_ratio using unexplained abbreviation.

    Tool Count2/5

    With 45 tools, the surface far exceeds the rubric's 25+ threshold for 'too many.' The count is inflated by numerous singular/plural pairs (get_order/get_orders, get_deposit/get_deposits) that could have been consolidated with optional parameters, creating unnecessary bloat for an agent to navigate.

    Completeness4/5

    Extremely comprehensive coverage of exchange operations including spot trading, margin (M-wallet) lifecycle, deposits/withdrawals, and market data. Minor gaps exist (e.g., no submit_internal_transfer to match get_internal_transfers, no cancel_withdrawal), but core workflows are fully supported.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to perform cryptocurrency trading analysis and execution with 38+ tools including real-time market data, technical indicators, risk management, and support for both paper trading and live execution on Hyperliquid.
      7
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to securely trade on Hyperliquid perpetual exchange, including order placement, position management, market data retrieval, and vault operations via natural language.
      23 PyPI
      24
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to trade on MetaTrader 5 using natural language, supporting account management, order placement, and real-time market data.
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI tools to execute trades and fetch market data across six crypto exchanges via natural language or API, with dual Telegram and MCP interfaces.
      2
      -