@crush-protocol/mcp-client 0.4.18 ā 0.4.20
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 +45 -30
- package/README.md +10 -10
- package/dist/mcp/proxy.js +10 -19
- package/package.json +2 -2
package/INSTRUCTIONS.md
CHANGED
|
@@ -45,26 +45,42 @@ After login, credentials are cached locally and reused across supported hosts.
|
|
|
45
45
|
|
|
46
46
|
### š Market Data (ClickHouse)
|
|
47
47
|
|
|
48
|
-
| Tool
|
|
49
|
-
|
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
|
|
48
|
+
| Tool | Purpose |
|
|
49
|
+
| ----------------------------------- | -------------------------------------------------------------------- |
|
|
50
|
+
| `crush_ch_list_tables` | List all available tables with descriptions and row counts. |
|
|
51
|
+
| `crush_ch_describe_table` | Get column definitions, types, and comments for a table. |
|
|
52
|
+
| `crush_ch_data_freshness` | Check data freshness for all tables. |
|
|
53
|
+
| `crush_ch_list_indicators` | List pre-computed indicators with categories. |
|
|
54
|
+
| `crush_ch_find_data` | Search data catalog by concept (e.g. "funding rate", "BTC price"). |
|
|
55
|
+
| `crush_ch_query_market_ohlcv` | Query OHLCV, OI, funding, liquidation data (row cap: 5000). |
|
|
56
|
+
| `crush_ch_query_derivatives` | Query derivatives data with interval filter. |
|
|
57
|
+
| `crush_ch_query_global_metrics` | Query global market metrics or per-coin derivatives metrics. |
|
|
58
|
+
| `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
|
+
| `crush_ch_query_sentiment` | Query sentiment consensus data. |
|
|
62
|
+
| `crush_ch_search_twitter` | Search collected tweets by keyword, author, engagement. |
|
|
63
|
+
| `crush_ch_search_news_feeds` | Search aggregated news with sentiment and token filters. |
|
|
64
|
+
| `crush_ch_query_token_list` | Query token snapshots (price, market cap, supply, unlock info). |
|
|
65
|
+
| `crush_ch_query_unlock_events` | Query token unlock schedules. |
|
|
66
|
+
| `crush_ch_run_query` | Run custom read-only SQL (SELECT only, row cap: 5000). |
|
|
67
|
+
|
|
68
|
+
### š Liquidation & Risk
|
|
69
|
+
|
|
70
|
+
| Tool | Purpose |
|
|
71
|
+
| -------------------------------------- | ------------------------------------------------------------- |
|
|
72
|
+
| `crush_ch_query_liq_coin_summary` | Per-coin liquidation volume/count by time window. |
|
|
73
|
+
| `crush_ch_query_liq_maxpain` | Max Pain risk scores and critical liquidation price levels. |
|
|
74
|
+
| `crush_ch_query_liq_exchange` | Liquidation distribution across exchanges. |
|
|
75
|
+
| `crush_ch_query_liq_history` | Historical liquidation volume time series. |
|
|
76
|
+
| `crush_ch_query_liq_heatmap_snapshot` | Liquidation heatmap aggregated by price level. |
|
|
77
|
+
| `crush_ch_query_liq_whale_positions` | Whale positions with liquidation prices. |
|
|
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. |
|
|
68
84
|
|
|
69
85
|
### āļø Strategy Management
|
|
70
86
|
|
|
@@ -78,11 +94,11 @@ After login, credentials are cached locally and reused across supported hosts.
|
|
|
78
94
|
| `toggle_strategy` | Activate or deactivate live trading. |
|
|
79
95
|
| `get_strategy_logs` | Get execution logs for a strategy. |
|
|
80
96
|
|
|
81
|
-
### š° Trading
|
|
97
|
+
### š° Trading
|
|
82
98
|
|
|
83
99
|
| Tool | Purpose |
|
|
84
100
|
| ------------------ | -------------------------------------------------------- |
|
|
85
|
-
| `place_order` | Place a market or limit order on
|
|
101
|
+
| `place_order` | Place a market or limit order on perpetuals. |
|
|
86
102
|
| `get_positions` | Get current open positions. |
|
|
87
103
|
| `get_account_info` | Get account balance, margin, and PnL. |
|
|
88
104
|
| `get_portfolio` | Get all balances across chains. |
|
|
@@ -96,7 +112,6 @@ After login, credentials are cached locally and reused across supported hosts.
|
|
|
96
112
|
| `get_trending_tokens` | Get trending tokens on a given chain. |
|
|
97
113
|
| `get_alpha_feed` | Get recent alpha posts from Twitter and communities. |
|
|
98
114
|
| `get_token_feed` | Get token-specific news and events. |
|
|
99
|
-
| `fetch_news` | Fetch news and intel feeds with keyword/token filters. |
|
|
100
115
|
|
|
101
116
|
---
|
|
102
117
|
|
|
@@ -119,11 +134,11 @@ After login, credentials are cached locally and reused across supported hosts.
|
|
|
119
134
|
### Market Research
|
|
120
135
|
|
|
121
136
|
```
|
|
122
|
-
1.
|
|
123
|
-
2.
|
|
124
|
-
3.
|
|
125
|
-
4.
|
|
126
|
-
|
|
137
|
+
1. crush_ch_list_tables / crush_ch_find_data ā Discover available data
|
|
138
|
+
2. crush_ch_list_indicators ā Browse indicator catalog
|
|
139
|
+
3. crush_ch_query_market_ohlcv ā Fetch OHLCV data (ā¤5000 rows)
|
|
140
|
+
4. crush_ch_query_global_metrics ā Check market-wide metrics
|
|
141
|
+
5. crush_ch_run_query ā Custom SQL for complex analysis
|
|
127
142
|
```
|
|
128
143
|
|
|
129
144
|
### Go Live
|
|
@@ -141,8 +156,8 @@ After login, credentials are cached locally and reused across supported hosts.
|
|
|
141
156
|
## Important Rules
|
|
142
157
|
|
|
143
158
|
1. **Backtest is async**: `create_backtest` returns immediately. Refresh with `list_backtests` until status is `COMPLETED` or `FAILED`. Typical wait: 30sā3min.
|
|
144
|
-
2. **Data row caps**:
|
|
159
|
+
2. **Data row caps**: All ClickHouse query tools have a 5000 row limit. Use narrower time ranges or filters to stay within the cap.
|
|
145
160
|
3. **Always validate first**: Call `validate_expression` before using an expression in `create_backtest` to catch errors early.
|
|
146
161
|
4. **Signal discovery order**: Always call `get_signal_metadata` ā `get_signals_by_category` before building expressions. Don't guess signal IDs.
|
|
147
162
|
5. **Strategy lifecycle**: Backtest ā Create Strategy ā Toggle Active. A strategy must be deactivated before deletion.
|
|
148
|
-
6. **Trading is real**: `place_order` executes real trades
|
|
163
|
+
6. **Trading is real**: `place_order` executes real trades. Always confirm with the user before placing orders.
|
package/README.md
CHANGED
|
@@ -217,7 +217,7 @@ npx -y @crush-protocol/mcp-client setup --windsurf
|
|
|
217
217
|
npx -y @crush-protocol/mcp-client setup --claude-desktop
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
-
**Manual config:**
|
|
220
|
+
**Manual config:** Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
|
|
221
221
|
|
|
222
222
|
```json
|
|
223
223
|
{
|
|
@@ -271,7 +271,7 @@ npx -y @crush-protocol/mcp-client setup --opencode
|
|
|
271
271
|
npx -y @crush-protocol/mcp-client setup --warp
|
|
272
272
|
```
|
|
273
273
|
|
|
274
|
-
**Manual config:**
|
|
274
|
+
**Manual config:** Add via Warp Drive ā MCP Servers ā `+ Add`:
|
|
275
275
|
|
|
276
276
|
```json
|
|
277
277
|
{
|
|
@@ -312,7 +312,7 @@ Add to `~/.kiro/settings/mcp.json` (global) or `.kiro/settings/mcp.json` (worksp
|
|
|
312
312
|
<details>
|
|
313
313
|
<summary><strong>Roo Code</strong></summary>
|
|
314
314
|
|
|
315
|
-
|
|
315
|
+
Add to `.roo/mcp.json` (project) or open Roo Code settings ā Edit Global MCP:
|
|
316
316
|
|
|
317
317
|
```json
|
|
318
318
|
{
|
|
@@ -332,7 +332,7 @@ Open Roo Code settings ā `Edit Global MCP`. Or add to `.roo/mcp.json` (project
|
|
|
332
332
|
<details>
|
|
333
333
|
<summary><strong>Cline</strong></summary>
|
|
334
334
|
|
|
335
|
-
|
|
335
|
+
Add to `cline_mcp_settings.json` (open via Cline panel ā MCP Servers ā Configure MCP Servers):
|
|
336
336
|
|
|
337
337
|
```json
|
|
338
338
|
{
|
|
@@ -352,7 +352,7 @@ Open Cline panel ā MCP Servers ā `Configure MCP Servers` to edit `cline_mcp_
|
|
|
352
352
|
<details>
|
|
353
353
|
<summary><strong>Trae</strong></summary>
|
|
354
354
|
|
|
355
|
-
Trae ā Settings ā MCP ā
|
|
355
|
+
Add via Trae ā Settings ā MCP ā Add MCP Server:
|
|
356
356
|
|
|
357
357
|
```json
|
|
358
358
|
{
|
|
@@ -372,7 +372,7 @@ Trae ā Settings ā MCP ā `Add MCP Server`:
|
|
|
372
372
|
<details>
|
|
373
373
|
<summary><strong>Augment Code</strong></summary>
|
|
374
374
|
|
|
375
|
-
|
|
375
|
+
Add via Settings ā Tools ā `+ Add MCP` ā Command: `npx -y @crush-protocol/mcp-client`
|
|
376
376
|
|
|
377
377
|
```json
|
|
378
378
|
"augment.advanced": {
|
|
@@ -487,7 +487,7 @@ Add to `~/.config/zed/settings.json`:
|
|
|
487
487
|
<details>
|
|
488
488
|
<summary><strong>JetBrains AI Assistant</strong></summary>
|
|
489
489
|
|
|
490
|
-
Settings ā Tools ā AI Assistant ā Model Context Protocol (MCP) ā `+ Add
|
|
490
|
+
Add via Settings ā Tools ā AI Assistant ā Model Context Protocol (MCP) ā `+ Add`:
|
|
491
491
|
|
|
492
492
|
```json
|
|
493
493
|
{
|
|
@@ -527,7 +527,7 @@ Settings ā Tools ā AI Assistant ā Model Context Protocol (MCP) ā `+ Add`
|
|
|
527
527
|
<details>
|
|
528
528
|
<summary><strong>LM Studio</strong></summary>
|
|
529
529
|
|
|
530
|
-
Program ā Install ā Edit
|
|
530
|
+
Add to `mcp.json` (open via Program ā Install ā Edit mcp.json):
|
|
531
531
|
|
|
532
532
|
```json
|
|
533
533
|
{
|
|
@@ -588,7 +588,7 @@ Add to `.mcp/mcp.json` in your solution directory:
|
|
|
588
588
|
<details>
|
|
589
589
|
<summary><strong>Perplexity Desktop</strong></summary>
|
|
590
590
|
|
|
591
|
-
Perplexity ā Settings ā Connectors ā Add Connector ā Advanced
|
|
591
|
+
Add via Perplexity ā Settings ā Connectors ā Add Connector ā Advanced. Server Name: `crush-protocol`
|
|
592
592
|
|
|
593
593
|
```json
|
|
594
594
|
{
|
|
@@ -623,7 +623,7 @@ Perplexity ā Settings ā Connectors ā Add Connector ā Advanced ā Server
|
|
|
623
623
|
<details>
|
|
624
624
|
<summary><strong>Zencoder</strong></summary>
|
|
625
625
|
|
|
626
|
-
Zencoder menu ā Agent tools ā Add custom MCP:
|
|
626
|
+
Add via Zencoder menu ā Agent tools ā Add custom MCP:
|
|
627
627
|
|
|
628
628
|
```json
|
|
629
629
|
{
|
package/dist/mcp/proxy.js
CHANGED
|
@@ -13,35 +13,26 @@
|
|
|
13
13
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
14
14
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
15
15
|
import { CallToolRequestSchema, ListToolsRequestSchema, PingRequestSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
16
|
-
import { getPreflightStatusMessage } from "./authPreflight.js";
|
|
17
16
|
import { OAuthRemoteMcpClient } from "./oauthRemoteClient.js";
|
|
18
17
|
import { getCachedAuthStatus } from "./oauthStorage.js";
|
|
19
18
|
import { CLIENT_NAME, CLIENT_VERSION } from "./version.js";
|
|
20
19
|
export async function runProxy(serverUrl) {
|
|
21
|
-
const authStatus = await getCachedAuthStatus(serverUrl);
|
|
22
|
-
if (authStatus.status === "not_authenticated") {
|
|
23
|
-
const message = getPreflightStatusMessage({
|
|
24
|
-
authStatus,
|
|
25
|
-
requiresManualLogin: true,
|
|
26
|
-
canAutoRefreshLogin: false,
|
|
27
|
-
});
|
|
28
|
-
process.stderr.write(`${message ?? "Crush needs sign-in on this machine."}\n`);
|
|
29
|
-
process.exit(1);
|
|
30
|
-
}
|
|
31
|
-
const preflightMessage = getPreflightStatusMessage({
|
|
32
|
-
authStatus,
|
|
33
|
-
requiresManualLogin: false,
|
|
34
|
-
canAutoRefreshLogin: true,
|
|
35
|
-
});
|
|
36
|
-
if (preflightMessage) {
|
|
37
|
-
process.stderr.write(`${preflightMessage}\n\n`);
|
|
38
|
-
}
|
|
39
20
|
const remoteClient = new OAuthRemoteMcpClient({
|
|
40
21
|
serverUrl,
|
|
41
22
|
oauth: {
|
|
42
23
|
authorizationOutput: "stderr",
|
|
43
24
|
},
|
|
44
25
|
});
|
|
26
|
+
const authStatus = await getCachedAuthStatus(serverUrl);
|
|
27
|
+
if (authStatus.status === "not_authenticated") {
|
|
28
|
+
process.stderr.write("[crush] Sign-in required. Opening browser...\n");
|
|
29
|
+
process.stderr.write("[crush] If the browser does not open, use the URL printed below.\n");
|
|
30
|
+
await remoteClient.ensureAuthorized();
|
|
31
|
+
process.stderr.write("[crush] Sign-in complete.\n\n");
|
|
32
|
+
}
|
|
33
|
+
else if (authStatus.status === "registered") {
|
|
34
|
+
process.stderr.write("[crush] Refreshing credentials...\n");
|
|
35
|
+
}
|
|
45
36
|
await remoteClient.connect();
|
|
46
37
|
const remoteTools = await remoteClient.listTools();
|
|
47
38
|
const localServer = new Server({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crush-protocol/mcp-client",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.20",
|
|
4
4
|
"description": "Official Crush MCP client for hosted market data, backtests, and trading workflows",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
48
48
|
"dotenv": "^17.2.1",
|
|
49
49
|
"zod": "^3.25.76",
|
|
50
|
-
"@crush-protocol/mcp-contracts": "0.1.
|
|
50
|
+
"@crush-protocol/mcp-contracts": "0.1.3"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^24.3.0",
|