Skip to main content
Glama
CoinGlass MCP Server

CoinGlass MCP Server

by forgequant

CoinGlass MCP Server

Python 3.11+ FastMCP License: MIT Code style: ruff Tests

MCP server for CoinGlass cryptocurrency derivatives analytics. Provides AI agents access to 80+ API endpoints through 22 unified tools.


Features

  • 22 MCP Tools — Unified interface to 80+ CoinGlass API endpoints

  • Plan-Aware Gating — Automatic feature restrictions based on subscription tier

  • Response Caching — Built-in caching via FastMCP middleware (60s TTL)

  • Retry Logic — Automatic retries for transient failures (5xx, timeouts)

  • Type-Safe — Full type hints with Literal-typed actions for LLM clarity

  • Async-First — Built on httpx + FastMCP for high performance


Related MCP server: coinglass-mcp

Quick Start

Installation

pip install coinglass-mcp

Or with uv:

uv pip install coinglass-mcp

Configuration

export COINGLASS_API_KEY="your-api-key"
export COINGLASS_PLAN="standard"  # hobbyist | startup | standard | professional | enterprise

Get your API key at coinglass.com/pricing

Run

coinglass-mcp

Claude Desktop Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "coinglass": {
      "command": "coinglass-mcp",
      "env": {
        "COINGLASS_API_KEY": "your-api-key",
        "COINGLASS_PLAN": "standard"
      }
    }
  }
}

Available Tools

Category

Tool

Description

Market

coinglass_market_info

Supported coins, pairs, exchanges

coinglass_market_data

Real-time market summaries

coinglass_price_history

OHLC price candles

Open Interest

coinglass_oi_history

OI OHLC (pair/aggregated/stablecoin/coin-margin)

coinglass_oi_distribution

OI breakdown by exchange

Funding

coinglass_funding_history

Funding rate OHLC

coinglass_funding_current

Current rates, accumulated, arbitrage

Long/Short

coinglass_long_short

Global ratio, top accounts, top positions

Liquidation

coinglass_liq_history

Liquidation OHLC history

coinglass_liq_orders

Real-time liquidation stream ⚡

coinglass_liq_heatmap

Liquidation heatmaps 🔥

Order Book

coinglass_ob_history

Bid/ask depth history

coinglass_ob_large_orders

Whale walls detection

Whale

coinglass_whale_positions

Hyperliquid whale positions ⚡

coinglass_whale_index

Whale activity index

Taker

coinglass_taker

Taker buy/sell volume and ratio

Spot

coinglass_spot

Spot market data and prices

Options

coinglass_options

Max pain, OI, volume (BTC/ETH)

On-Chain

coinglass_onchain

Exchange balances, flows, transfers

ETF

coinglass_etf

Bitcoin/Ethereum ETF flows

coinglass_grayscale

Grayscale holdings and premium

Indicators

coinglass_indicators

RSI, Fear & Greed, Rainbow, Pi Cycle, etc.

Meta

coinglass_search

Discover tools by keyword

coinglass_config

View exchanges, intervals, features

⚡ Requires Startup+ plan | 🔥 Requires Professional+ plan


Plan Features

Feature

Hobbyist

Startup

Standard

Professional

Basic intervals (h4, h8, d1)

✅

✅

✅

✅

Extended intervals (m1-h1)

❌

✅

✅

✅

Whale alerts & positions

❌

✅

✅

✅

Liquidation orders stream

❌

❌

✅

✅

Liquidation heatmaps

❌

❌

❌

✅


Usage Examples

Market Overview

# Get all coins summary
coinglass_market_data(action="coins_summary")

# Get BTC metrics only
coinglass_market_data(action="coins_summary", symbol="BTC")

Open Interest Analysis

# BTC OI across all exchanges
coinglass_oi_history(action="aggregated", symbol="BTC")

# OI distribution by exchange
coinglass_oi_distribution(action="by_exchange", symbol="BTC")

Funding Rate Arbitrage

# Current funding rates
coinglass_funding_current(action="rates")

# Find arbitrage opportunities
coinglass_funding_current(action="arbitrage")

Whale Tracking

# Recent whale alerts (Hyperliquid)
coinglass_whale_positions(action="alerts")

# Large BTC positions
coinglass_whale_positions(action="positions", symbol="BTC")

Market Sentiment

# Fear & Greed Index
coinglass_indicators(action="fear_greed")

# Bitcoin Rainbow Chart
coinglass_indicators(action="rainbow")

Tool Discovery

# Search for liquidation-related tools
coinglass_search(query="liquidation")

# Check available features for your plan
coinglass_config(action="plan_features")

Architecture

