asrai-mcp 0.5.3 → 0.5.4
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/server.js +5 -1
- package/src/tools.js +35 -4
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -169,7 +169,11 @@ const TOOLS = [
|
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
name: "portfolio",
|
|
172
|
-
description:
|
|
172
|
+
description:
|
|
173
|
+
"Get Abu's curated crypto portfolio — a model portfolio of carefully selected holdings. " +
|
|
174
|
+
"Use when users ask 'what should I invest in?', 'build me a portfolio', 'what coins to buy', " +
|
|
175
|
+
"or 'give me investment advice'. No symbol = full portfolio overview. " +
|
|
176
|
+
"Symbol provided = Abu's position and analysis for that specific coin.",
|
|
173
177
|
inputSchema: {
|
|
174
178
|
type: "object",
|
|
175
179
|
properties: { symbol: { type: "string", description: "Optional coin symbol to filter" } },
|
package/src/tools.js
CHANGED
|
@@ -55,7 +55,7 @@ async function _get(path) {
|
|
|
55
55
|
const fetchWithPayment = buildFetch();
|
|
56
56
|
const res = await fetchWithPayment(`${BASE_URL}${path}`, {
|
|
57
57
|
headers: X402_HEADERS,
|
|
58
|
-
signal: AbortSignal.timeout(
|
|
58
|
+
signal: AbortSignal.timeout(120_000),
|
|
59
59
|
});
|
|
60
60
|
const text = await res.text();
|
|
61
61
|
try { return JSON.parse(text); } catch { return text; }
|
|
@@ -68,7 +68,7 @@ async function _post(path, body) {
|
|
|
68
68
|
method: "POST",
|
|
69
69
|
headers: { ...X402_HEADERS, "Content-Type": "application/json" },
|
|
70
70
|
body: JSON.stringify(body),
|
|
71
|
-
signal: AbortSignal.timeout(
|
|
71
|
+
signal: AbortSignal.timeout(120_000),
|
|
72
72
|
});
|
|
73
73
|
const text = await res.text();
|
|
74
74
|
try { return JSON.parse(text); } catch { return text; }
|
|
@@ -98,6 +98,21 @@ export async function market_overview() {
|
|
|
98
98
|
"/api/gainers-losers/",
|
|
99
99
|
"/api/rsi/",
|
|
100
100
|
"/api/top-bottom/",
|
|
101
|
+
"/api/cmcai/",
|
|
102
|
+
"/api/cbbi/",
|
|
103
|
+
"/api/channel-summary/",
|
|
104
|
+
"/api/cashflow/market",
|
|
105
|
+
"/api/cmc-sentiment/",
|
|
106
|
+
"/api/socialdominance/",
|
|
107
|
+
"/api/ath/",
|
|
108
|
+
"/api/ichimoku-trend/",
|
|
109
|
+
"/api/bounce-dip/",
|
|
110
|
+
"/api/sar-coins/",
|
|
111
|
+
"/api/macd-coins/",
|
|
112
|
+
"/api/emacross/",
|
|
113
|
+
"/api/techrating/",
|
|
114
|
+
"/api/volume/",
|
|
115
|
+
"/api/highvolumelowcap/",
|
|
101
116
|
), null, 2);
|
|
102
117
|
}
|
|
103
118
|
|
|
@@ -111,6 +126,11 @@ export async function technical_analysis(symbol, timeframe = "1D") {
|
|
|
111
126
|
`/api/macd-dema/${s}usdt/${timeframe}`,
|
|
112
127
|
`/api/alphatrend/${s}usdt/${timeframe}`,
|
|
113
128
|
`/api/td/${s}usdt/${timeframe}`,
|
|
129
|
+
`/api/forecasting/${s}usdt`,
|
|
130
|
+
`/api/smartmoney/${s}usdt/${timeframe}`,
|
|
131
|
+
`/api/support-resistance/${s}usdt/${timeframe}`,
|
|
132
|
+
`/api/ew/${s}usdt/${timeframe}`,
|
|
133
|
+
`/api/ichimoku/${s}usdt/${timeframe}`,
|
|
114
134
|
), null, 2);
|
|
115
135
|
}
|
|
116
136
|
|
|
@@ -167,12 +187,23 @@ export async function cashflow(mode, symbol = "") {
|
|
|
167
187
|
|
|
168
188
|
export async function coin_info(symbol) {
|
|
169
189
|
const s = symbol.toLowerCase();
|
|
170
|
-
|
|
190
|
+
|
|
191
|
+
// Phase 1: sequential (x402 wallet conflict prevents parallel)
|
|
192
|
+
const data = await _gather(
|
|
171
193
|
`/api/coinstats/${s}`,
|
|
172
194
|
`/api/info/${s}`,
|
|
173
195
|
`/api/price/${s}`,
|
|
174
196
|
`/api/tags/${s}`,
|
|
175
|
-
|
|
197
|
+
`/api/cmcai/${s}`,
|
|
198
|
+
);
|
|
199
|
+
|
|
200
|
+
// Phase 2: dexscreener via contract_address if available
|
|
201
|
+
const contractAddress = data[`/api/info/${s}`]?.info_data?.contract_address;
|
|
202
|
+
if (contractAddress) {
|
|
203
|
+
data[`/api/dexscreener/${contractAddress}`] = await _get(`/api/dexscreener/${contractAddress}`);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
return JSON.stringify(data, null, 2);
|
|
176
207
|
}
|
|
177
208
|
|
|
178
209
|
export async function dexscreener(contract_address, chain = "") {
|