coinglass-mcp
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.
README
coinglass-mcp
coinglass-mcp is an MCP server for CoinGlass derivatives data. It exposes funding rates, open interest, long/short ratios, liquidation metrics, and the BTC Bubble Index for LLM workflows that need market structure context.
What It Covers
- Current funding rates across major exchanges
- Funding rate history for one exchange and symbol
- Open interest snapshots and aggregated OI history
- Global long/short account ratio history
- Liquidation summaries and liquidation chart history
- Bitcoin Bubble Index
Why This Server Exists
CoinGlass is useful for derivatives structure, but its API is not ergonomic for agent tool use. This project wraps the API in MCP tools with:
- cleaner tool descriptions
- interval validation
- normalized symbols
- HTTP and stdio transport support
- safer defaults for local deployment
Requirements
- Python 3.11+
- A CoinGlass API key
Get a key from: https://www.coinglass.com/pricing
Quick Start
- Create your local env file:
cp secrets/coinglass.env.example secrets/coinglass.env
-
Fill in
COINGLASS_API_KEYinsecrets/coinglass.env. -
Run locally:
pip install -e .
python -m coinglass_mcp
Docker
docker build -t coinglass-mcp .
docker run --rm -p 38090:38090 --env-file secrets/coinglass.env coinglass-mcp
Claude / Codex MCP Registration
claude mcp add coinglass --transport http http://127.0.0.1:38090/mcp
Tools
| Tool | Purpose |
|---|---|
get_funding_rates |
Current perpetual funding rates across exchanges |
get_funding_rate_history |
Historical funding rates for a symbol on one exchange |
get_open_interest |
Current open interest by exchange |
get_open_interest_history |
Aggregated open interest history |
get_long_short_ratio |
Global long/short account ratio history |
get_liquidation_info |
1h / 4h / 12h / 24h liquidation summary |
get_liquidation_history |
Historical liquidation chart |
get_btc_bubble_index |
BTC Bubble Index for cycle analysis |
Interpreting the Data
| Signal | Typical Interpretation |
|---|---|
| Funding rate > 0.1% | Longs crowded, higher squeeze risk |
| Funding rate < -0.05% | Shorts crowded, rebound or squeeze setup |
| OI rising + price rising | Trend confirmation |
| OI rising + price falling | Short pressure building |
| OI falling | Position unwinding |
| Long/short ratio > 1.5 | Retail long crowding |
| Large long liquidations | Forced selling, can mark local panic |
| Large short liquidations | Short squeeze / forced upside |
Configuration
| Variable | Default | Description |
|---|---|---|
COINGLASS_API_KEY |
required | CoinGlass API key |
COINGLASS_BASE_URL |
https://open-api.coinglass.com |
API base URL |
MCP_TRANSPORT |
http |
http, streamable-http, sse, or stdio |
MCP_HOST |
0.0.0.0 |
Bind host |
PORT |
38090 |
HTTP listen port |
MCP_PATH |
/mcp |
MCP endpoint path |
MCP_ALLOWED_HOSTS |
empty | Extra allowed hosts, comma-separated |
MCP_ALLOWED_ORIGINS |
empty | Extra allowed origins, comma-separated |
Development
Install test dependencies and run tests:
pip install -e ".[test]"
pytest
Security Notes
- Do not commit
secrets/coinglass.env - Prefer using a restricted API key when possible
- Expose the HTTP transport behind your own auth layer if you open it beyond localhost
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。