coinglass-mcp/
├── src/coinglass_mcp/
│   ├── server.py    # FastMCP server + 22 tools
│   ├── client.py    # HTTP client with retry logic
│   └── config.py    # Plan tiers, intervals, features
├── tests/
│   ├── test_client.py
│   └── test_tools.py
└── pyproject.toml

Design Principles:

  • 3-file architecture — Optimized for AI agent comprehension

  • Domain facade pattern — 22 tools → 80+ endpoints

  • Literal-typed actions — Helps LLMs select correct operations

  • Lifespan pattern — Shared httpx.AsyncClient for efficiency


Development

Setup

git clone https://github.com/forgequant/coinglass-mcp.git
cd coinglass-mcp
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"

Testing

pytest -v
======================== 45 passed in 0.69s ========================

Run Locally

export COINGLASS_API_KEY="your-key"
python -m coinglass_mcp.server

FastMCP Cloud Deployment

Entry point: coinglass_mcp.server:mcp

Environment variables:

  • COINGLASS_API_KEY — Your CoinGlass API key

  • COINGLASS_PLAN — Subscription tier (default: standard)


API Reference

Full CoinGlass API documentation: open-api.coinglass.com


License

MIT


  • CoinGlass — Cryptocurrency derivatives analytics

  • FastMCP — Fast, Pythonic MCP server framework

  • MCP Protocol — Model Context Protocol specification

Available Tools

24 tools
coinglass_bitfinex_longs_shortsCoinGlass Bitfinex MarginA
Read-onlyIdempotent

Get Bitfinex margin long/short data.

Shows margin positions on Bitfinex exchange. Useful for gauging sentiment among margin traders.

Examples: - BTC margin positions: symbol="BTC" - ETH margin positions: symbol="ETH"

Inputs: symbol. Returns: object

coinglass_configCoinGlass ConfigA
Read-onlyIdempotent

Get CoinGlass configuration and metadata.

Useful for understanding available options and current limits.

Examples: - List exchanges: action="exchanges" - Check intervals: action="intervals" - See plan features: action="plan_features"

Inputs: action (required). Returns: object

coinglass_etfCoinGlass ETFA
Read-onlyIdempotent

Get crypto ETF data (Bitcoin & Ethereum).

Track institutional flows through ETFs:

  • Positive flows: Institutional buying (bullish)

  • Negative flows: Institutional selling (bearish)

Examples: - List Bitcoin ETFs: action="list", asset="bitcoin" - Daily flows: action="flows", asset="bitcoin" - IBIT premium: action="premium", ticker="IBIT"

Inputs: action (required), asset, ticker, region, +2 more. Returns: object

coinglass_funding_currentCoinGlass Current FundingA
Read-onlyIdempotent

Get current funding rate data across exchanges.

  • rates: Current funding rates by exchange

  • accumulated: Cumulative funding over time

  • arbitrage: Funding rate arbitrage opportunities between exchanges

Examples: - All current rates: action="rates" - BTC rates only: action="rates", symbol="BTC" - Find arbitrage: action="arbitrage"

Inputs: action (required), symbol. Returns: object

coinglass_funding_historyCoinGlass Funding HistoryA
Read-onlyIdempotent

Get funding rate OHLC history.

Funding rates are periodic payments between long and short traders. Positive rate = longs pay shorts (bullish sentiment). Negative rate = shorts pay longs (bearish sentiment).

Required params by action: - pair: exchange + pair - oi_weighted/vol_weighted: symbol

Examples: - BTC OI-weighted funding: action="oi_weighted", symbol="BTC" - Binance BTCUSDT funding: action="pair", exchange="Binance", pair="BTCUSDT"

Inputs: action (required), symbol, exchange, pair, +2 more. Returns: object

coinglass_grayscaleCoinGlass GrayscaleA
Read-onlyIdempotent

Get Grayscale fund data.

Grayscale premium/discount indicates institutional sentiment:

  • Premium: Strong demand (bullish)

  • Discount: Weak demand or selling pressure

Examples: - All Grayscale holdings: action="holdings" - GBTC premium history: action="premium", fund="GBTC", range="90d"

Inputs: action (required), fund, range. Returns: object

coinglass_indicatorsCoinGlass IndicatorsA
Read-onlyIdempotent

Get market indicators and on-chain metrics.

Indicators help identify market cycles:

  • fear_greed: 0-100 (extreme fear to extreme greed)

  • rainbow: Price band indicator for Bitcoin

  • pi_cycle: Bitcoin cycle top indicator

Most indicators are BTC-only. rsi returns all coins. borrow_rate requires symbol + exchange.

Examples: - Fear & Greed: action="fear_greed" - RSI all coins: action="rsi" - BTC rainbow: action="rainbow"

Inputs: action (required), symbol, exchange, interval, +2 more. Returns: object

coinglass_liq_heatmapCoinGlass Liquidation HeatmapA
Read-onlyIdempotent

Get liquidation heatmap/map visualization data.

