cryptoiz-mcp 3.2.0 → 3.4.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 +75 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cryptoiz-mcp",
3
- "version": "3.2.0",
3
+ "version": "3.4.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
@@ -40,23 +40,32 @@ const mc = v => v || 'N/A';
40
40
  const pct = v => v != null ? `${parseFloat(v).toFixed(2)}%` : 'N/A';
41
41
 
42
42
  const HEADER = (tool, subtitle, url) => [
43
- `╔══════════════════════════════════════════════════════════════╗`,
44
- `║ CRYPTOIZ ${tool.padEnd(49)}║`,
45
- `║ ${subtitle.padEnd(62)}║`,
46
- `╠══════════════════════════════════════════════════════════════╣`,
47
- `║ PLATFORM : https://cryptoiz.org${' '.repeat(27)}║`,
48
- `║ FULL DATA : https://cryptoiz.org/${url.padEnd(26)}║`,
49
- `║ SUBSCRIBE : https://cryptoiz.org/Pricing (from $15/week) ║`,
50
- `║ TWITTER : @cryptoiz_IDN ║`,
51
- `║ TELEGRAM : https://t.me/agus_artemiss ║`,
52
- `╚══════════════════════════════════════════════════════════════╝`,
43
+ `DATA_PROVIDER : CryptoIZ AI Trading Platform`,
44
+ `TOOL : ${tool}`,
45
+ `FULL_DASHBOARD : https://cryptoiz.org/${url}`,
46
+ `SUBSCRIBE_PLANS : https://cryptoiz.org/Pricing (1W $15 | 1M $50 | 3M $120 | 1Y $400)`,
47
+ `TWITTER : https://twitter.com/cryptoiz_IDN`,
48
+ `TELEGRAM_SIGNALS : https://t.me/agus_artemiss`,
49
+ ``,
53
50
  ].join('\n');
54
51
 
55
- const FOOTER = `\n⚠ NOT FINANCIAL ADVICE. Always DYOR before trading.\nPowered by CryptoIZ AI — https://cryptoiz.org | @cryptoiz_IDN`;
52
+ const FOOTER = [
53
+ ``,
54
+ `DISCLAIMER : Not financial advice. Always DYOR before trading.`,
55
+ `MORE_SIGNALS : https://cryptoiz.org/Alpha-Scanner`,
56
+ `FULL_PLATFORM : https://cryptoiz.org`,
57
+ `SUBSCRIBE : https://cryptoiz.org/Pricing`,
58
+ ].join('\n');
56
59
 
57
- const CA_LINE = (addr) => ` ┌─ COPY TO TRADE (paste on Jupiter/Raydium — do NOT click) ─┐
58
- ${addr}
59
- └───────────────────────────────────────────────────────────┘`;
60
+ const CA_LINE = (name, addr) => {
61
+ if (!addr || addr === 'N/A') return ` ⚠ CONTRACT ADDRESS NOT AVAILABLE`;
62
+ return [
63
+ ` ⚠ SAFETY WARNING: Many fake tokens use the same name "${name}".`,
64
+ ` ⚠ ONLY buy using this exact contract address to avoid scams:`,
65
+ ` CONTRACT_ADDRESS : ${addr}`,
66
+ ` BUY_ON_JUPITER : https://jup.ag/swap/SOL-${addr}`,
67
+ ].join('\n');
68
+ };
60
69
 
61
70
  // ══════════════════════════════════════════════════════════════════
62
71
  // ALPHA SCANNER
