
硬币玻璃平台的 MCP 服务器
概览
该项目为CoinGlass API(v4)执行一个模式背景协议服务器(MCP). 它让与MCP兼容的客户端(AI助手,IDE扩展,或自定义应用)访问期货市场分析,如开放利息,清算,长/短比率,以及供资率等. 服务器曝光了MCP客户端可以调用的以下工具: 1. - COINGLAS OPEN INTEREST:打开一个符号的利息交换列表;可选的历史 - 参数:符号(字符串),交换? (弦),包括历史? (boolean),期限? ("1h""4h""12h""24h") - COINGLASS LIQUIDATIONS PAIR:历史对等清算(v4/api/未来/清算/历史) - 参数:交换(字符串),符号(字符串),间隔? ("1m""3m""5m"?) 15m"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""?
概述(AI 翻译)
该项目为CoinGlass API(v4)执行一个模式背景协议服务器(MCP). 它让与MCP兼容的客户端(AI助手,IDE扩展,或自定义应用)访问期货市场分析,如开放利息,清算,长/短比率,以及供资率等.
□ 特性( MCP 工具)
服务器曝光了MCP客户端可以调用的以下工具: 1.
-
COINGLAS OPEN INTEREST:打开一个符号的利息交换列表;可选历史
-
参数:符号(字符串),交换? (弦),包括历史? (boolean),时期? (“1h”“4h”“12h”“24h”).
-
清算(v4/api/未来/清算/历史)
-
参数:交换(字符串),符号(字符串),间隔? (“1m”+“3m”+“5m”+“15m”+“30m”+“1h”+“4h”+“6h”+“8h”+“12h”+“1d”+“1w”),限制?,开始 时间?,结束 时间?,漂亮Format? (默认:真实)
-
COINGLAS LIQUIDATIONS COIN:硬币总清算(v4/api/未来/清算/汇总-历史)
-
参数:交换列表(字符串)、符号(字符串)、间隔? (和上面一样) 限制 ?, 开始时间 ?, 结束时间 ?, 漂亮格式 ? (默认:真实) 全球账户长/短比例快照
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP-Coinglass
This project implements a Model Context Protocol (MCP) server for the CoinGlass API (v4). It lets MCP-compatible clients (AI assistants, IDE extensions, or custom apps) access futures market analytics such as Open Interest, Liquidations, Long/Short Ratio, and Funding Rates.
Features (MCP Tools)
The server exposes the following tools that MCP clients can call:
-
COINGLASS_OPEN_INTEREST: Open interest exchange list for a symbol; optional history
- Parameters: symbol (string), exchange? (string), includeHistory? (boolean), period? (“1h” | “4h” | “12h” | “24h”)
-
COINGLASS_LIQUIDATIONS_PAIR: Historical pair liquidations (v4 /api/futures/liquidation/history)
- Parameters: exchange (string), symbol (string), interval? (“1m”|“3m”|“5m”|“15m”|“30m”|“1h”|“4h”|“6h”|“8h”|“12h”|“1d”|“1w”), limit?, start_time?, end_time?, prettyFormat? (default: true)
-
COINGLASS_LIQUIDATIONS_COIN: Aggregated coin liquidations (v4 /api/futures/liquidation/aggregated-history)
- Parameters: exchange_list (string), symbol (string), interval? (same as above), limit?, start_time?, end_time?, prettyFormat? (default: true)
-
COINGLASS_LONG_SHORT_RATIO: Global account long/short ratio snapshot
- Parameters: symbol (string), exchange? (string), period? (“1h” | “4h” | “12h” | “24h”), prettyFormat? (boolean, default: true)
-
COINGLASS_FUNDING_RATE: Current funding rate across exchanges
- Parameters: symbol (string), exchange? (string), prettyFormat? (boolean, default: true)
-
COINGLASS_HYPERLIQUID_WHALE_ALERT: Real-time Hyperliquid whale alerts (>$1M)
-
Parameters: prettyFormat? (boolean, default: true)
-
COINGLASS_HYPERLIQUID_WHALE_POSITION: Real-time Hyperliquid whale positions (>$1M)
-
Parameters: prettyFormat? (boolean, default: true)
Tool call responses always return a success code even in case of api errors. In case of error tool response includes the raw api response.
Prerequisites
- Node.js v20+ (CI uses Node 22)
- pnpm (https://pnpm.io/installation)
Installation
There are a few ways to run mcp-coinglass:
- Using pnpm dlx (recommended for most MCP client setups)
Run the published package directly without a global install. See the MCP client config example below.
- Global installation from npm (via pnpm)
pnpm add -g mcp-coinglass
- Building from source (development)
pnpm install
pnpm run build
pnpm run start
- For testing and development purposes use mcp inspector
# in the project root run,
pnpm run build
npx @modelcontextprotocol/inspector node dist/index.js
Configuration (Environment Variables)
This server requires a CoinGlass API key. All CoinGlass v4 endpoints require the CG-API-KEY header. Generate your API key from your account dashboard and supply it via environment variables. References:
- Authentication docs: https://docs.coinglass.com/reference/authentication
- Account/API key dashboard: https://www.coinglass.com/account
安装
npx @modelcontextprotocol/inspector node dist/index.js配置
{
"mcpServers": {
"coinglass-mcp-server": {
"command": "pnpm",
"args": ["dlx", "mcp-coinglass"],
"env": {
"COINGLASS_API_KEY": "your_api_key_here"
}
}
}
}