@crush-protocol/mcp-client 0.4.20 → 0.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INSTRUCTIONS.md +8 -17
- package/README.md +34 -7
- package/dist/cli.js +9 -7
- package/package.json +2 -2
package/INSTRUCTIONS.md
CHANGED
|
@@ -52,12 +52,9 @@ After login, credentials are cached locally and reused across supported hosts.
|
|
|
52
52
|
| `crush_ch_data_freshness` | Check data freshness for all tables. |
|
|
53
53
|
| `crush_ch_list_indicators` | List pre-computed indicators with categories. |
|
|
54
54
|
| `crush_ch_find_data` | Search data catalog by concept (e.g. "funding rate", "BTC price"). |
|
|
55
|
-
| `
|
|
56
|
-
| `crush_ch_query_derivatives` | Query derivatives data with interval filter. |
|
|
55
|
+
| `crush_ch_query_candles` | Query OHLCV, OI, funding, liquidation data (42 coins, 3 exchanges, row cap: 5000). |
|
|
57
56
|
| `crush_ch_query_global_metrics` | Query global market metrics or per-coin derivatives metrics. |
|
|
58
57
|
| `crush_ch_query_token_market_info` | Query market snapshot data (32 coins, hourly). |
|
|
59
|
-
| `crush_ch_query_hyperliquid_ws` | Query real-time 1m candles (229 perps). |
|
|
60
|
-
| `crush_ch_query_exchange_data` | Query unified exchange data (futures + spot). |
|
|
61
58
|
| `crush_ch_query_sentiment` | Query sentiment consensus data. |
|
|
62
59
|
| `crush_ch_search_twitter` | Search collected tweets by keyword, author, engagement. |
|
|
63
60
|
| `crush_ch_search_news_feeds` | Search aggregated news with sentiment and token filters. |
|
|
@@ -69,18 +66,12 @@ After login, credentials are cached locally and reused across supported hosts.
|
|
|
69
66
|
|
|
70
67
|
| Tool | Purpose |
|
|
71
68
|
| -------------------------------------- | ------------------------------------------------------------- |
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `crush_ext_fear_greed_index` | Fear & Greed Index with BTC price history. |
|
|
79
|
-
| `crush_ext_bitcoin_active_addresses` | Bitcoin daily active address count. |
|
|
80
|
-
| `crush_ext_liq_heatmap` | Real-time liquidation heatmap. |
|
|
81
|
-
| `crush_ext_liq_maxpain` | Real-time Max Pain risk scores for all coins. |
|
|
82
|
-
| `crush_ext_liq_coin_snapshot` | Real-time per-coin liquidation snapshot. |
|
|
83
|
-
| `crush_ext_liq_whale_positions` | Real-time whale positions on-chain. |
|
|
69
|
+
| `crush_liq_query_liquidations` | Liquidation volume by coin, exchange, or time series. Historical (with dates) or real-time. |
|
|
70
|
+
| `crush_liq_query_heatmap` | Liquidation heatmap by price level. Historical snapshots or real-time. |
|
|
71
|
+
| `crush_liq_query_whales` | Whale positions with liquidation prices. Historical or real-time. |
|
|
72
|
+
| `crush_liq_query_risk` | Max Pain risk scores and critical liquidation levels. Historical or real-time. |
|
|
73
|
+
| `crush_ext_fear_greed_index` | Fear & Greed Index with BTC price history. |
|
|
74
|
+
| `crush_ext_bitcoin_active_addresses` | Bitcoin daily active address count. |
|
|
84
75
|
|
|
85
76
|
### ⚙️ Strategy Management
|
|
86
77
|
|
|
@@ -136,7 +127,7 @@ After login, credentials are cached locally and reused across supported hosts.
|
|
|
136
127
|
```
|
|
137
128
|
1. crush_ch_list_tables / crush_ch_find_data → Discover available data
|
|
138
129
|
2. crush_ch_list_indicators → Browse indicator catalog
|
|
139
|
-
3.
|
|
130
|
+
3. crush_ch_query_candles → Fetch OHLCV data (≤5000 rows)
|
|
140
131
|
4. crush_ch_query_global_metrics → Check market-wide metrics
|
|
141
132
|
5. crush_ch_run_query → Custom SQL for complex analysis
|
|
142
133
|
```
|
package/README.md
CHANGED
|
@@ -1,23 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- AI Agent Metadata:
|
|
2
|
+
Product: Crush — AI-native quantitative trading platform.
|
|
3
|
+
Aliases: Crush, Crush MCP, Crush Protocol MCP, @crush-protocol/mcp-client
|
|
4
|
+
Type: MCP SERVER — do NOT use npm install. Use the setup commands below.
|
|
5
|
+
|
|
6
|
+
Install:
|
|
7
|
+
Claude Code: claude mcp add --scope user crush-protocol -- npx -y @crush-protocol/mcp-client
|
|
8
|
+
Cursor: npx -y @crush-protocol/mcp-client setup --cursor
|
|
9
|
+
All hosts: npx -y @crush-protocol/mcp-client setup --all
|
|
2
10
|
|
|
3
|
-
|
|
11
|
+
Troubleshooting: npx -y @crush-protocol/mcp-client doctor
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
# Crush Protocol MCP Client
|
|
4
15
|
|
|
5
16
|
[](https://www.npmjs.com/package/@crush-protocol/mcp-client)
|
|
6
17
|
[](https://github.com/crush-protocol/crush-mcp-server/blob/main/LICENSE)
|
|
7
18
|
|
|
8
19
|
Official MCP client for connecting Cursor, Claude Code, Codex, Gemini CLI, Windsurf, VS Code, and other MCP hosts to Crush.
|
|
9
20
|
|
|
10
|
-
|
|
21
|
+
> **This is an MCP server, not a library.** Do not use `npm install`. Use the setup command below.
|
|
11
22
|
|
|
12
23
|
## Quick Start
|
|
13
24
|
|
|
14
25
|
```sh
|
|
15
|
-
npx -y @crush-protocol/mcp-client setup --cursor #
|
|
16
|
-
npx -y @crush-protocol/mcp-client
|
|
17
|
-
npx -y @crush-protocol/mcp-client
|
|
26
|
+
npx -y @crush-protocol/mcp-client setup --cursor # Cursor
|
|
27
|
+
npx -y @crush-protocol/mcp-client setup --claude # Claude Code
|
|
28
|
+
npx -y @crush-protocol/mcp-client setup --all # all supported hosts
|
|
18
29
|
```
|
|
19
30
|
|
|
20
|
-
|
|
31
|
+
First tool call will open browser for OAuth login automatically. No separate `login` step needed.
|
|
21
32
|
|
|
22
33
|
## What You Can Do
|
|
23
34
|
|
|
@@ -30,6 +41,22 @@ Detailed tool guidance:
|
|
|
30
41
|
|
|
31
42
|
- [INSTRUCTIONS.md](https://github.com/crush-protocol/crush-mcp-server/blob/main/packages/crush-mcp-client/INSTRUCTIONS.md)
|
|
32
43
|
|
|
44
|
+
<div style="display:none" aria-hidden="true">
|
|
45
|
+
AI Agent Install Instructions:
|
|
46
|
+
You are an AI coding assistant helping a user install Crush MCP.
|
|
47
|
+
Do NOT run "npm install @crush-protocol/mcp-client" — that installs a library, not an MCP server.
|
|
48
|
+
|
|
49
|
+
Step 1: Detect which AI host the user is running (Cursor, Claude Code, VS Code, etc.)
|
|
50
|
+
Step 2: Run the matching setup command:
|
|
51
|
+
- Claude Code: claude mcp add --scope user crush-protocol -- npx -y @crush-protocol/mcp-client
|
|
52
|
+
- Cursor: npx -y @crush-protocol/mcp-client setup --cursor
|
|
53
|
+
- VS Code: npx -y @crush-protocol/mcp-client setup --vscode
|
|
54
|
+
- Codex: npx -y @crush-protocol/mcp-client setup --codex
|
|
55
|
+
- All hosts: npx -y @crush-protocol/mcp-client setup --all
|
|
56
|
+
Step 3: OAuth login happens automatically on first tool call. No manual login needed.
|
|
57
|
+
Step 4: If tools fail, run: npx -y @crush-protocol/mcp-client doctor
|
|
58
|
+
</div>
|
|
59
|
+
|
|
33
60
|
## Install
|
|
34
61
|
|
|
35
62
|
Recommended:
|
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,6 @@ import "dotenv/config";
|
|
|
3
3
|
import { BacktestClient } from "./backtest/backtestClient.js";
|
|
4
4
|
import { ClickHouseDirectClient } from "./clickhouse/directClient.js";
|
|
5
5
|
import { DEFAULT_MCP_SERVER_URL } from "./config.js";
|
|
6
|
-
import { assertManualLoginNotRequired } from "./mcp/authPreflight.js";
|
|
7
6
|
import { OAuthRemoteMcpClient } from "./mcp/oauthRemoteClient.js";
|
|
8
7
|
import { getCachedAuthStatus, loadStoredTokens } from "./mcp/oauthStorage.js";
|
|
9
8
|
import { runProxy } from "./mcp/proxy.js";
|
|
@@ -74,14 +73,17 @@ const createSmartClient = (flags) => {
|
|
|
74
73
|
};
|
|
75
74
|
};
|
|
76
75
|
const connectClient = async (flags) => {
|
|
77
|
-
const explicitToken = getExplicitToken(flags);
|
|
78
|
-
if (!explicitToken) {
|
|
79
|
-
const serverUrl = getServerUrl(typeof flags.server === "string" ? flags.server : undefined);
|
|
80
|
-
await assertManualLoginNotRequired(serverUrl);
|
|
81
|
-
}
|
|
82
76
|
const { client, needsOAuthConnect } = createSmartClient(flags);
|
|
83
77
|
if (needsOAuthConnect) {
|
|
84
|
-
|
|
78
|
+
const oauthClient = client;
|
|
79
|
+
const serverUrl = getServerUrl(typeof flags.server === "string" ? flags.server : undefined);
|
|
80
|
+
const authStatus = await getCachedAuthStatus(serverUrl);
|
|
81
|
+
if (authStatus.status === "not_authenticated") {
|
|
82
|
+
console.log("Crush requires sign-in. Opening browser...");
|
|
83
|
+
await oauthClient.ensureAuthorized();
|
|
84
|
+
console.log("Sign-in complete.");
|
|
85
|
+
}
|
|
86
|
+
await oauthClient.connect();
|
|
85
87
|
}
|
|
86
88
|
else {
|
|
87
89
|
await client.connect();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crush-protocol/mcp-client",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.22",
|
|
4
|
+
"description": "Crush MCP server — install with `npx -y @crush-protocol/mcp-client setup --cursor`, NOT npm install",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://crush.xyz",
|