cryptoiz-mcp 3.5.0 → 4.0.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.
- package/package.json +1 -1
- package/src/index.js +277 -373
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -14,7 +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) return { error: 'SVM_PRIVATE_KEY not set.
|
|
17
|
+
if (!SVM_PRIVATE_KEY) return { error: 'SVM_PRIVATE_KEY not set.' };
|
|
18
18
|
const first = await fetch(url);
|
|
19
19
|
if (first.status !== 402) return first.json();
|
|
20
20
|
try {
|
|
@@ -34,370 +34,329 @@ async function payAndFetch(url) {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
const N = (v, d=2) => v != null && v !== 'N/A' ? parseFloat(v).toFixed(d) : 'N/A';
|
|
37
|
-
const sign = v => { const n = parseFloat(v); return n > 0 ? `+${n}` : `${n}`; };
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const pct = v => v != null ? `${parseFloat(v).toFixed(2)}%` : 'N/A';
|
|
41
|
-
|
|
42
|
-
const HEADER = (tool, subtitle, url) => [
|
|
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
|
-
``,
|
|
50
|
-
].join('\n');
|
|
51
|
-
|
|
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');
|
|
59
|
-
|
|
60
|
-
// CA embedded in name line — proven to work (v3.0.x)
|
|
61
|
-
// Claude cannot separate name from CA when on same line
|
|
62
|
-
const CA_LINE = (name, addr) => {
|
|
63
|
-
if (!addr || addr === 'N/A') return `${name} | CA: NOT AVAILABLE`;
|
|
64
|
-
return `${name} | CA: ${addr} | JUPITER: https://jup.ag/swap/SOL-${addr}`;
|
|
65
|
-
};
|
|
37
|
+
const sign = v => { const n = parseFloat(v||0); return n > 0 ? `+${n}` : `${n}`; };
|
|
38
|
+
const shortCA = ca => ca ? `${ca.slice(0,6)}...${ca.slice(-4)}` : 'N/A';
|
|
39
|
+
const jupLink = ca => ca ? `[Trade](https://jup.ag/swap/SOL-${ca})` : 'N/A';
|
|
66
40
|
|
|
67
41
|
// ══════════════════════════════════════════════════════════════════
|
|
68
|
-
// ALPHA SCANNER
|
|
42
|
+
// ALPHA SCANNER — Markdown Table Format
|
|
69
43
|
// ══════════════════════════════════════════════════════════════════
|
|
70
44
|
function formatAlpha(data) {
|
|
71
|
-
if (data.error) return
|
|
72
|
-
const
|
|
45
|
+
if (data.error) return `❌ **Error:** ${data.error}\n\nSetup: https://cryptoiz.org`;
|
|
46
|
+
const signals = data.signals || [];
|
|
47
|
+
const date = data.fetched_at?.split('T')[0];
|
|
73
48
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
49
|
+
// Group by class
|
|
50
|
+
const early = signals.filter(s => s.signal_class === 'ALPHA_EARLY');
|
|
51
|
+
const building = signals.filter(s => s.signal_class === 'ALPHA_BUILDING');
|
|
52
|
+
const watchlist = signals.filter(s => s.signal_class === 'WATCHLIST_ONLY');
|
|
53
|
+
const others = signals.filter(s => !['ALPHA_EARLY','ALPHA_BUILDING','WATCHLIST_ONLY'].includes(s.signal_class));
|
|
54
|
+
|
|
55
|
+
const tableRow = (s, i) => {
|
|
56
|
+
const risk = parseFloat(s.risk_liquidity_pct||0) > 0 || parseFloat(s.risk_trap_pct||0) > 0
|
|
57
|
+
? `⚠️ Liq:${N(s.risk_liquidity_pct)}% Trap:${N(s.risk_trap_pct)}%`
|
|
58
|
+
: '✅ Clear';
|
|
59
|
+
return `| ${i} | **${s.name}** | \`${s.contract_address||'N/A'}\` | ${N(s.alpha_score)} | ${s.phase||'N/A'} | ${sign(s.whale_delta)} | ${sign(s.dolphin_delta)} | ${s.market_cap_now||'N/A'} | $${s.price_now_usd||'N/A'} | ${N(s.score_safety)} | ${risk} | ${jupLink(s.contract_address)} |`;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const tableHeader = `| # | Token | Contract Address (CA) | Score | Phase | Whale Δ | Dolphin Δ | MC | Price | Safety | Risk | Trade |
|
|
63
|
+
|---|-------|----------------------|-------|-------|---------|-----------|-----|-------|--------|------|-------|`;
|
|
64
|
+
|
|
65
|
+
let out = [];
|
|
66
|
+
|
|
67
|
+
out.push(`## 🔍 CryptoIZ Alpha Entry Scanner`);
|
|
68
|
+
out.push(`**Date:** ${date} | **Total Signals:** ${data.total_signals} | **Source:** https://cryptoiz.org/Alpha-Scanner`);
|
|
69
|
+
out.push(`**Subscribe:** https://cryptoiz.org/Pricing (1W $15 | 1M $50) | **Twitter:** @cryptoiz_IDN | **Telegram:** https://t.me/agus_artemiss`);
|
|
70
|
+
out.push(``);
|
|
71
|
+
out.push(`> ℹ️ **How to read:** Score 0-100 | Whale/Dolphin Δ = smart money movement | ⚠️ = risk flag | CA = contract address`);
|
|
72
|
+
out.push(`> ⚠️ **Safety:** Many fake tokens share the same name. Always use the exact CA below to trade.`);
|
|
73
|
+
out.push(``);
|
|
74
|
+
|
|
75
|
+
if (early.length) {
|
|
76
|
+
out.push(`### 🟢 ALPHA_EARLY — Best Entry (Smart Money Just Entering)`);
|
|
77
|
+
out.push(`> Phase: Early accumulation | Timing: Optimal | Action: Priority entry`);
|
|
78
|
+
out.push(tableHeader);
|
|
79
|
+
early.forEach((s, i) => out.push(tableRow(s, i+1)));
|
|
80
|
+
out.push(``);
|
|
81
|
+
out.push(`**Full CA for copy-paste:**`);
|
|
82
|
+
early.forEach(s => out.push(`- **${s.name}:** \`${s.contract_address}\` → ${jupLink(s.contract_address)}`));
|
|
83
|
+
out.push(``);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if (building.length) {
|
|
87
|
+
out.push(`### 🔵 ALPHA_BUILDING — Still Valid, Less Optimal Timing`);
|
|
88
|
+
out.push(`> Accumulation ongoing | Still good entry | Monitor closely`);
|
|
89
|
+
out.push(tableHeader);
|
|
90
|
+
building.forEach((s, i) => out.push(tableRow(s, i+1)));
|
|
91
|
+
out.push(``);
|
|
92
|
+
out.push(`**Full CA for copy-paste:**`);
|
|
93
|
+
building.forEach(s => out.push(`- **${s.name}:** \`${s.contract_address}\` → ${jupLink(s.contract_address)}`));
|
|
94
|
+
out.push(``);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (watchlist.length) {
|
|
98
|
+
out.push(`### 🟡 WATCHLIST_ONLY — Not Ready Yet`);
|
|
99
|
+
out.push(tableHeader);
|
|
100
|
+
watchlist.slice(0,10).forEach((s, i) => out.push(tableRow(s, i+1)));
|
|
101
|
+
if (watchlist.length > 10) out.push(`| ... | *+${watchlist.length-10} more* | | | | | | | | | | |`);
|
|
102
|
+
out.push(``);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if (others.length) {
|
|
106
|
+
out.push(`### 🔴 LATE/WEAK/TRAP — Skip or Extreme Caution`);
|
|
107
|
+
out.push(`> ${others.map(s => `${s.name} (${N(s.alpha_score)})`).join(', ')}`);
|
|
108
|
+
out.push(``);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
out.push(`---`);
|
|
112
|
+
out.push(`⚠️ *Not financial advice. Always DYOR. Data: [CryptoIZ](https://cryptoiz.org) | @cryptoiz_IDN*`);
|
|
113
|
+
return out.join('\n');
|
|
133
114
|
}
|
|
134
115
|
|
|
135
116
|
// ══════════════════════════════════════════════════════════════════
|
|
136
|
-
// DIVERGENCE
|
|
117
|
+
// DIVERGENCE — Markdown Table Format
|
|
137
118
|
// ══════════════════════════════════════════════════════════════════
|
|
138
119
|
function formatDivergence(data) {
|
|
139
|
-
if (data.error) return
|
|
140
|
-
const byType = data.signals_by_type || {};
|
|
120
|
+
if (data.error) return `❌ **Error:** ${data.error}`;
|
|
141
121
|
const total = data.total_signals || 0;
|
|
122
|
+
const date = data.fetched_at?.split('T')[0];
|
|
123
|
+
const byType = data.signals_by_type || {};
|
|
142
124
|
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
` Confidence % = AI confidence in the signal`,
|
|
161
|
-
` Whale Now/Prev = Absolute whale holder count change`,
|
|
162
|
-
` Price Change % = Price movement this period`,
|
|
163
|
-
``,
|
|
164
|
-
`═══════════════════════════════════════════════════════════════`,
|
|
165
|
-
];
|
|
125
|
+
const tableHeader = `| # | Token | Contract Address (CA) | Div Score | Confidence | Whale Now→Prev | Dolphin Δ | Price | MC | Detected | Trade |
|
|
126
|
+
|---|-------|----------------------|-----------|------------|----------------|-----------|-------|-----|----------|-------|`;
|
|
127
|
+
|
|
128
|
+
const tableRow = (s, i) =>
|
|
129
|
+
`| ${i} | **${s.name||'N/A'}** | \`${s.contract_address||'N/A'}\` | ${N(s.divergence_score)} | ${N(s.confidence_pct)}% | ${s.whale_holders_now||'?'}→${s.whale_holders_prev||'?'} (+${s.whale_delta||0}) | ${sign(s.dolphin_delta)} | $${s.price_now_usd||'N/A'} | ${s.market_cap_usd||'N/A'} | ${s.detected||'N/A'} | ${jupLink(s.contract_address)} |`;
|
|
130
|
+
|
|
131
|
+
let out = [];
|
|
132
|
+
out.push(`## 📊 CryptoIZ Divergence Scanner`);
|
|
133
|
+
out.push(`**Date:** ${date} | **Timeframe:** ${(data.timeframe||'4h').toUpperCase()} | **Total Signals:** ${total}`);
|
|
134
|
+
out.push(`**Source:** https://cryptoiz.org/Divergence | **Subscribe:** https://cryptoiz.org/Pricing | **Twitter:** @cryptoiz_IDN`);
|
|
135
|
+
out.push(``);
|
|
136
|
+
out.push(`> **Divergence Types:**`);
|
|
137
|
+
out.push(`> - **HIDDEN_ACCUMULATION** = Price flat/weak but whales quietly buying → stealth entry before move`);
|
|
138
|
+
out.push(`> - **BREAKOUT_ACCUMULATION** = Whales buying on price breakout → momentum entry`);
|
|
139
|
+
out.push(`> - **CLASSIC_DIVERGENCE** = Price & smart money opposite direction → reversal signal`);
|
|
140
|
+
out.push(`> ⚠️ Always use the exact CA to trade. Many tokens share the same name.`);
|
|
141
|
+
out.push(``);
|
|
166
142
|
|
|
167
143
|
if (!total) {
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return
|
|
144
|
+
out.push(`*No divergence signals detected at this time. Normal during sideways/low-volatility markets. Try again later or switch timeframe to 1d.*`);
|
|
145
|
+
out.push(``);
|
|
146
|
+
out.push(`---`);
|
|
147
|
+
out.push(`⚠️ *Not financial advice. Data: [CryptoIZ](https://cryptoiz.org) | @cryptoiz_IDN*`);
|
|
148
|
+
return out.join('\n');
|
|
173
149
|
}
|
|
174
150
|
|
|
175
151
|
const typeOrder = ['HIDDEN_ACCUMULATION','BREAKOUT_ACCUMULATION','CLASSIC_DIVERGENCE'];
|
|
176
152
|
const typeDesc = {
|
|
177
|
-
HIDDEN_ACCUMULATION: '
|
|
178
|
-
BREAKOUT_ACCUMULATION: '
|
|
179
|
-
CLASSIC_DIVERGENCE: '
|
|
153
|
+
HIDDEN_ACCUMULATION: '🫥 Stealth smart money entry — price weak but whales buying quietly',
|
|
154
|
+
BREAKOUT_ACCUMULATION: '🚀 Momentum entry — whales chasing breakout aggressively',
|
|
155
|
+
CLASSIC_DIVERGENCE: '🔄 Reversal signal — price and smart money in opposite directions',
|
|
180
156
|
};
|
|
181
157
|
|
|
182
158
|
typeOrder.forEach(type => {
|
|
183
159
|
const sigs = byType[type] || [];
|
|
184
160
|
if (!sigs.length) return;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
parseFloat(s.divergence_score) > 50 ? '👁 MODERATE' : '📋 LOW';
|
|
193
|
-
lines.push([
|
|
194
|
-
``,
|
|
195
|
-
` [${String(i+1).padStart(2,'0')}] ${CA_LINE(s.name || "Unknown", s.contract_address || "N/A")} — ${urgency}`,
|
|
196
|
-
``,
|
|
197
|
-
` DIVERGENCE_TYPE : ${s.divergence_type}`,
|
|
198
|
-
` DIVERGENCE_SCORE : ${N(s.divergence_score)}`,
|
|
199
|
-
` CONFIDENCE : ${pct(s.confidence_pct)}`,
|
|
200
|
-
` CURRENT_PHASE : ${s.current_phase || 'N/A'}`,
|
|
201
|
-
``,
|
|
202
|
-
` ── HOLDER MOVEMENT ──────────────────────────────`,
|
|
203
|
-
` WHALE_HOLDERS_NOW : ${s.whale_holders_now || 'N/A'} wallets`,
|
|
204
|
-
` WHALE_HOLDERS_PREV : ${s.whale_holders_prev || 'N/A'} wallets`,
|
|
205
|
-
` WHALE_DELTA : ${sign(s.whale_delta)} (new whales entering)`,
|
|
206
|
-
` DOLPHIN_DELTA : ${sign(s.dolphin_delta)}`,
|
|
207
|
-
``,
|
|
208
|
-
` ── PRICE & MARKET ───────────────────────────────`,
|
|
209
|
-
` PRICE_NOW : $${s.price_now_usd || 'N/A'}`,
|
|
210
|
-
` PRICE_PREV_PERIOD : $${s.price_prev_usd || 'N/A'}`,
|
|
211
|
-
` PRICE_CHANGE : ${pct(s.price_change_pct)}`,
|
|
212
|
-
` MARKET_CAP : ${s.market_cap_usd || 'N/A'}`,
|
|
213
|
-
` SIGNAL_AGE : ${s.detected || 'N/A'}`,
|
|
214
|
-
``,
|
|
215
|
-
`───────────────────────────────────────────────────────────`,
|
|
216
|
-
].join('\n'));
|
|
217
|
-
});
|
|
161
|
+
out.push(`### ${typeDesc[type]}`);
|
|
162
|
+
out.push(tableHeader);
|
|
163
|
+
sigs.forEach((s, i) => out.push(tableRow(s, i+1)));
|
|
164
|
+
out.push(``);
|
|
165
|
+
out.push(`**Full CA for copy-paste:**`);
|
|
166
|
+
sigs.forEach(s => out.push(`- **${s.name}:** \`${s.contract_address}\` → ${jupLink(s.contract_address)}`));
|
|
167
|
+
out.push(``);
|
|
218
168
|
});
|
|
219
169
|
|
|
220
|
-
|
|
221
|
-
|
|
170
|
+
out.push(`---`);
|
|
171
|
+
out.push(`⚠️ *Not financial advice. Always DYOR. Data: [CryptoIZ](https://cryptoiz.org/Divergence) | @cryptoiz_IDN*`);
|
|
172
|
+
return out.join('\n');
|
|
222
173
|
}
|
|
223
174
|
|
|
224
175
|
// ══════════════════════════════════════════════════════════════════
|
|
225
|
-
// ACCUMULATION
|
|
176
|
+
// ACCUMULATION — Markdown Table Format
|
|
226
177
|
// ══════════════════════════════════════════════════════════════════
|
|
227
178
|
function formatAccumulation(data) {
|
|
228
|
-
if (data.error) return
|
|
179
|
+
if (data.error) return `❌ **Error:** ${data.error}`;
|
|
229
180
|
const tokens = data.tokens || [];
|
|
181
|
+
const date = data.fetched_at?.split('T')[0];
|
|
230
182
|
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
t.accumulation_strength?.includes('FORMING') ? '👁 FORMING' : '📋 WEAK/NOISY';
|
|
256
|
-
return [
|
|
257
|
-
`[${String(i+1).padStart(2,'0')}] ${CA_LINE(t.name || "Unknown", t.contract_address || "N/A")} — ${urgency}`,
|
|
258
|
-
``,
|
|
259
|
-
` ACCUMULATION_STRENGTH : ${t.accumulation_strength || 'N/A'}`,
|
|
260
|
-
` ACCDIST_STATUS : ${t.accdist_status || 'N/A'}`,
|
|
261
|
-
``,
|
|
262
|
-
` ── COMPOSITE SCORE: ${N(t.score_composite)} / 100 ─────────────────`,
|
|
263
|
-
` SCORE_STRUCTURE : ${N(t.score_structure)}`,
|
|
264
|
-
` SCORE_ACCDIST : ${N(t.score_accdist)}`,
|
|
265
|
-
` SCORE_HOLDER : ${N(t.score_holder)}`,
|
|
266
|
-
` SCORE_MARKET : ${N(t.score_market)}`,
|
|
267
|
-
``,
|
|
268
|
-
` ── MARKET DATA ─────────────────────────────────────`,
|
|
269
|
-
` MARKET_CAP_NOW : ${mc(t.market_cap_now)}`,
|
|
270
|
-
` PRICE_NOW : $${t.price_now_usd || 'N/A'}`,
|
|
271
|
-
` LAST_UPDATED : ${t.last_updated || 'N/A'}`,
|
|
272
|
-
``,
|
|
273
|
-
`═══════════════════════════════════════════════════════════`,
|
|
274
|
-
].join('\n');
|
|
275
|
-
}),
|
|
276
|
-
FOOTER,
|
|
277
|
-
];
|
|
278
|
-
return lines.join('\n');
|
|
183
|
+
const tableHeader = `| # | Token | Contract Address (CA) | Composite | Strength | Structure | AccDist | Holder | Market | MC | Price | Trade |
|
|
184
|
+
|---|-------|----------------------|-----------|----------|-----------|---------|--------|--------|-----|-------|-------|`;
|
|
185
|
+
|
|
186
|
+
const tableRow = (t, i) =>
|
|
187
|
+
`| ${i} | **${t.name||'N/A'}** | \`${t.contract_address||'N/A'}\` | **${N(t.score_composite)}** | ${t.accumulation_strength||'N/A'} | ${N(t.score_structure)} | ${N(t.score_accdist)} | ${N(t.score_holder)} | ${N(t.score_market)} | ${t.market_cap_now||'N/A'} | $${t.price_now_usd||'N/A'} | ${jupLink(t.contract_address)} |`;
|
|
188
|
+
|
|
189
|
+
let out = [];
|
|
190
|
+
out.push(`## 💰 CryptoIZ Accumulation Dashboard`);
|
|
191
|
+
out.push(`**Date:** ${date} | **Total:** ${data.total_tokens} tokens | **Source:** https://cryptoiz.org/Dashboard`);
|
|
192
|
+
out.push(`**Subscribe:** https://cryptoiz.org/Pricing (1W $15 | 1M $50) | **Twitter:** @cryptoiz_IDN | **Telegram:** https://t.me/agus_artemiss`);
|
|
193
|
+
out.push(``);
|
|
194
|
+
out.push(`> **4-Dimension Scoring:** Structure (price action) + AccDist (accum vs distrib) + Holder (quality) + Market (conditions)`);
|
|
195
|
+
out.push(`> **Strength:** VERY_STRONG → STRONG_FORMING → FORMING → WEAK/NOISY`);
|
|
196
|
+
out.push(`> ⚠️ Always use the exact CA to trade. Many tokens share the same name.`);
|
|
197
|
+
out.push(``);
|
|
198
|
+
out.push(tableHeader);
|
|
199
|
+
tokens.forEach((t, i) => out.push(tableRow(t, i+1)));
|
|
200
|
+
out.push(``);
|
|
201
|
+
out.push(`**Full CA for copy-paste:**`);
|
|
202
|
+
tokens.slice(0, 10).forEach(t => out.push(`- **${t.name}:** \`${t.contract_address}\` → ${jupLink(t.contract_address)}`));
|
|
203
|
+
out.push(``);
|
|
204
|
+
out.push(`---`);
|
|
205
|
+
out.push(`⚠️ *Not financial advice. Always DYOR. Data: [CryptoIZ](https://cryptoiz.org) | @cryptoiz_IDN*`);
|
|
206
|
+
return out.join('\n');
|
|
279
207
|
}
|
|
280
208
|
|
|
281
209
|
// ══════════════════════════════════════════════════════════════════
|
|
282
|
-
// BTC REGIME
|
|
210
|
+
// BTC REGIME — Markdown Format
|
|
283
211
|
// ══════════════════════════════════════════════════════════════════
|
|
284
212
|
function formatBTC(data) {
|
|
285
|
-
if (data.error) return
|
|
286
|
-
const regime = (data.btc_regime
|
|
287
|
-
const
|
|
288
|
-
const fgi = parseFloat(data.fear_and_greed_index
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
const
|
|
293
|
-
? '✅ BTC BULLISH →
|
|
294
|
-
: regime
|
|
295
|
-
? '
|
|
296
|
-
: '🟡 BTC NEUTRAL → Be
|
|
297
|
-
const
|
|
298
|
-
const rsiNote =
|
|
213
|
+
if (data.error) return `❌ **Error:** ${data.error}`;
|
|
214
|
+
const regime = (data.btc_regime||'UNKNOWN').toUpperCase();
|
|
215
|
+
const icon = regime==='BULL' ? '🟢' : regime==='BEAR' ? '🔴' : '🟡';
|
|
216
|
+
const fgi = parseFloat(data.fear_and_greed_index||0);
|
|
217
|
+
const fgiCtx = fgi<=25 ? '📉 Extreme Fear — historically strong contrarian buy zone' :
|
|
218
|
+
fgi>=75 ? '📈 Extreme Greed — elevated reversal risk' :
|
|
219
|
+
'➡️ Neutral — follow technical signals';
|
|
220
|
+
const advice = regime==='BULL'
|
|
221
|
+
? '✅ **BTC BULLISH** → Good conditions for altcoin entries. Focus on high Alpha Score tokens.'
|
|
222
|
+
: regime==='BEAR'
|
|
223
|
+
? '⚠️ **BTC BEARISH** → Size down. Only enter tokens with Safety ≥80 and CLEAR risk flags.'
|
|
224
|
+
: '🟡 **BTC NEUTRAL** → Be selective. Wait for confirmation before large entries.';
|
|
225
|
+
const rsi = parseFloat(data.rsi_1h||50);
|
|
226
|
+
const rsiNote = rsi<30 ? '🟢 Oversold' : rsi>70 ? '🔴 Overbought' : '⚪ Normal';
|
|
299
227
|
|
|
300
228
|
return [
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
229
|
+
`## ${icon} CryptoIZ BTC Regime Monitor`,
|
|
230
|
+
`**Date:** ${data.fetched_at?.split('T')[0]} | **Source:** https://cryptoiz.org/BTC | **Twitter:** @cryptoiz_IDN`,
|
|
231
|
+
`**Subscribe:** https://cryptoiz.org/Pricing (1W $15 | 1M $50 | 3M $120 | 1Y $400)`,
|
|
304
232
|
``,
|
|
305
|
-
|
|
233
|
+
`### ${icon} BTC Regime: **${regime}**`,
|
|
306
234
|
``,
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
235
|
+
`| Metric | Value |`,
|
|
236
|
+
`|--------|-------|`,
|
|
237
|
+
`| 💵 BTC Price | **$${data.btc_price_usd||'N/A'}** |`,
|
|
238
|
+
`| 📊 BTC Score | **${data.btc_score}/10** (0=extreme bear, 10=extreme bull) |`,
|
|
239
|
+
`| 📈 Trend | ${data.btc_trend||'N/A'} |`,
|
|
240
|
+
`| 📂 Open Interest | ${data.open_interest||'N/A'} |`,
|
|
241
|
+
`| 💸 Funding Rate | ${data.funding_rate||'N/A'} |`,
|
|
312
242
|
``,
|
|
313
|
-
|
|
243
|
+
`### 😨 Market Sentiment`,
|
|
314
244
|
``,
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
245
|
+
`| Metric | Value |`,
|
|
246
|
+
`|--------|-------|`,
|
|
247
|
+
`| Fear & Greed Index | **${data.fear_and_greed_index}/100 — ${data.fear_and_greed_label||'N/A'}** |`,
|
|
248
|
+
`| Context | ${fgiCtx} |`,
|
|
318
249
|
``,
|
|
319
|
-
|
|
250
|
+
`### 📊 Futures Market`,
|
|
320
251
|
``,
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
252
|
+
`| Metric | Value |`,
|
|
253
|
+
`|--------|-------|`,
|
|
254
|
+
`| Futures Signal | **${data.futures_signal||'N/A'}** |`,
|
|
255
|
+
`| OI Regime | ${data.oi_regime||'N/A'} |`,
|
|
256
|
+
`| Funding Regime | ${data.funding_regime||'N/A'} |`,
|
|
257
|
+
`| Perp Price | $${data.perp_price_usd||'N/A'} |`,
|
|
258
|
+
`| Context | ${data.futures_context||'N/A'} |`,
|
|
326
259
|
``,
|
|
327
|
-
|
|
260
|
+
`### 📉 Technical Indicators (1H)`,
|
|
328
261
|
``,
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
262
|
+
`| Indicator | Value | Signal |`,
|
|
263
|
+
`|-----------|-------|--------|`,
|
|
264
|
+
`| RSI | ${data.rsi_1h||'N/A'} | ${rsiNote} |`,
|
|
265
|
+
`| EMA 20 | $${data.ema20_1h||'N/A'} | — |`,
|
|
266
|
+
`| EMA 50 | $${data.ema50_1h||'N/A'} | — |`,
|
|
267
|
+
`| MACD | ${data.macd_1h||'N/A'} | — |`,
|
|
268
|
+
`| MACD Signal | ${data.macd_signal_1h||'N/A'} | — |`,
|
|
334
269
|
``,
|
|
335
|
-
|
|
270
|
+
`### 💡 Altcoin Recommendation`,
|
|
336
271
|
``,
|
|
337
|
-
|
|
338
|
-
` ${altAdvice}`,
|
|
272
|
+
advice,
|
|
339
273
|
``,
|
|
340
|
-
|
|
341
|
-
`>>> https://cryptoiz.org/Alpha-Scanner <<<`,
|
|
274
|
+
`**Best entry signals for this regime:** https://cryptoiz.org/Alpha-Scanner`,
|
|
342
275
|
``,
|
|
343
|
-
|
|
344
|
-
|
|
276
|
+
`---`,
|
|
277
|
+
`⚠️ *Not financial advice. Always DYOR. Data: [CryptoIZ](https://cryptoiz.org/BTC) | @cryptoiz_IDN*`,
|
|
345
278
|
].join('\n');
|
|
346
279
|
}
|
|
347
280
|
|
|
348
281
|
// ══════════════════════════════════════════════════════════════════
|
|
349
|
-
//
|
|
282
|
+
// GET TOKEN CA — Free tool
|
|
350
283
|
// ══════════════════════════════════════════════════════════════════
|
|
351
|
-
function
|
|
284
|
+
async function getTokenCA(tokenName, data) {
|
|
285
|
+
const signals = data.signals || [];
|
|
286
|
+
const match = signals.find(s =>
|
|
287
|
+
(s.name||'').toLowerCase().includes(tokenName.toLowerCase()) ||
|
|
288
|
+
tokenName.toLowerCase().includes((s.name||'').toLowerCase())
|
|
289
|
+
);
|
|
290
|
+
if (!match) {
|
|
291
|
+
return [
|
|
292
|
+
`### ❌ Token "${tokenName}" not found in today's CryptoIZ signals`,
|
|
293
|
+
``,
|
|
294
|
+
`Available tokens: ${signals.slice(0,20).map(s => s.name).join(', ')}`,
|
|
295
|
+
``,
|
|
296
|
+
`Try [get_alpha_scanner] to see all signals.`,
|
|
297
|
+
].join('\n');
|
|
298
|
+
}
|
|
352
299
|
return [
|
|
353
|
-
|
|
300
|
+
`### 🔐 Contract Address Verification — ${match.name}`,
|
|
354
301
|
``,
|
|
355
|
-
|
|
356
|
-
`PAYMENT_STATUS : ${SVM_PRIVATE_KEY ? 'READY — x402 Solana USDC autopay ($0.01/call)' : 'NOT SET — add SVM_PRIVATE_KEY to Claude Desktop config'}`,
|
|
357
|
-
`PAYMENT_WALLET : DsKmdkYx49Xc1WhqMUAztwhdYPTqieyC98VmnnJdgpXX`,
|
|
302
|
+
`> ⚠️ **SAFETY:** Many fake tokens use the same name "${match.name}". Use ONLY this exact CA.`,
|
|
358
303
|
``,
|
|
359
|
-
|
|
304
|
+
`| Field | Value |`,
|
|
305
|
+
`|-------|-------|`,
|
|
306
|
+
`| Token Name | **${match.name}** |`,
|
|
307
|
+
`| Contract Address | \`${match.contract_address}\` |`,
|
|
308
|
+
`| Alpha Score | ${N(match.alpha_score)} |`,
|
|
309
|
+
`| Signal Class | ${match.signal_class} |`,
|
|
310
|
+
`| Market Cap | ${match.market_cap_now||'N/A'} |`,
|
|
311
|
+
`| Price | $${match.price_now_usd||'N/A'} |`,
|
|
360
312
|
``,
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
` → Sub-scores: Accumulation / Timing / Safety`,
|
|
365
|
-
` → Risk flags: Liquidity / Trap`,
|
|
366
|
-
` → MC & Price NOW + MC & Price WHEN SIGNAL FORMED`,
|
|
367
|
-
` → Contract address (copy to trade on DEX)`,
|
|
368
|
-
` → Full: https://cryptoiz.org/Alpha-Scanner`,
|
|
313
|
+
`**Trade Links (verified):**`,
|
|
314
|
+
`- 🪐 Jupiter: https://jup.ag/swap/SOL-${match.contract_address}`,
|
|
315
|
+
`- ⚡ Raydium: https://raydium.io/swap/?inputCurrency=sol&outputCurrency=${match.contract_address}`,
|
|
369
316
|
``,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
317
|
+
`---`,
|
|
318
|
+
`*Data: [CryptoIZ](https://cryptoiz.org) | @cryptoiz_IDN*`,
|
|
319
|
+
].join('\n');
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// ══════════════════════════════════════════════════════════════════
|
|
323
|
+
// STATUS
|
|
324
|
+
// ══════════════════════════════════════════════════════════════════
|
|
325
|
+
function formatStatus() {
|
|
326
|
+
return [
|
|
327
|
+
`## 🚀 CryptoIZ MCP Server v4.0.0`,
|
|
328
|
+
``,
|
|
329
|
+
`**AI-Powered Solana DEX Trading Signal Platform**`,
|
|
330
|
+
``,
|
|
331
|
+
`| Field | Value |`,
|
|
332
|
+
`|-------|-------|`,
|
|
333
|
+
`| Status | ✅ CONNECTED |`,
|
|
334
|
+
`| Payment | ${SVM_PRIVATE_KEY ? '✅ READY — x402 Solana USDC ($0.01/call)' : '❌ NOT SET — add SVM_PRIVATE_KEY'} |`,
|
|
335
|
+
`| Platform | https://cryptoiz.org |`,
|
|
336
|
+
`| Twitter | @cryptoiz_IDN |`,
|
|
337
|
+
`| Telegram | https://t.me/agus_artemiss |`,
|
|
338
|
+
``,
|
|
339
|
+
`### Available Tools`,
|
|
340
|
+
``,
|
|
341
|
+
`| Tool | Description | Cost | Data |`,
|
|
342
|
+
`|------|-------------|------|------|`,
|
|
343
|
+
`| get_alpha_scanner | Strongest Solana signals with smart money analysis | $0.01 USDC | Score, Phase, Whale/Dolphin, MC, Price, CA, Jupiter link |`,
|
|
344
|
+
`| get_divergence | 3-type divergence: Hidden/Breakout/Classic | $0.01 USDC | Score, Confidence, Whale now vs prev, Price, MC, CA |`,
|
|
345
|
+
`| get_accumulation | 4-dimension accumulation scoring | $0.01 USDC | Composite + 4 sub-scores, MC, Price, CA |`,
|
|
346
|
+
`| get_btc_regime | Bitcoin macro regime + altcoin recommendation | $0.01 USDC | Price, Score, Fear&Greed, OI, Funding, RSI/EMA/MACD |`,
|
|
347
|
+
`| get_token_ca | Get exact CA for specific token (scam protection) | FREE | Full CA + Jupiter + Raydium links |`,
|
|
348
|
+
`| get_status | This info | FREE | — |`,
|
|
349
|
+
``,
|
|
350
|
+
`### Subscription Plans`,
|
|
351
|
+
``,
|
|
352
|
+
`| Plan | Price |`,
|
|
353
|
+
`|------|-------|`,
|
|
354
|
+
`| 1 Week | $15 |`,
|
|
355
|
+
`| 1 Month | $50 |`,
|
|
356
|
+
`| 3 Months | $120 |`,
|
|
357
|
+
`| 1 Year | $400 |`,
|
|
358
|
+
``,
|
|
359
|
+
`**Subscribe:** https://cryptoiz.org/Pricing`,
|
|
401
360
|
].join('\n');
|
|
402
361
|
}
|
|
403
362
|
|
|
@@ -405,37 +364,18 @@ function formatStatus() {
|
|
|
405
364
|
// TOOL DEFINITIONS
|
|
406
365
|
// ══════════════════════════════════════════════════════════════════
|
|
407
366
|
const TOOLS = [
|
|
408
|
-
{
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
name: 'get_divergence',
|
|
415
|
-
description: 'CryptoIZ Divergence Scanner — detects 3 types: HIDDEN_ACCUMULATION (price weak but whales buying), BREAKOUT_ACCUMULATION (whales buying breakouts), CLASSIC_DIVERGENCE (price vs smart money opposite direction). Returns: contract address, divergence type with explanation, score, confidence %, whale holders now vs previous period, dolphin delta, price now vs previous, price change %, market cap, signal age. $0.01 USDC/call. Platform: https://cryptoiz.org/Divergence',
|
|
416
|
-
inputSchema: { type: 'object', properties: { timeframe: { type: 'string', enum: ['4h','1d'], description: 'Default: 4h' }, limit: { type: 'number', description: 'Max results 1-50, default 30' } }, required: [] }
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
name: 'get_accumulation',
|
|
420
|
-
description: 'CryptoIZ Accumulation Dashboard — tokens in active accumulation phase scored on 4 dimensions: Structure (price action patterns), AccDist (accumulation vs distribution ratio), Holder (quality and loyalty), Market (conditions and volume). Returns: contract address, composite score, all 4 sub-scores, strength label, market cap, price, last updated. $0.01 USDC/call. Platform: https://cryptoiz.org/Dashboard',
|
|
421
|
-
inputSchema: { type: 'object', properties: { min_composite: { type: 'number', description: 'Minimum composite score 0-100' } }, required: [] }
|
|
422
|
-
},
|
|
423
|
-
{
|
|
424
|
-
name: 'get_btc_regime',
|
|
425
|
-
description: 'CryptoIZ BTC Regime Monitor — Bitcoin macro condition critical for Solana altcoin trading. Returns: BTC price, regime score 0-10, trend, open interest, funding rate, Fear & Greed Index with interpretation, futures signal, OI regime, funding regime, perp price, RSI/EMA20/EMA50/MACD (1H timeframe), altcoin recommendation. $0.01 USDC/call. Platform: https://cryptoiz.org/BTC',
|
|
426
|
-
inputSchema: { type: 'object', properties: {}, required: [] }
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
name: 'get_status',
|
|
430
|
-
description: 'Check CryptoIZ MCP server v3.2.0 connection status, payment setup, and complete list of all tools with full data descriptions. Platform: https://cryptoiz.org',
|
|
431
|
-
inputSchema: { type: 'object', properties: {}, required: [] }
|
|
432
|
-
},
|
|
367
|
+
{ name: 'get_alpha_scanner', description: 'CryptoIZ Alpha Scanner — Solana smart money signals in markdown table format. Shows contract address, Jupiter trade link, alpha score, class, phase, whale/dolphin signals, sub-scores, risk flags, MC, price. $0.01 USDC/call.', inputSchema: { type: 'object', properties: { min_score: { type: 'number' }, entry_class: { type: 'string', enum: ['ALPHA_EARLY','ALPHA_BUILDING','WATCHLIST_ONLY'] } }, required: [] } },
|
|
368
|
+
{ name: 'get_divergence', description: 'CryptoIZ Divergence Scanner — 3 types in table format: HIDDEN_ACCUMULATION, BREAKOUT_ACCUMULATION, CLASSIC_DIVERGENCE. Shows CA, Jupiter link, score, confidence, whale holders now vs prev. $0.01 USDC/call.', inputSchema: { type: 'object', properties: { timeframe: { type: 'string', enum: ['4h','1d'] }, limit: { type: 'number' } }, required: [] } },
|
|
369
|
+
{ name: 'get_accumulation', description: 'CryptoIZ Accumulation Dashboard — 4-dimension scoring table. Shows CA, Jupiter link, composite + 4 sub-scores (structure/accdist/holder/market), MC, price. $0.01 USDC/call.', inputSchema: { type: 'object', properties: { min_composite: { type: 'number' } }, required: [] } },
|
|
370
|
+
{ name: 'get_btc_regime', description: 'CryptoIZ BTC Regime Monitor — BTC macro in table format. Shows price, score, Fear&Greed, OI regime, funding, futures signal, RSI/EMA/MACD 1H, altcoin recommendation. $0.01 USDC/call.', inputSchema: { type: 'object', properties: {}, required: [] } },
|
|
371
|
+
{ name: 'get_token_ca', description: 'FREE: Get exact contract address for a specific token. Includes Jupiter and Raydium trade links. Use this to avoid buying wrong token (many fake tokens share same names). No USDC payment required.', inputSchema: { type: 'object', properties: { token_name: { type: 'string', description: 'Token name to look up, e.g. "Aliens" or "PENGUIN"' } }, required: ['token_name'] } },
|
|
372
|
+
{ name: 'get_status', description: 'CryptoIZ MCP server status, all available tools, and subscription plans. Platform: https://cryptoiz.org', inputSchema: { type: 'object', properties: {}, required: [] } },
|
|
433
373
|
];
|
|
434
374
|
|
|
435
375
|
// ══════════════════════════════════════════════════════════════════
|
|
436
376
|
// SERVER
|
|
437
377
|
// ══════════════════════════════════════════════════════════════════
|
|
438
|
-
const server = new Server({ name: 'cryptoiz-mcp', version: '
|
|
378
|
+
const server = new Server({ name: 'cryptoiz-mcp', version: '4.0.0' }, { capabilities: { tools: {} } });
|
|
439
379
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
|
|
440
380
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
441
381
|
const { name, arguments: args } = request.params;
|
|
@@ -444,6 +384,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
444
384
|
|
|
445
385
|
if (name === 'get_alpha_scanner') {
|
|
446
386
|
const data = await payAndFetch(`${GATEWAY_URL}?tool=get_alpha_scanner`);
|
|
387
|
+
if (data.error) return { content: [{ type: 'text', text: `❌ ${data.error}` }], isError: true };
|
|
447
388
|
if (args?.min_score && data.signals) { data.signals = data.signals.filter(s => parseFloat(s.alpha_score) >= args.min_score); data.total_signals = data.signals.length; }
|
|
448
389
|
if (args?.entry_class && data.signals) { data.signals = data.signals.filter(s => s.signal_class === args.entry_class); data.total_signals = data.signals.length; }
|
|
449
390
|
return { content: [{ type: 'text', text: formatAlpha(data) }] };
|
|
@@ -454,68 +395,31 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
454
395
|
if (args?.timeframe) p.set('tf', args.timeframe);
|
|
455
396
|
if (args?.limit) p.set('limit', String(args.limit));
|
|
456
397
|
const data = await payAndFetch(`${GATEWAY_URL}?${p}`);
|
|
398
|
+
if (data.error) return { content: [{ type: 'text', text: `❌ ${data.error}` }], isError: true };
|
|
457
399
|
return { content: [{ type: 'text', text: formatDivergence(data) }] };
|
|
458
400
|
}
|
|
459
401
|
|
|
460
402
|
if (name === 'get_accumulation') {
|
|
461
403
|
const data = await payAndFetch(`${GATEWAY_URL}?tool=get_accumulation`);
|
|
404
|
+
if (data.error) return { content: [{ type: 'text', text: `❌ ${data.error}` }], isError: true };
|
|
462
405
|
if (args?.min_composite && data.tokens) { data.tokens = data.tokens.filter(t => parseFloat(t.score_composite) >= args.min_composite); data.total_tokens = data.tokens.length; }
|
|
463
406
|
return { content: [{ type: 'text', text: formatAccumulation(data) }] };
|
|
464
407
|
}
|
|
465
408
|
|
|
466
409
|
if (name === 'get_btc_regime') {
|
|
467
410
|
const data = await payAndFetch(`${GATEWAY_URL}?tool=get_btc_regime`);
|
|
411
|
+
if (data.error) return { content: [{ type: 'text', text: `❌ ${data.error}` }], isError: true };
|
|
468
412
|
return { content: [{ type: 'text', text: formatBTC(data) }] };
|
|
469
413
|
}
|
|
470
414
|
|
|
471
415
|
if (name === 'get_token_ca') {
|
|
472
416
|
const tokenName = args?.token_name || '';
|
|
417
|
+
if (!tokenName) return { content: [{ type: 'text', text: '❌ Please provide a token_name. Example: "Aliens"' }], isError: true };
|
|
473
418
|
const data = await payAndFetch(`${GATEWAY_URL}?tool=get_alpha_scanner`);
|
|
474
|
-
|
|
475
|
-
if (data.error) return { content: [{ type: 'text', text: `Error: ${data.error}` }], isError: true };
|
|
476
|
-
|
|
477
|
-
// Search by name (case insensitive)
|
|
478
|
-
const signals = data.signals || [];
|
|
479
|
-
const match = signals.find(s =>
|
|
480
|
-
(s.name || '').toLowerCase().includes(tokenName.toLowerCase()) ||
|
|
481
|
-
tokenName.toLowerCase().includes((s.name || '').toLowerCase())
|
|
482
|
-
);
|
|
483
|
-
|
|
484
|
-
if (!match) {
|
|
485
|
-
return { content: [{ type: 'text', text: [
|
|
486
|
-
`Token "${tokenName}" not found in today's CryptoIZ signals.`,
|
|
487
|
-
``,
|
|
488
|
-
`Available tokens today: ${signals.map(s => s.name).join(', ')}`,
|
|
489
|
-
``,
|
|
490
|
-
`Try get_alpha_scanner to see all available tokens.`,
|
|
491
|
-
].join('\n') }] };
|
|
492
|
-
}
|
|
493
|
-
|
|
494
|
-
return { content: [{ type: 'text', text: [
|
|
495
|
-
`TOKEN VERIFICATION — ${match.name}`,
|
|
496
|
-
``,
|
|
497
|
-
`⚠ IMPORTANT: Many fake tokens use the same name.`,
|
|
498
|
-
`⚠ ONLY use this exact contract address to avoid scams.`,
|
|
499
|
-
``,
|
|
500
|
-
`TOKEN_NAME : ${match.name}`,
|
|
501
|
-
`CONTRACT_ADDRESS : ${match.contract_address}`,
|
|
502
|
-
``,
|
|
503
|
-
`TRADE LINKS (verified):`,
|
|
504
|
-
`BUY_ON_JUPITER : https://jup.ag/swap/SOL-${match.contract_address}`,
|
|
505
|
-
`BUY_ON_RAYDIUM : https://raydium.io/swap/?inputCurrency=sol&outputCurrency=${match.contract_address}`,
|
|
506
|
-
``,
|
|
507
|
-
`CURRENT SIGNALS:`,
|
|
508
|
-
`ALPHA_SCORE : ${match.alpha_score}`,
|
|
509
|
-
`SIGNAL_CLASS : ${match.signal_class}`,
|
|
510
|
-
`MARKET_CAP : ${match.market_cap_now || 'N/A'}`,
|
|
511
|
-
`PRICE_NOW : $${match.price_now_usd || 'N/A'}`,
|
|
512
|
-
``,
|
|
513
|
-
`Data from CryptoIZ — https://cryptoiz.org`,
|
|
514
|
-
`Not financial advice. Always DYOR.`,
|
|
515
|
-
].join('\n') }] };
|
|
419
|
+
return { content: [{ type: 'text', text: await getTokenCA(tokenName, data) }] };
|
|
516
420
|
}
|
|
517
421
|
|
|
518
|
-
return { content: [{ type: 'text', text: `Unknown tool:
|
|
422
|
+
return { content: [{ type: 'text', text: `Unknown tool: ${name}` }], isError: true };
|
|
519
423
|
} catch (err) {
|
|
520
424
|
return { content: [{ type: 'text', text: `Error: ${err.message}` }], isError: true };
|
|
521
425
|
}
|