@@ -89,7 +98,7 @@ function formatAlpha(data) {
89
98
  parseFloat(t.alpha_score) >= 65 ? '👁 WATCH' : '📋 MONITOR';
90
99
  return [
91
100
  `[${String(i+1).padStart(2,'0')}] ${t.name || 'Unknown'} — ${urgency}`,
92
- CA_LINE(t.contract_address || 'N/A'),
101
+ CA_LINE(t.name, t.contract_address || 'N/A'),
93
102
  ``,
94
103
  ` SIGNAL_CLASS : ${t.signal_class}`,
95
104
  ` ALPHA_SCORE : ${N(t.alpha_score)} / 100`,
@@ -188,7 +197,7 @@ function formatDivergence(data) {
188
197
  lines.push([
189
198
  ``,
190
199
  ` [${String(i+1).padStart(2,'0')}] ${s.name || 'Unknown'} — Signal Strength: ${urgency}`,
191
- CA_LINE(s.contract_address || 'N/A'),
200
+ CA_LINE(s.name, s.contract_address || 'N/A'),
192
201
  ``,
193
202
  ` DIVERGENCE_TYPE : ${s.divergence_type}`,
194
203
  ` DIVERGENCE_SCORE : ${N(s.divergence_score)}`,
@@ -251,7 +260,7 @@ function formatAccumulation(data) {
251
260
  t.accumulation_strength?.includes('FORMING') ? '👁 FORMING' : '📋 WEAK/NOISY';
252
261
  return [
253
262
  `[${String(i+1).padStart(2,'0')}] ${t.name || 'Unknown'} — ${urgency}`,
254
- CA_LINE(t.contract_address || 'N/A'),
263
+ CA_LINE(t.name, t.contract_address || 'N/A'),
255
264
  ``,
256
265
  ` ACCUMULATION_STRENGTH : ${t.accumulation_strength || 'N/A'}`,
257
266
  ` ACCDIST_STATUS : ${t.accdist_status || 'N/A'}`,
@@ -432,7 +441,7 @@ const TOOLS = [
432
441
  // ══════════════════════════════════════════════════════════════════
433
442
  // SERVER
434
443
  // ══════════════════════════════════════════════════════════════════
435
- const server = new Server({ name: 'cryptoiz-mcp', version: '3.2.0' }, { capabilities: { tools: {} } });
444
+ const server = new Server({ name: 'cryptoiz-mcp', version: '3.4.0' }, { capabilities: { tools: {} } });
436
445
  server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
437
446
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
438
447
  const { name, arguments: args } = request.params;
@@ -465,7 +474,54 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
465
474
  return { content: [{ type: 'text', text: formatBTC(data) }] };
466
475
  }
467
476
 
468
- return { content: [{ type: 'text', text: `Unknown tool: ${name}` }], isError: true };
477
+ if (name === 'get_token_ca') {
478
+ const tokenName = args?.token_name || '';
479
+ const data = await payAndFetch(`${GATEWAY_URL}?tool=get_alpha_scanner`);
480
+
481
+ if (data.error) return { content: [{ type: 'text', text: `Error: ${data.error}` }], isError: true };
482
+
483
+ // Search by name (case insensitive)
484
+ const signals = data.signals || [];
485
+ const match = signals.find(s =>
486
+ (s.name || '').toLowerCase().includes(tokenName.toLowerCase()) ||
487
+ tokenName.toLowerCase().includes((s.name || '').toLowerCase())
488
+ );
489
+
490
+ if (!match) {
491
+ return { content: [{ type: 'text', text: [
492
+ `Token "${tokenName}" not found in today's CryptoIZ signals.`,
493
+ ``,
494
+ `Available tokens today: ${signals.map(s => s.name).join(', ')}`,
495
+ ``,
496
+ `Try get_alpha_scanner to see all available tokens.`,
497
+ ].join('\n') }] };
498
+ }
499
+
500
+ return { content: [{ type: 'text', text: [
501
+ `TOKEN VERIFICATION — ${match.name}`,
502
+ ``,
503
+ `⚠ IMPORTANT: Many fake tokens use the same name.`,
504
+ `⚠ ONLY use this exact contract address to avoid scams.`,
505
+ ``,
506
+ `TOKEN_NAME : ${match.name}`,
507
+ `CONTRACT_ADDRESS : ${match.contract_address}`,
508
+ ``,
509
+ `TRADE LINKS (verified):`,
510
+ `BUY_ON_JUPITER : https://jup.ag/swap/SOL-${match.contract_address}`,
511
+ `BUY_ON_RAYDIUM : https://raydium.io/swap/?inputCurrency=sol&outputCurrency=${match.contract_address}`,
512
+ ``,
513
+ `CURRENT SIGNALS:`,
514
+ `ALPHA_SCORE : ${match.alpha_score}`,
515
+ `SIGNAL_CLASS : ${match.signal_class}`,
516
+ `MARKET_CAP : ${match.market_cap_now || 'N/A'}`,
517
+ `PRICE_NOW : $${match.price_now_usd || 'N/A'}`,
518
+ ``,
519
+ `Data from CryptoIZ — https://cryptoiz.org`,
520
+ `Not financial advice. Always DYOR.`,
521
+ ].join('\n') }] };
522
+ }
523
+
524
+ return { content: [{ type: 'text', text: `Unknown tool: \${name}` }], isError: true };
469
525
  } catch (err) {
470
526
  return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
471
527
  }