CoinGlass MCP Server

CoinGlass MCP Server

Provides AI agents access to cryptocurrency derivatives analytics through 22 unified tools covering 80+ CoinGlass API endpoints. Enables analysis of open interest, funding rates, liquidations, whale positions, order book data, and market sentiment indicators with plan-aware feature gating.

Category
访问服务器

README

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

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


Links

  • CoinGlass — Cryptocurrency derivatives analytics
  • FastMCP — Fast, Pythonic MCP server framework
  • MCP Protocol — Model Context Protocol specification

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选