Heatmaps show where liquidations are concentrated at different price levels. Useful for identifying potential support/resistance and cascade zones.

Note: Requires Professional+ plan.

Examples: - BTC liquidation heatmap: action="coin_heatmap", symbol="BTC", range="7d"

Inputs: action (required), symbol, exchange, pair, +2 more. Returns: object

coinglass_liq_historyCoinGlass Liquidation HistoryA
Read-onlyIdempotent

Get liquidation history data.

Liquidations occur when a trader's position is forcibly closed due to insufficient margin. Large liquidation clusters can indicate support/resistance.

Examples: - BTC liquidations: action="aggregated", symbol="BTC" - All coins summary: action="by_coin" - By exchange: action="by_exchange"

Inputs: action (required), symbol, exchange, pair, +2 more. Returns: object

coinglass_liq_ordersCoinGlass Liquidation OrdersA
Read-onlyIdempotent

Get real-time liquidation orders stream.

Returns recent liquidation orders as they happen. Useful for monitoring market stress and potential cascade liquidations.

Note: Requires Standard+ plan.

Examples: - All recent liquidations: (no params) - BTC longs only: symbol="BTC", side="long"

Inputs: symbol, side, limit. Returns: object

coinglass_long_shortCoinGlass Long/Short RatioA
Read-onlyIdempotent

Get long/short ratio data.

Long/short ratio shows market sentiment:

  • Ratio > 1: More traders are long (bullish sentiment)

  • Ratio < 1: More traders are short (bearish sentiment)

Actions: - global: Overall account ratio - top_accounts: Top traders by number of accounts - top_positions: Top traders by position size - taker_ratio: Taker buy/sell volume ratio

Examples: - BTC L/S on Binance: exchange="Binance", pair="BTCUSDT", action="global"

Inputs: action (required), exchange (required), pair (required), interval, +1 more. Returns: object

coinglass_market_dataCoinGlass Market DataA
Read-onlyIdempotent

Get real-time market data summaries from CoinGlass.

Returns aggregated market metrics including price, open interest, volume, and funding rates. Data is updated frequently (30 second cache).

Note: coins_summary requires symbol parameter.

Examples: - BTC metrics: action="coins_summary", symbol="BTC" - All pairs: action="pairs_summary" - Price changes: action="price_changes"

Inputs: action (required), symbol. Returns: object

coinglass_market_infoCoinGlass Market InfoA
Read-onlyIdempotent

Get static market metadata from CoinGlass.

Returns lists of supported coins, trading pairs by exchange, or exchanges. This data is relatively static and cached for 5 minutes.

Examples: - Get all futures coins: action="coins" - Get Binance pairs: action="pairs", exchange="Binance" - List all exchanges: action="exchanges"

Inputs: action (required), exchange. Returns: object

coinglass_ob_historyCoinGlass Order Book HistoryA
Read-onlyIdempotent

Get order book depth history.

Shows historical bid/ask depth at various price levels. The bid/ask ratio can indicate buying or selling pressure.

Examples: - BTC depth on Binance: action="pair_depth", exchange="Binance", pair="BTCUSDT" - Aggregated BTC depth: action="coin_depth", symbol="BTC"

Inputs: action (required), symbol, exchange, pair, +3 more. Returns: object

coinglass_ob_large_ordersCoinGlass Large OrdersA
Read-onlyIdempotent

Get large limit orders (whale walls).

Detects significant limit orders that may act as support/resistance. Thresholds: BTC >= $1M, ETH >= $500K, others >= $50K.

Examples: - Current whale walls: action="current" - Historical large orders: action="history"

Inputs: action (required), exchange, pair, limit. Returns: object

coinglass_oi_distributionCoinGlass OI DistributionA
Read-onlyIdempotent

Get Open Interest distribution across exchanges.

Shows how OI is distributed among different exchanges, useful for understanding market concentration and finding arbitrage opportunities.

Examples: - BTC OI by exchange: action="by_exchange", symbol="BTC" - Historical distribution: action="exchange_chart", symbol="BTC", range="24h"

Inputs: action (required), symbol (required), range. Returns: object

coinglass_oi_historyCoinGlass Open Interest HistoryA
Read-onlyIdempotent

Get Open Interest OHLC history.

Open Interest represents the total number of outstanding derivative contracts. Rising OI with rising price = bullish, Rising OI with falling price = bearish.

Required params by action: - pair: exchange + pair - aggregated/stablecoin/coin_margin: symbol

Examples: - BTC OI across all exchanges: action="aggregated", symbol="BTC" - Binance BTCUSDT OI: action="pair", exchange="Binance", pair="BTCUSDT"

Inputs: action (required), symbol, exchange, pair, +2 more. Returns: object

coinglass_onchainCoinGlass On-ChainA
Read-onlyIdempotent

