Connect CoinGlass MCP (Model Context Protocol) and your AI model or agent can query CoinGlass data directly and generate analysis, without developers first reading through the endpoint docs and hand-writing request code.
| Item | Details |
|---|---|
| Server URL | https://api-mcp.coinglass.com/mcp |
| Connection | Remote MCP (HTTP); provide your API Key in the CG-API-KEY header of your configuration |
| Supported clients | Cursor, Claude Desktop, Claude Code, Devin Desktop (formerly Windsurf), VS Code, MCP Inspector and more |
| Number of tools | Tool names and parameters are returned by tools/list; Beta |
| Quota | MCP requests count toward your API Key's quota, shared with the REST API |
What Can AI Do with CoinGlass MCP?
With CoinGlass MCP, AI agents can:
- Query funding rate trends
- Monitor open interest changes
- Analyze liquidation distribution
- Track changes in long and short positions
- Detect market overheating or panic
- View ETF inflows and outflows
- Monitor changes in exchange open interest
- Automatically summarize market trends
- Generate daily market analysis
- Build market monitoring bots
- Build trading signal systems
With MCP, AI can directly understand the CoinGlass API, without developers having to manually read complex API documentation.
Quick Start: Connect in Three Steps
CoinGlass MCP Server URL:
https://api-mcp.coinglass.com/mcp
To execute API requests, you need to provide your CoinGlass API Key in the MCP configuration.
- Get Your API Key Ready: MCP uses your existing API Key and your API plan's permissions. If you do not have one yet, see Quickstart first.
- Add the MCP Configuration: Under “MCP Configuration” below, choose the tool you use and add the configuration to it.
- Ask a Test Question: Once the configuration takes effect (some tools need a restart), ask a question in natural language, e.g., “What were total BTC liquidations across all exchanges in the last 24 hours, and how much of that was longs vs. shorts?” If a
coinglass-apitool call appears before the answer, the connection is working.
MCP Configuration
CoinGlass MCP is a remote MCP service, so any tool that supports connecting to MCP over HTTP can use it. Each tool's configuration syntax changes as the tool is updated; the tool's official documentation takes precedence.
Step 1: Install and Open Cursor
If you have not installed Cursor, visit:
https://cursor.shDownload and install Cursor, then launch the application.
Step 2: Create the MCP Configuration File
Cursor automatically reads a configuration file named mcp.json.
We recommend creating the following file in your project directory:
.cursor/mcp.jsonExample directory structure:
your-project
├── .cursor
│ └── mcp.json
├── src
└── README.mdYou can also use a global configuration (applies to all Cursor projects):
~/.cursor/mcp.jsonStep 3: Add the CoinGlass MCP Configuration
Add the following to your mcp.json file:
{
"mcpServers": {
"coinglass-api": {
"url": "https://api-mcp.coinglass.com/mcp",
"headers": {
"CG-API-KEY": "YOUR_API_KEY"
}
}
}
}Replace YOUR_API_KEY with your CoinGlass API Key.
Step 4: Restart Cursor
Save the file, then close and reopen Cursor.
Cursor will automatically load the MCP configuration.
Step 1: Install Devin Desktop
Windsurf is now Devin Desktop. New users can download it from the official website; existing Windsurf users can keep their installed version or update.
The configuration below is for Cascade. For Devin Local, follow the official Devin MCP configuration guide.
Step 2: Locate the MCP Configuration File
Open the … (Actions) menu at the top right of the Cascade panel, select Open MCP config file in the MCPs section, and edit the file it opens. See the official Cascade guide for the entry point and configuration location.
Older Windsurf versions use this path:
~/.codeium/windsurf/mcp_config.jsonStep 3: Add the CoinGlass MCP Configuration
Add the following to mcp_config.json:
{
"mcpServers": {
"coinglass-api": {
"url": "https://api-mcp.coinglass.com/mcp",
"headers": {
"CG-API-KEY": "YOUR_API_KEY"
}
}
}
}Replace YOUR_API_KEY with your CoinGlass API Key.
Step 4: Restart the App
After saving the configuration file, restart Devin Desktop or your installed Windsurf version so the MCP configuration takes effect.
Claude Desktop connects to remote MCP services through a custom connector, which you add in the app's settings. You do not need to edit a configuration file.
Step 1: Install Claude Desktop
If you have not installed Claude Desktop, visit:
https://claude.ai/downloadDownload and install Claude Desktop, then sign in to your Claude account.
Step 2: Open Connector Settings
In Claude Desktop, go to Customize → Connectors.
Step 3: Add a Custom Connector
Click Add, hover over Custom, select Web, and enter:
- Connector name:
coinglass-api - Remote MCP server URL:
https://api-mcp.coinglass.com/mcp
Click Continue.
Step 4: Add Your API Key
- Under Authentication, choose No sign in. CoinGlass MCP authenticates with your API Key, so no sign-in is needed.
- Under Request headers, add a header named
CG-API-KEYwith your CoinGlass API Key as the value.
Click Add to finish.
Step 5: Enable and Test
Open the + menu in the lower-left corner of the chat input, make sure coinglass-api is turned on under Connectors, and ask a question to test it.
NoteCustom connectors connect to the CoinGlass MCP service from Anthropic's cloud. Free Claude accounts can add up to one custom connector. Interface names may change between Claude Desktop versions; Claude's official guide takes precedence.
Run the following command once in your terminal, then type /mcp in Claude Code to check the connection status:
claude mcp add --transport http coinglass-api \
https://api-mcp.coinglass.com/mcp \
--header "CG-API-KEY: YOUR_API_KEY"Replace YOUR_API_KEY with your CoinGlass API Key.
Create .vscode/mcp.json in your project, add the following content, then enable it in the tools list of Copilot Chat:
{
"servers": {
"coinglass-api": {
"type": "http",
"url": "https://api-mcp.coinglass.com/mcp",
"headers": {
"CG-API-KEY": "YOUR_API_KEY"
}
}
}
}Replace YOUR_API_KEY with your CoinGlass API Key.
Suited to development and debugging. Run the following command to start MCP Inspector, choose Streamable HTTP, enter the server URL https://api-mcp.coinglass.com/mcp and the CG-API-KEY header, then click Connect to view and try out all tools:
npx @modelcontextprotocol/inspectorSupported MCP Clients
CoinGlass MCP can be used with a variety of AI tools, including:
- Claude Desktop
- Cursor
- Windsurf
- VSCode
- Claude Code CLI
- Open Code CLI
- Google Gemini CLI
- MCP Inspector
- Cline
- OpenClaw (via MCPorter)
We recommend Cursor or Claude Desktop for a quick first try.
Test the MCP Connection
After completing the configuration:
- Open your AI client (Cursor, Claude, Windsurf)
- Start a new AI chat
- Enter a CoinGlass query
If a coinglass-api tool call appears before the answer, the data was queried in real time through MCP.
Example Queries
These examples use tools present in the tool directory. Ask the AI to include both the returned data timestamps and the query time.
| Task | Prompt |
|---|---|
| Liquidations by exchange | Call get_futures_liquidation_exchange_list with symbol=BTC, range=24h. List long and short liquidation amounts by exchange for the last 24 hours. |
| Funding rates | Call get_futures_funding_rate_exchange_list with exchange=Binance. List ETH funding rates and their contracts from the response. |
| Latest price candles | Call get_futures_price_history with exchange=Binance, symbol=BTCUSDT, interval=1h, limit=24. List the latest 24 candles, their first and last timestamps, and any unfinished interval. |
| ETF flows | Call get_bitcoin_etf_flow_history. List the latest 7 records and their dates; do not assume that the latest record is for today. |
| Whale positions | Call get_hyperliquid_whale_positions. Rank the top 10 positions by size, showing direction, size and unrealized PnL for each position. |
Liquidation heatmaps, order book depth, the Fear and Greed Index, funding-rate arbitrage, ETF net assets and wallet PnL distributions currently have no corresponding MCP tools. Use the REST APIs documented on their endpoint pages. For a specific historical date range, follow the time-filter limitation below.
Use Cases and Examples
Use the exchange liquidation list with range=24h to summarize BTC long and short liquidation amounts by exchange.
Retrieve Bitcoin or Ethereum ETF flow history and organize the latest records by their returned dates.
Specify an exchange and compare the current funding rates of contracts in its returned list.
Inspect the direction, size and unrealized PnL of current whale positions.
Full Example: Recent BTC Liquidations
Prompt
List the latest 24 hourly BTC liquidation candles for Binance. Separately list the rolling 24-hour BTC liquidation amounts by exchange. Label the time range of each result.Tool calls
- Call
get_futures_aggregated_liquidation_historywithexchange_list=Binance, symbol=BTC, interval=1h, limit=24for the latest 24 candles on the selected exchange. - Call
get_futures_liquidation_exchange_listwithsymbol=BTC, range=24hfor rolling 24-hour amounts by exchange.
Output requirements
Show the two results separately. The first covers Binance only; use the returned timestamps to label its candle range and any unfinished interval. The second shows rolling 24-hour amounts by exchange. Their scopes differ, so their totals need not match. Include the data source and query time without inferring liquidation price zones that were not queried.
Prompting Tips
| Tip | Not Specific Enough | Better |
|---|---|---|
| State the coin and time range | How do liquidations look? | BTC liquidation amounts over the past 24 hours, listed by hour |
| Say whether you mean one exchange or the whole market | What is the ETH funding rate? | The market-wide OI-weighted ETH funding rate, compared with Binance |
| Specify the output format | Analyze SOL | List SOL open interest, funding rate and long/short ratio in a table, then give a three-sentence conclusion |
| Ask for the data source and time | — | Add this to the end of your question: “Note the data source and query time at the end of your answer” |
Available MCP Tools
Call tools/list for the available tools and their parameter schemas. Examples include:
get_futures_liquidation_exchange_list
List the futures liquidation data by exchange.
get_bitcoin_etf_flow_history
Get the historical inflow and outflow of Bitcoin ETFs.
get_futures_aggregated_open_interest_history
Get the aggregated open interest history of a coin.
get_futures_funding_rate_history
Get the historical futures funding rates.
MCP vs. REST API
| MCP | REST API | |
|---|---|---|
| Best for | Interactive querying, analysis, report writing and coding in AI tools | Production systems, scheduled jobs, programs that need fixed fields |
| How you call it | Natural language; the AI chooses tools automatically | Write requests according to the endpoint docs |
| Stability | In Beta; tools and parameters may change | Endpoints provided under the V4 version, with a fixed field structure |
Use MCP for:
- Agent automation: build agents that trigger alerts or execute strategies based on market data.
- Trading monitoring: get the market-wide liquidation distribution in real time and identify extreme market sentiment.
- Natural language data queries: skip complex API debugging and ask for data in plain language.
- Market briefs: let AI automatically summarize today's market hot spots and capital flows.
- In-depth research: analyze divergence between a specific coin's historical open interest and price.
Use the REST API for:
- Backend services
- Automated scripts
- High-performance data requests
- Production systems
Limitations and Known Issues
Specific historical date ranges
The following 14 tools declare start_time and end_time in their parameter schemas, but currently return the latest data instead of filtering by the requested historical range:
get_futures_aggregated_cvd_historyget_futures_aggregated_liquidation_historyget_futures_aggregated_open_interest_historyget_futures_cvd_historyget_futures_funding_rate_historyget_futures_funding_rate_oi_weight_historyget_futures_global_long_short_account_ratio_historyget_futures_liquidation_historyget_futures_open_interest_historyget_futures_price_historyget_futures_top_long_short_account_ratio_historyget_futures_top_long_short_position_ratio_historyget_spot_aggregated_cvd_historyget_spot_cvd_history
Use the corresponding REST APIs for a specific historical date range. Check that every returned time satisfies start_time ≤ time < end_time before calculating results. The latest-data examples above omit these two parameters and label the actual returned timestamps.
Beta Status
CoinGlass MCP Server is currently in Beta, and some tool schemas may change as the API is updated.
Rate Limits
MCP requests are subject to your CoinGlass API Key's quota and share the same API Key's per-minute quota with the REST API. A single comprehensive question may call multiple tools.
We recommend an API Key with a higher quota for the best experience. For example, Hobbyist allows 30 requests per minute, so asking complex follow-up questions in a row may trigger rate limiting; if you use MCP often in AI tools, we recommend the Startup plan and above. For the limits of each API plan, see API Plans and Permissions.
API Plan Scope
The limits your API plan places on endpoint coverage and history length also apply in MCP.
Security Notes
Never expose your API Key in public code repositories.
Always store your API keys securely and avoid committing configuration files that contain sensitive information (such as .cursor/mcp.json and .vscode/mcp.json).
FAQ
Do MCP requests use my API quota?
Yes. MCP requests count toward your API Key's quota and share the requests-per-minute limit with the REST API.
How many requests does one question use?
The number of requests depends on the tools used. The recent-liquidation example above uses 2 tool calls.
How can I confirm that the data the AI gives was queried in real time?
Check whether a coinglass-api tool call appears before the answer. Numbers without a tool call may come from the model's outdated knowledge; you can ask the AI to query again and note the data time.
Can I connect CoinGlass MCP to my own AI application?
Yes. Any agent framework that supports MCP can connect to the remote service. Commercial products for end users require a commercial license on the Standard plan and above.
About MCP and AI Crypto Market Analysis
What Is MCP?
MCP (Model Context Protocol) is an open standard that lets AI tools call external data and services. Once connected to CoinGlass MCP, AI can query real-time and historical market data on demand instead of relying on outdated knowledge from training.
Analyze Bitcoin Markets with AI
Ask about open interest, funding rates, liquidations and ETF flows directly in tools such as Cursor and Claude. The AI calls the matching tools to fetch the data and organizes it into tables or conclusions, which suits pre-market preparation and daily research.
Is MCP Suitable for Automated Trading?
MCP is better suited to interactive querying and analysis. When you need stable, auditable automated workflows, we recommend integrating directly with the REST API and WebSocket.
Related Docs
- CoinGlass API Agent Skill: use it with MCP for better analysis
- llms.txt and Markdown: let AI tools read the docs
- Error Codes and Rate Limits: API rate limits
- Getting Started: real-time liquidation data push via WebSocket
