cryptoiz-mcp 2.0.2 → 2.2.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +309 -103
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cryptoiz-mcp",
3
- "version": "2.0.2",
3
+ "version": "2.2.0",
4
4
  "description": "CryptoIZ MCP Server — Solana DEX signals with x402 micropayments. Pay $0.01 USDC per call.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -14,9 +14,7 @@ const SOL_RPC = 'https://api.mainnet-beta.solana.com';
14
14
  const AMOUNT = 10000;
15
15
 
16
16
  async function payAndFetch(url) {
17
- if (!SVM_PRIVATE_KEY) {
18
- return { error: 'SVM_PRIVATE_KEY tidak ditemukan.', setup: 'Tambahkan SVM_PRIVATE_KEY ke config Claude Desktop.', help: 'cryptoiz.org' };
19
- }
17
+ if (!SVM_PRIVATE_KEY) return { error: 'SVM_PRIVATE_KEY not found. Add it to Claude Desktop config.' };
20
18
  const first = await fetch(url);
21
19
  if (first.status !== 402) return first.json();
22
20
  try {
@@ -31,143 +29,349 @@ async function payAndFetch(url) {
31
29
  const paidRes = await fetch(url, { headers: { 'x-payment': payment } });
32
30
  return paidRes.json();
33
31
  } catch (err) {
34
- return { error: `Payment gagal: ${err.message}`, hint: 'Pastikan wallet punya USDC dan SOL untuk gas.' };
32
+ return { error: `Payment failed: ${err.message}` };
35
33
  }
36
34
  }
37
35
 
38
- // ─── Formatters ───────────────────────────────────────────────────────────────
36
+ const fmt = (n, d=2) => n != null ? parseFloat(n).toFixed(d) : 'N/A';
37
+ const fmtMC = mc => { if (!mc) return 'N/A'; if (mc >= 1e6) return `$${(mc/1e6).toFixed(2)}M`; return `$${(mc/1000).toFixed(0)}K`; };
38
+ const fmtD = d => d > 0 ? `+${d}` : `${d}`;
39
+ const fmtRisk = r => parseFloat(r) > 0 ? `WARNING ${fmt(r)}%` : `CLEAR 0%`;
40
+ const fmtPrice = p => p ? `$${parseFloat(p).toFixed(8)}` : 'N/A';
39
41
 
40
- function fmt(n, dec=2) { return n != null ? parseFloat(n).toFixed(dec) : 'N/A'; }
41
- function fmtMC(mc) { if (!mc) return 'N/A'; if (mc >= 1e6) return `$${(mc/1e6).toFixed(2)}M`; return `$${(mc/1000).toFixed(0)}K`; }
42
- function fmtDelta(d) { return d > 0 ? `+${d}` : `${d}`; }
43
- function fmtRisk(r) { return r > 0 ? `⚠️ ${fmt(r)}%` : '✅ 0%'; }
42
+ function entryAdvice(s) {
43
+ const lines = [];
44
+ if (s.entry_class === 'ALPHA_EARLY' && s.phase?.includes('ACCUM')) lines.push('STRONG BUY SETUP: Early accumulation phase with smart money entering. Best entry window before price moves.');
45
+ else if (s.entry_class === 'ALPHA_BUILDING') lines.push('BUILDING: Accumulation continues. Timing still valid monitor for confirmation.');
46
+ else lines.push('WATCHLIST: Does not meet all entry criteria yet. Monitor for phase confirmation.');
47
+ if (s.whale_delta > 0 && s.dolphin_delta > 0) lines.push('Whale & Dolphin both positive — strong smart money confirmation.');
48
+ if (s.smart_money_trap_risk > 30) lines.push('HIGH TRAP RISK — be cautious before entering.');
49
+ if (s.safety_score >= 80) lines.push('High Safety Score — low manipulation risk.');
50
+ return lines.join(' | ');
51
+ }
44
52
 
45
53
  function formatAlpha(data) {
46
- if (data.error) return `❌ ERROR: ${data.error}\n${data.setup||''}`;
47
- if (!data.signals?.length) return 'Tidak ada sinyal Alpha Scanner saat ini.';
48
- const lines = [
49
- `╔═══ CRYPTOIZ ALPHA SCANNER ═══╗`,
50
- `📅 ${data.fetched_at?.split('T')[0]} | Total: ${data.total} sinyal`,
51
- `💰 $0.01 USDC | cryptoiz.org | @cryptoiz_IDN`,
52
- `╚═══════════════════════════════╝`,
53
- '',
54
+ if (data.error) return `ERROR: ${data.error}\nSetup guide: https://cryptoiz.org`;
55
+ if (!data.signals?.length) return `No Alpha Scanner signals found at this time.\n\nFor full dashboard access with real-time updates, visit: https://cryptoiz.org\nFollow us: @cryptoiz_IDN`;
56
+
57
+ const out = [
58
+ `═══════════════════════════════════════════════`,
59
+ ` CRYPTOIZ ALPHA ENTRY SCANNER `,
60
+ ` AI-Powered Solana DEX Smart Money Signals `,
61
+ `═══════════════════════════════════════════════`,
62
+ `Date: ${data.fetched_at?.split('T')[0]} | Total Signals: ${data.total}`,
63
+ ``,
64
+ `WHAT IS THIS?`,
65
+ `CryptoIZ Alpha Scanner uses AI to detect Solana tokens`,
66
+ `being accumulated by whales & dolphins (smart money)`,
67
+ `before price moves. Score 0-100 based on:`,
68
+ ` - Accumulation Score: how actively smart money is entering`,
69
+ ` - Timing Score: how optimal the entry timing is`,
70
+ ` - Safety Score: how safe from manipulation`,
71
+ ``,
72
+ `For the FULL dashboard with charts, alerts & more data:`,
73
+ `>>> https://cryptoiz.org/Alpha-Scanner <<<`,
74
+ `Follow: Twitter/X @cryptoiz_IDN | Telegram: t.me/agus_artemiss`,
75
+ ``,
76
+ `═══════════════════════════════════════════════`,
77
+ ``,
54
78
  ...data.signals.map((s, i) => [
55
- `${i+1}. ━━━ ${s.name} ━━━`,
56
- ` 📊 Alpha Score : ${fmt(s.alpha_score)} | ${s.entry_class}`,
57
- ` 📍 Phase : ${s.phase} (Conf: ${fmt(s.phase_confidence)}% | Age: ${s.phase_age_bars} bars)`,
58
- ` 🌐 Regime : ${s.regime}`,
59
- ` 🐋 Whale : ${fmtDelta(s.whale_delta)} (${fmt(s.whale_pct)}% supply)`,
60
- ` 🐬 Dolphin : ${fmtDelta(s.dolphin_delta)} (${fmt(s.dolphin_pct)}% supply)`,
61
- ` 🦐 Shrimp : ${fmtDelta(s.shrimp_delta)}`,
62
- ` 📈 Sub-scores : Accum ${fmt(s.accumulation_score)} | Timing ${fmt(s.timing_score)} | Safety ${fmt(s.safety_score)}`,
63
- ` ⚠️ Risks : Liq ${fmtRisk(s.liquidity_drain_risk)} | Trap ${fmtRisk(s.smart_money_trap_risk)}`,
64
- ` 📉 Price Drop : ${s.price_drop_pct != null ? fmt(s.price_drop_pct)+'%' : 'N/A'}`,
65
- ` 💰 Market Cap : ${fmtMC(s.market_cap_usd)}`,
66
- ` 💵 Price : $${s.price_usd ? parseFloat(s.price_usd).toFixed(6) : 'N/A'}`,
67
- ` 🔗 Address : ${s.token_address}`,
79
+ `[${i+1}] ${s.name}`,
80
+ ` Alpha Score : ${fmt(s.alpha_score)}/100 | Class: ${s.entry_class}`,
81
+ ` Phase : ${s.phase} | Regime: ${s.regime}`,
82
+ ` Confidence : ${fmt(s.phase_confidence)}% | Phase Age: ${s.phase_age_bars} bars`,
83
+ ``,
84
+ ` HOLDER SIGNALS:`,
85
+ ` Whale : ${fmtD(s.whale_delta)} (${fmt(s.whale_pct)}% of supply)`,
86
+ ` Dolphin : ${fmtD(s.dolphin_delta)} (${fmt(s.dolphin_pct)}% of supply)`,
87
+ ` Shrimp : ${fmtD(s.shrimp_delta)} (negative = smart money replacing retail)`,
88
+ ``,
89
+ ` SUB-SCORES:`,
90
+ ` Accum: ${fmt(s.accumulation_score)} | Timing: ${fmt(s.timing_score)} | Safety: ${fmt(s.safety_score)}`,
91
+ ``,
92
+ ` RISK FLAGS:`,
93
+ ` Liquidity Risk: ${fmtRisk(s.liquidity_drain_risk)} | Trap Risk: ${fmtRisk(s.smart_money_trap_risk)}`,
94
+ ``,
95
+ ` MARKET DATA:`,
96
+ ` Market Cap : ${fmtMC(s.market_cap_usd)}`,
97
+ ` Price : ${fmtPrice(s.price_usd)}`,
98
+ ` Drop/Peak : ${s.price_drop_pct != null ? fmt(s.price_drop_pct)+'%' : 'N/A'}`,
99
+ ` CA : ${s.token_address}`,
100
+ ``,
101
+ ` SIGNAL: ${entryAdvice(s)}`,
102
+ ``,
103
+ ` View full token detail: https://cryptoiz.org`,
104
+ `───────────────────────────────────────────────`,
68
105
  ].join('\n')),
69
- '',
70
- '📊 Data by CryptoIZ cryptoiz.org | @cryptoiz_IDN',
106
+ ``,
107
+ `NOTE: This is NOT financial advice. Always DYOR.`,
108
+ `For real-time alerts, premium signals & full analysis:`,
109
+ `>>> https://cryptoiz.org | Subscribe from $15/week <<<`,
110
+ `Twitter: @cryptoiz_IDN | Telegram: t.me/agus_artemiss`,
71
111
  ];
72
- return lines.join('\n');
112
+ return out.join('\n');
73
113
  }
74
114
 
75
115
  function formatDivergence(data) {
76
- if (data.error) return `❌ ERROR: ${data.error}`;
77
- if (!data.signals?.length) return `Tidak ada divergence signal (${data.timeframe}).`;
78
- const lines = [
79
- `╔═══ CRYPTOIZ DIVERGENCE SCANNER ═══╗`,
80
- `📅 ${data.timeframe?.toUpperCase()} | Total: ${data.total}`,
81
- `💰 $0.01 USDC | cryptoiz.org | @cryptoiz_IDN`,
82
- `╚════════════════════════════════════╝`,
83
- '',
116
+ if (data.error) return `ERROR: ${data.error}\nhttps://cryptoiz.org`;
117
+ if (!data.signals?.length) return `No divergence signals found (${data.timeframe}).\n\nView full Divergence Scanner: https://cryptoiz.org/Divergence\nFollow: @cryptoiz_IDN`;
118
+
119
+ const out = [
120
+ `═══════════════════════════════════════════════`,
121
+ ` CRYPTOIZ DIVERGENCE SCANNER `,
122
+ ` Whale/Dolphin vs Price Divergence Detector `,
123
+ `═══════════════════════════════════════════════`,
124
+ `Date: ${data.fetched_at?.split('T')[0]} | Timeframe: ${data.timeframe?.toUpperCase()} | Total: ${data.total}`,
125
+ ``,
126
+ `WHAT IS THIS?`,
127
+ `Divergence occurs when price moves opposite to smart money.`,
128
+ ` BULLISH: Price drops but whales/dolphins are BUYING`,
129
+ ` -> Potential reversal UPWARD`,
130
+ ` BEARISH: Price rises but whales/dolphins are SELLING`,
131
+ ` -> Potential reversal DOWNWARD`,
132
+ ``,
133
+ `For the FULL divergence dashboard with charts:`,
134
+ `>>> https://cryptoiz.org/Divergence <<<`,
135
+ `Follow: Twitter/X @cryptoiz_IDN | Telegram: t.me/agus_artemiss`,
136
+ ``,
137
+ `═══════════════════════════════════════════════`,
138
+ ``,
84
139
  ...data.signals.map((s, i) => {
85
- const type = s.divergence_type === 'bullish' ? '🟢 BULLISH' : s.divergence_type === 'bearish' ? '🔴 BEARISH' : (s.divergence_type||'').toUpperCase();
140
+ const type = s.divergence_type === 'bullish' ? 'BULLISH [Potential UP]' : s.divergence_type === 'bearish' ? 'BEARISH [Potential DOWN]' : (s.divergence_type||'').toUpperCase();
141
+ const advice = s.divergence_type === 'bullish'
142
+ ? 'BULLISH DIVERGENCE: Price down but smart money buying. Watch for entry opportunity on reversal confirmation.'
143
+ : 'BEARISH DIVERGENCE: Price up but smart money selling. Be cautious if holding this token.';
86
144
  return [
87
- `${i+1}. ━━━ ${s.name||s.symbol} ━━━`,
88
- ` 📊 Divergence : ${type} (Score: ${fmt(s.divergence_score)})`,
89
- ` 🎯 Confidence : ${fmt(s.confidence_score)}%`,
90
- ` 📍 Phase : ${s.phase_label}`,
91
- ` 🐋 Whale : ${fmtDelta(s.whale_delta)} | 🐬 Dolphin: ${fmtDelta(s.dolphin_delta)}`,
92
- ` 💰 Market Cap : ${fmtMC(s.market_cap_usd)}`,
93
- ` 💵 Price : $${s.price_usd ? parseFloat(s.price_usd).toFixed(6) : 'N/A'}`,
94
- ` 📉 Change : ${s.price_change_pct ? fmt(s.price_change_pct)+'%' : 'N/A'}`,
95
- ` 🔗 Address : ${s.token_address}`,
96
- ` 🕐 Detected : ${s.detected_at ? new Date(s.detected_at).toUTCString() : 'N/A'}`,
145
+ `[${i+1}] ${s.name||s.symbol} — ${type}`,
146
+ ` Divergence Score : ${fmt(s.divergence_score)} | Confidence: ${fmt(s.confidence_score)}%`,
147
+ ` Phase : ${s.phase_label}`,
148
+ ``,
149
+ ` HOLDER SIGNALS:`,
150
+ ` Whale : ${fmtD(s.whale_delta)} | Dolphin: ${fmtD(s.dolphin_delta)}`,
151
+ ``,
152
+ ` MARKET DATA:`,
153
+ ` Market Cap : ${fmtMC(s.market_cap_usd)}`,
154
+ ` Price Now : ${fmtPrice(s.price_usd)}`,
155
+ ` Price Chg : ${s.price_change_pct ? fmt(s.price_change_pct)+'%' : 'N/A'}`,
156
+ ` Detected : ${s.detected_at ? new Date(s.detected_at).toUTCString() : 'N/A'}`,
157
+ ` CA : ${s.token_address}`,
158
+ ``,
159
+ ` SIGNAL: ${advice}`,
160
+ ``,
161
+ ` View on CryptoIZ: https://cryptoiz.org/Divergence`,
162
+ `───────────────────────────────────────────────`,
97
163
  ].join('\n');
98
164
  }),
99
- '',
100
- '📊 Data by CryptoIZ cryptoiz.org | @cryptoiz_IDN',
165
+ ``,
166
+ `NOTE: This is NOT financial advice. Always DYOR.`,
167
+ `Full divergence scanner with real-time data:`,
168
+ `>>> https://cryptoiz.org | @cryptoiz_IDN <<<`,
101
169
  ];
102
- return lines.join('\n');
170
+ return out.join('\n');
103
171
  }
104
172
 
105
- function formatAccum(data) {
106
- if (data.error) return `❌ ERROR: ${data.error}`;
107
- if (!data.tokens?.length) return 'Tidak ada token dalam fase akumulasi.';
108
- const lines = [
109
- `╔═══ CRYPTOIZ AKUMULASI ═══╗`,
110
- `📅 ${data.fetched_at?.split('T')[0]} | Total: ${data.total}`,
111
- `💰 $0.01 USDC | cryptoiz.org | @cryptoiz_IDN`,
112
- `╚══════════════════════════╝`,
113
- '',
114
- ...data.tokens.map((t, i) => [
115
- `${i+1}. ━━━ ${t.name} ━━━`,
116
- ` 📊 Composite : ${fmt(t.composite_score)} | ${t.strength_label}`,
117
- ` 🔄 AccDist : ${t.accdist_label} (Score: ${fmt(t.accdist_score)})`,
118
- ` 📈 Structure : ${fmt(t.structure_score)}`,
119
- ` 👥 Holder : ${fmt(t.holder_score)}`,
120
- ` 📉 Market : ${fmt(t.market_score)}`,
121
- ` 🔗 Address : ${t.token_address}`,
122
- ].join('\n')),
123
- '',
124
- '📊 Data by CryptoIZ — cryptoiz.org | @cryptoiz_IDN',
173
+ function formatAccumulation(data) {
174
+ if (data.error) return `ERROR: ${data.error}\nhttps://cryptoiz.org`;
175
+ if (!data.tokens?.length) return `No tokens in accumulation phase found.\n\nFull dashboard: https://cryptoiz.org\nFollow: @cryptoiz_IDN`;
176
+
177
+ const out = [
178
+ `═══════════════════════════════════════════════`,
179
+ ` CRYPTOIZ ACCUMULATION DASHBOARD `,
180
+ ` Smart Money Accumulation Phase Detector `,
181
+ `═══════════════════════════════════════════════`,
182
+ `Date: ${data.fetched_at?.split('T')[0]} | Total Tokens: ${data.total}`,
183
+ ``,
184
+ `WHAT IS THIS?`,
185
+ `CryptoIZ Accumulation Dashboard detects tokens in active`,
186
+ `accumulation phase using 4 proprietary dimensions:`,
187
+ ` - Structure Score : Price action & holder tier patterns`,
188
+ ` - AccDist Score : Accumulation vs distribution ratio`,
189
+ ` - Holder Score : Holder quality & consistency`,
190
+ ` - Market Score : Market conditions & volume`,
191
+ `Composite Score = weighted average of all 4 dimensions.`,
192
+ ``,
193
+ `For the full accumulation dashboard with real-time charts:`,
194
+ `>>> https://cryptoiz.org/Dashboard <<<`,
195
+ `Follow: Twitter/X @cryptoiz_IDN | Telegram: t.me/agus_artemiss`,
196
+ ``,
197
+ `═══════════════════════════════════════════════`,
198
+ ``,
199
+ ...data.tokens.map((t, i) => {
200
+ const advice = t.strength_label?.includes('VERY_STRONG')
201
+ ? 'VERY STRONG: Highest priority accumulation signal. Smart money very active.'
202
+ : t.strength_label?.includes('STRONG')
203
+ ? 'STRONG: Active accumulation detected. Good entry opportunity candidate.'
204
+ : 'FORMING: Early accumulation forming. Monitor for confirmation.';
205
+ return [
206
+ `[${i+1}] ${t.name}`,
207
+ ` Composite Score : ${fmt(t.composite_score)}/100`,
208
+ ` Strength : ${t.strength_label}`,
209
+ ` AccDist Status : ${t.accdist_label} (Score: ${fmt(t.accdist_score)})`,
210
+ ``,
211
+ ` SUB-SCORES:`,
212
+ ` Structure: ${fmt(t.structure_score)} | Holder: ${fmt(t.holder_score)} | Market: ${fmt(t.market_score)}`,
213
+ ``,
214
+ ` CA: ${t.token_address}`,
215
+ ``,
216
+ ` SIGNAL: ${advice}`,
217
+ ``,
218
+ ` View on CryptoIZ: https://cryptoiz.org`,
219
+ `───────────────────────────────────────────────`,
220
+ ].join('\n');
221
+ }),
222
+ ``,
223
+ `NOTE: This is NOT financial advice. Always DYOR.`,
224
+ `Real-time accumulation alerts & full platform:`,
225
+ `>>> https://cryptoiz.org | Subscribe from $15/week <<<`,
226
+ `Twitter: @cryptoiz_IDN | Telegram: t.me/agus_artemiss`,
125
227
  ];
126
- return lines.join('\n');
228
+ return out.join('\n');
229
+ }
230
+
231
+ function formatBTC(data) {
232
+ if (data.error) return `ERROR: ${data.error}\nhttps://cryptoiz.org/BTC`;
233
+ const s = data.btc_signal || {};
234
+ const f = data.futures_signal || {};
235
+ const ind = data.indicators || {};
236
+ const stateLabel = s.state === 'bull' ? 'BULLISH' : s.state === 'bear' ? 'BEARISH' : 'NEUTRAL';
237
+ const altAdvice = s.state === 'bull'
238
+ ? 'BTC is BULLISH -> Favorable conditions for Solana altcoin entries.\n Focus on tokens with high Alpha Score on CryptoIZ Alpha Scanner.'
239
+ : s.state === 'bear'
240
+ ? 'BTC is BEARISH -> Be CAUTIOUS with altcoin entries.\n Prioritize tokens with high Safety Score and low liquidity risk.'
241
+ : 'BTC is NEUTRAL -> Be SELECTIVE. Wait for signal confirmation before large entries.';
242
+
243
+ const out = [
244
+ `═══════════════════════════════════════════════`,
245
+ ` CRYPTOIZ BTC REGIME MONITOR `,
246
+ ` Bitcoin Market Condition for Altcoin Traders`,
247
+ `═══════════════════════════════════════════════`,
248
+ `Date: ${data.fetched_at?.split('T')[0]}`,
249
+ ``,
250
+ `WHAT IS THIS?`,
251
+ `CryptoIZ BTC Regime Monitor analyzes Bitcoin macro conditions`,
252
+ `to help you understand whether the market is bullish, bearish,`,
253
+ `or neutral. BTC regime directly impacts Solana altcoin moves.`,
254
+ ``,
255
+ `For full BTC analysis with charts & indicators:`,
256
+ `>>> https://cryptoiz.org/BTC <<<`,
257
+ `Follow: Twitter/X @cryptoiz_IDN | Telegram: t.me/agus_artemiss`,
258
+ ``,
259
+ `═══════════════════════════════════════════════`,
260
+ ``,
261
+ `CURRENT BTC REGIME: ${stateLabel}`,
262
+ ``,
263
+ ` BTC Price : $${s.last_price ? parseFloat(s.last_price).toLocaleString() : 'N/A'}`,
264
+ ` BTC Score : ${s.score || 'N/A'} / 10 (0=extreme bear, 10=extreme bull)`,
265
+ ` Trend : ${(s.trend||'N/A').toUpperCase()}`,
266
+ ``,
267
+ `MARKET SENTIMENT:`,
268
+ ` Fear & Greed Index : ${s.fear_value || 'N/A'} / 100 — ${s.fear_label || 'N/A'}`,
269
+ ` Context: ${
270
+ s.fear_value <= 25 ? 'Extreme Fear zone — historically a strong BUY opportunity area for patient investors.' :
271
+ s.fear_value >= 75 ? 'Extreme Greed — market may be overheated, reversal risk is elevated.' :
272
+ 'Neutral sentiment — follow technical signals for direction.'
273
+ }`,
274
+ ``,
275
+ `FUTURES MARKET:`,
276
+ ` Signal : ${f.signal || 'N/A'}`,
277
+ ` OI Regime : ${f.oi_regime || 'N/A'}`,
278
+ ` Funding : ${f.funding_regime || 'N/A'}`,
279
+ ` Perp Price : $${f.perp_price ? parseFloat(f.perp_price).toLocaleString() : 'N/A'}`,
280
+ ` Context : ${f.reason || 'N/A'}`,
281
+ ``,
282
+ ind.rsi ? [
283
+ `TECHNICAL INDICATORS (1H):`,
284
+ ` RSI : ${fmt(ind.rsi)} ${parseFloat(ind.rsi) < 30 ? '(Oversold — potential bounce)' : parseFloat(ind.rsi) > 70 ? '(Overbought — caution)' : '(Normal range)'}`,
285
+ ` EMA 20 : $${ind.ema_20 ? parseFloat(ind.ema_20).toLocaleString() : 'N/A'}`,
286
+ ` EMA 50 : $${ind.ema_50 ? parseFloat(ind.ema_50).toLocaleString() : 'N/A'}`,
287
+ ` MACD : ${fmt(ind.macd)} | Signal: ${fmt(ind.macd_signal)} | Hist: ${fmt(ind.macd_hist)}`,
288
+ ``,
289
+ ].join('\n') : '',
290
+ `ALTCOIN RECOMMENDATION:`,
291
+ ` ${altAdvice}`,
292
+ ``,
293
+ ` Check CryptoIZ Alpha Scanner for best Solana entry signals:`,
294
+ ` >>> https://cryptoiz.org/Alpha-Scanner <<<`,
295
+ ``,
296
+ `═══════════════════════════════════════════════`,
297
+ `NOTE: This is NOT financial advice. Always DYOR.`,
298
+ `Full BTC monitor + Solana signals platform:`,
299
+ `>>> https://cryptoiz.org | Plans from $15/week <<<`,
300
+ `Twitter: @cryptoiz_IDN | Telegram: t.me/agus_artemiss`,
301
+ ];
302
+ return out.join('\n');
127
303
  }
128
304
 
129
305
  function formatStatus() {
130
- const hasKey = !!SVM_PRIVATE_KEY;
131
306
  return [
132
- `╔═══ CryptoIZ MCP Server v2.0.2 ═══╗`,
133
- ` Status : CONNECTED`,
134
- ` Payment : ${hasKey ? '✅ READY — x402 Solana USDC ($0.01/call)' : '❌ NOT SET — tambahkan SVM_PRIVATE_KEY'}`,
135
- ` Wallet : DsKmdkYx49Xc1WhqMUAztwhdYPTqieyC98VmnnJdgpXX`,
136
- `╚═══════════════════════════════════╝`,
137
- ``,
138
- `Tools tersedia:`,
139
- ` 1. get_alpha_scanner Alpha entry signals + address + MC`,
140
- ` 2. get_divergence — Divergence bullish/bearish + address`,
141
- ` 3. get_accumulation — Token fase akumulasi + address`,
142
- ` 4. get_status — Info server ini`,
143
- ``,
144
- `💰 $0.01 USDC per call via Solana`,
145
- `🌐 cryptoiz.org | @cryptoiz_IDN`,
307
+ `═══════════════════════════════════════════════`,
308
+ ` CryptoIZ MCP Server v2.2.0 `,
309
+ ` AI-Powered Solana DEX Trading Signals `,
310
+ `═══════════════════════════════════════════════`,
311
+ ``,
312
+ `CONNECTION STATUS:`,
313
+ ` Status : CONNECTED to CryptoIZ Data Engine`,
314
+ ` Payment : ${SVM_PRIVATE_KEY ? 'READY x402 Solana USDC autopay' : 'NOT SET — add SVM_PRIVATE_KEY to config'}`,
315
+ ` Price : $0.01 USDC per tool call`,
316
+ ` Wallet : DsKmdkYx49Xc1WhqMUAztwhdYPTqieyC98VmnnJdgpXX`,
317
+ ``,
318
+ `AVAILABLE TOOLS:`,
319
+ ` 1. get_alpha_scanner`,
320
+ ` Strongest Solana token signals with smart money analysis`,
321
+ ` Includes: CA, market cap, price, holder signals, sub-scores, risk flags`,
322
+ ``,
323
+ ` 2. get_divergence`,
324
+ ` Bullish/bearish divergence between price & whale/dolphin activity`,
325
+ ` Includes: CA, MC, price, confidence score, detection time`,
326
+ ``,
327
+ ` 3. get_accumulation`,
328
+ ` Tokens in active accumulation phase — composite score analysis`,
329
+ ` Includes: CA, 4 sub-scores (structure/accdist/holder/market)`,
330
+ ``,
331
+ ` 4. get_btc_regime`,
332
+ ` Bitcoin macro regime — Fear & Greed, OI, funding, indicators`,
333
+ ` Essential context for Solana altcoin trading`,
334
+ ``,
335
+ ` 5. get_status — This info`,
336
+ ``,
337
+ `HOW TO USE:`,
338
+ ` "Show me today's strongest Solana signals"`,
339
+ ` "Any bullish divergence on 4h timeframe?"`,
340
+ ` "Which tokens are whales accumulating right now?"`,
341
+ ` "What is BTC market condition?"`,
342
+ ``,
343
+ `ABOUT CRYPTOIZ:`,
344
+ ` CryptoIZ is an AI-powered Solana DEX trading platform.`,
345
+ ` This MCP gives you a PREVIEW of our signals.`,
346
+ ` For full access with real-time charts, alerts & VIP Telegram:`,
347
+ ``,
348
+ ` >>> https://cryptoiz.org | Plans from $15/week <<<`,
349
+ ` Twitter : @cryptoiz_IDN`,
350
+ ` Telegram: t.me/agus_artemiss`,
351
+ `═══════════════════════════════════════════════`,
146
352
  ].join('\n');
147
353
  }
148
354
 
149
355
  const TOOLS = [
150
- { name: 'get_alpha_scanner', description: 'Sinyal token Solana terkuat dari CryptoIZ Alpha Scanner lengkap dengan address, MC, price, holder signals, sub-scores, risks. $0.01 USDC/call.', inputSchema: { type: 'object', properties: { min_score: { type: 'number', description: 'Minimum alpha score (0-100).' }, entry_class: { type: 'string', enum: ['ALPHA_EARLY','ALPHA_BUILDING','WATCHLIST_ONLY'] } }, required: [] } },
151
- { name: 'get_divergence', description: 'Divergence signals dari CryptoIZ bullish/bearish dengan address, MC, confidence score. $0.01 USDC/call.', inputSchema: { type: 'object', properties: { timeframe: { type: 'string', enum: ['4h','1d'] }, limit: { type: 'number' } }, required: [] } },
152
- { name: 'get_accumulation', description: 'Token fase akumulasi dari CryptoIZ Accumulation Dashboard composite score, holder, market score + address. $0.01 USDC/call.', inputSchema: { type: 'object', properties: { min_composite: { type: 'number' } }, required: [] } },
153
- { name: 'get_status', description: 'Status koneksi CryptoIZ MCP dan info payment.', inputSchema: { type: 'object', properties: {}, required: [] } },
356
+ { name: 'get_alpha_scanner', description: 'Get strongest Solana token signals from CryptoIZ Alpha Scanner. Includes contract address, market cap, price, whale/dolphin/shrimp signals, sub-scores, risk flags, and entry recommendation. $0.01 USDC per call.', inputSchema: { type: 'object', properties: { min_score: { type: 'number', description: 'Minimum alpha score (0-100).' }, entry_class: { type: 'string', enum: ['ALPHA_EARLY','ALPHA_BUILDING','WATCHLIST_ONLY'] } }, required: [] } },
357
+ { name: 'get_divergence', description: 'Get bullish/bearish divergence signals from CryptoIZ. Detects when price moves opposite to whale/dolphin activity. Includes CA, MC, price, confidence score, detection time. $0.01 USDC per call.', inputSchema: { type: 'object', properties: { timeframe: { type: 'string', enum: ['4h','1d'], description: 'Timeframe. Default: 4h.' }, limit: { type: 'number', description: 'Max results (1-50). Default: 20.' } }, required: [] } },
358
+ { name: 'get_accumulation', description: 'Get tokens in active accumulation phase from CryptoIZ Accumulation Dashboard. Composite score from 4 dimensions: Structure, AccDist, Holder, Market. Includes CA. $0.01 USDC per call.', inputSchema: { type: 'object', properties: { min_composite: { type: 'number', description: 'Minimum composite score (0-100).' } }, required: [] } },
359
+ { name: 'get_btc_regime', description: 'Get Bitcoin macro regime from CryptoIZ BTC Monitor. Includes BTC price, Fear & Greed Index, OI regime, funding rate, futures signal, technical indicators (RSI/EMA/MACD). Critical context for Solana altcoin trading. $0.01 USDC per call.', inputSchema: { type: 'object', properties: {}, required: [] } },
360
+ { name: 'get_status', description: 'Check CryptoIZ MCP connection status, payment setup, and list of available tools.', inputSchema: { type: 'object', properties: {}, required: [] } },
154
361
  ];
155
362
 
156
- const server = new Server({ name: 'cryptoiz-mcp', version: '2.0.2' }, { capabilities: { tools: {} } });
363
+ const server = new Server({ name: 'cryptoiz-mcp', version: '2.2.0' }, { capabilities: { tools: {} } });
157
364
  server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
158
-
159
365
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
160
366
  const { name, arguments: args } = request.params;
161
367
  try {
162
368
  if (name === 'get_status') return { content: [{ type: 'text', text: formatStatus() }] };
163
-
164
369
  if (name === 'get_alpha_scanner') {
165
370
  const data = await payAndFetch(`${GATEWAY_URL}?tool=get_alpha_scanner`);
166
371
  if (args?.min_score && data.signals) { data.signals = data.signals.filter(s => s.alpha_score >= args.min_score); data.total = data.signals.length; }
167
372
  if (args?.entry_class && data.signals) { data.signals = data.signals.filter(s => s.entry_class === args.entry_class); data.total = data.signals.length; }
168
373
  return { content: [{ type: 'text', text: formatAlpha(data) }] };
169
374
  }
170
-
171
375
  if (name === 'get_divergence') {
172
376
  const p = new URLSearchParams({ tool: 'get_divergence' });
173
377
  if (args?.timeframe) p.set('tf', args.timeframe);
@@ -175,14 +379,16 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
175
379
  const data = await payAndFetch(`${GATEWAY_URL}?${p}`);
176
380
  return { content: [{ type: 'text', text: formatDivergence(data) }] };
177
381
  }
178
-
179
382
  if (name === 'get_accumulation') {
180
383
  const data = await payAndFetch(`${GATEWAY_URL}?tool=get_accumulation`);
181
384
  if (args?.min_composite && data.tokens) { data.tokens = data.tokens.filter(t => t.composite_score >= args.min_composite); data.total = data.tokens.length; }
182
- return { content: [{ type: 'text', text: formatAccum(data) }] };
385
+ return { content: [{ type: 'text', text: formatAccumulation(data) }] };
183
386
  }
184
-
185
- return { content: [{ type: 'text', text: `Tool tidak dikenal: ${name}` }], isError: true };
387
+ if (name === 'get_btc_regime') {
388
+ const data = await payAndFetch(`${GATEWAY_URL}?tool=get_btc_regime`);
389
+ return { content: [{ type: 'text', text: formatBTC(data) }] };
390
+ }
391
+ return { content: [{ type: 'text', text: `Unknown tool: ${name}` }], isError: true };
186
392
  } catch (err) {
187
393
  return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
188
394
  }