cryptoiz-mcp 3.3.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 +57 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cryptoiz-mcp",
3
- "version": "3.3.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
@@ -57,12 +57,13 @@ const FOOTER = [
57
57
  `SUBSCRIBE : https://cryptoiz.org/Pricing`,
58
58
  ].join('\n');
59
59
 
60
- const CA_LINE = (addr) => {
61
- if (!addr || addr === 'N/A') return ` TRADE_LINK : N/A`;
60
+ const CA_LINE = (name, addr) => {
61
+ if (!addr || addr === 'N/A') return ` CONTRACT ADDRESS NOT AVAILABLE`;
62
62
  return [
63
+ ` ⚠ SAFETY WARNING: Many fake tokens use the same name "${name}".`,
64
+ ` ⚠ ONLY buy using this exact contract address to avoid scams:`,
63
65
  ` CONTRACT_ADDRESS : ${addr}`,
64
- ` TRADE_ON_JUPITER : https://jup.ag/swap/SOL-${addr}`,
65
- ` TRADE_ON_RAYDIUM : https://raydium.io/swap/?inputCurrency=sol&outputCurrency=${addr}`,
66
+ ` BUY_ON_JUPITER : https://jup.ag/swap/SOL-${addr}`,
66
67
  ].join('\n');
67
68
  };
68
69
 
@@ -97,7 +98,7 @@ function formatAlpha(data) {
97
98
  parseFloat(t.alpha_score) >= 65 ? '👁 WATCH' : '📋 MONITOR';
98
99
  return [
99
100
  `[${String(i+1).padStart(2,'0')}] ${t.name || 'Unknown'} — ${urgency}`,
100
- CA_LINE(t.contract_address || 'N/A'),
101
+ CA_LINE(t.name, t.contract_address || 'N/A'),
101
102
  ``,
102
103
  ` SIGNAL_CLASS : ${t.signal_class}`,
103
104
  ` ALPHA_SCORE : ${N(t.alpha_score)} / 100`,
@@ -196,7 +197,7 @@ function formatDivergence(data) {
196
197
  lines.push([
197
198
  ``,
198
199
  ` [${String(i+1).padStart(2,'0')}] ${s.name || 'Unknown'} — Signal Strength: ${urgency}`,
199
- CA_LINE(s.contract_address || 'N/A'),
200
+ CA_LINE(s.name, s.contract_address || 'N/A'),
200
201
  ``,
201
202
  ` DIVERGENCE_TYPE : ${s.divergence_type}`,
202
203
  ` DIVERGENCE_SCORE : ${N(s.divergence_score)}`,
@@ -259,7 +260,7 @@ function formatAccumulation(data) {
259
260
  t.accumulation_strength?.includes('FORMING') ? '👁 FORMING' : '📋 WEAK/NOISY';
260
261
  return [
261
262
  `[${String(i+1).padStart(2,'0')}] ${t.name || 'Unknown'} — ${urgency}`,
262
- CA_LINE(t.contract_address || 'N/A'),
263
+ CA_LINE(t.name, t.contract_address || 'N/A'),
263
264
  ``,
264
265
  ` ACCUMULATION_STRENGTH : ${t.accumulation_strength || 'N/A'}`,
265
266
  ` ACCDIST_STATUS : ${t.accdist_status || 'N/A'}`,
@@ -440,7 +441,7 @@ const TOOLS = [
440
441
  // ══════════════════════════════════════════════════════════════════
441
442
  // SERVER
442
443
  // ══════════════════════════════════════════════════════════════════
443
- const server = new Server({ name: 'cryptoiz-mcp', version: '3.3.0' }, { capabilities: { tools: {} } });
444
+ const server = new Server({ name: 'cryptoiz-mcp', version: '3.4.0' }, { capabilities: { tools: {} } });
444
445
  server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
445
446
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
446
447
  const { name, arguments: args } = request.params;
@@ -473,7 +474,54 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
473
474
  return { content: [{ type: 'text', text: formatBTC(data) }] };
474
475
  }
475
476
 
476
- 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 };
477
525
  } catch (err) {
478
526
  return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
479
527
  }