Get on-chain exchange data.

Track exchange holdings and flows:

  • Increasing exchange balance: Potential selling pressure

  • Decreasing exchange balance: Accumulation (bullish)

Examples: - All exchange holdings: action="assets" - BTC balances: action="balance_list", asset="BTC" - Balance history: action="balance_chart", asset="BTC", exchange="Binance"

Inputs: action (required), exchange, asset, range, +2 more. Returns: object

coinglass_optionsCoinGlass OptionsA
Read-onlyIdempotent

Get options market data from Deribit, OKX, Binance, Bybit.

Options data helps understand market expectations:

  • Max pain: Price where most options expire worthless

  • Put/Call ratio: Sentiment indicator

Examples: - BTC max pain: action="max_pain", symbol="BTC" - Options OI: action="info", symbol="ETH"

Inputs: action (required), symbol (required), range. Returns: object

coinglass_price_historyCoinGlass Price HistoryA
Read-onlyIdempotent

Get historical OHLC price data for a specific trading pair.

Returns candlestick data with timestamp, open, high, low, close, and volume. Useful for technical analysis and charting.

Note: Smaller intervals (m1, m5, m15) require Standard+ plan.

Examples: - Hourly BTC: exchange="Binance", pair="BTCUSDT", interval="h1" - Daily ETH: exchange="OKX", pair="ETHUSDT", interval="d1"

Inputs: exchange (required), pair (required), interval (required), limit. Returns: object

coinglass_spotCoinGlass Spot MarketA
Read-onlyIdempotent

Get spot market data.

Access spot market information including supported coins, trading pairs, market summaries, and historical prices.

Examples: - List spot coins: action="coins" - Spot market data: action="coins_markets" - Price history: action="price_history", exchange="Binance", pair="BTCUSDT", interval="h1"

Inputs: action (required), symbol, exchange, pair, +2 more. Returns: object

coinglass_takerCoinGlass Taker VolumeA
Read-onlyIdempotent

Get taker buy/sell volume data.

Taker volume shows market order activity:

  • Buy ratio > 0.5: More aggressive buying (bullish)

  • Buy ratio < 0.5: More aggressive selling (bearish)

Examples: - BTC taker volume: action="coin_history", symbol="BTC" - By exchange: action="by_exchange", symbol="BTC"

Inputs: action (required), symbol, exchange, pair, +3 more. Returns: object

coinglass_whale_positionsCoinGlass Whale PositionsA
Read-onlyIdempotent

Track whale activity on Hyperliquid.

Monitor large traders' positions and activity. Useful for following smart money and identifying potential market moves.

Note: Requires Startup+ plan.

Examples: - Recent whale alerts: action="alerts" - Large BTC positions: action="positions", symbol="BTC" - Track specific wallet: action="all_positions", user="0x..."

Inputs: action (required), symbol, user, page. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 24 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific crypto market data categories (e.g., funding, open interest, liquidations, ETFs). Some overlap exists between tools like coinglass_market_data and coinglass_spot for market summaries, and coinglass_liq_history and coinglass_liq_orders for liquidation data, but their descriptions clarify the differences (historical vs. real-time, aggregated vs. stream).

    Naming Consistency5/5

    All tools follow a consistent 'coinglass_' prefix with descriptive snake_case naming (e.g., coinglass_funding_current, coinglass_oi_history). The pattern is uniform across all 24 tools, making them easily identifiable and predictable for an agent.

    Tool Count3/5

    With 24 tools, the count is borderline high for a single server, but it aligns with the broad scope of crypto market data coverage (funding, open interest, liquidations, ETFs, options, etc.). It feels slightly heavy but not excessive, as each tool serves a specific data category within the domain.

    Completeness5/5

    The tool set comprehensively covers the crypto market data domain, including funding rates, open interest, liquidations, ETFs, on-chain metrics, options, spot/futures data, and metadata. There are no obvious gaps; tools like coinglass_search even help discover operations, ensuring agents can navigate the surface effectively.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Connects AI agents to real-time crypto market data, covering market health scores, derivatives, ETF flows, and BTC cycle indicators. It provides 13 specialized tools for structured market analysis, sentiment tracking, and monitoring macro-economic indicators.
      13
      13 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides access to CoinGlass cryptocurrency derivatives data, including funding rates, open interest, and liquidation metrics. It enables LLMs to analyze real-time and historical market structure context through a standardized toolset.
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides futures market analytics (Open Interest, Liquidations, Long/Short Ratio, Funding Rates) via the CoinGlass API v4, enabling natural language queries for crypto derivatives data.
      7
      25 npm
      13
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude to access real-time CoinGlass market data for Binance and MEXC, including open interest, funding rates, CVD/taker volume, long-short ratios, and liquidations.
      -