@noya-ai/mcp 0.1.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/LICENSE +21 -0
- package/README.md +40 -0
- package/dist/index.cjs +1353 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +1316 -0
- package/dist/stdio.cjs +1374 -0
- package/dist/stdio.d.cts +2 -0
- package/dist/stdio.d.ts +2 -0
- package/dist/stdio.js +1351 -0
- package/package.json +58 -0
package/dist/stdio.js
ADDED
|
@@ -0,0 +1,1351 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/stdio.ts
|
|
4
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
|
+
import { NoyaSDK } from "@noya-ai/sdk";
|
|
7
|
+
|
|
8
|
+
// src/generated-tools.ts
|
|
9
|
+
import * as alternativeSchemas from "@noya-ai/data-server-schemas/alternative";
|
|
10
|
+
import * as coingeckoSchemas from "@noya-ai/data-server-schemas/coingecko";
|
|
11
|
+
import * as coinglassSchemas from "@noya-ai/data-server-schemas/coinglass";
|
|
12
|
+
import * as compositeSchemas from "@noya-ai/data-server-schemas/composite";
|
|
13
|
+
import * as cryptonewsSchemas from "@noya-ai/data-server-schemas/cryptonews";
|
|
14
|
+
import * as defillamaSchemas from "@noya-ai/data-server-schemas/defillama";
|
|
15
|
+
import * as geckoterminalSchemas from "@noya-ai/data-server-schemas/geckoterminal";
|
|
16
|
+
import * as kaitoSchemas from "@noya-ai/data-server-schemas/kaito";
|
|
17
|
+
import * as moralisSchemas from "@noya-ai/data-server-schemas/moralis";
|
|
18
|
+
import * as noyaSchemas from "@noya-ai/data-server-schemas/noya";
|
|
19
|
+
import * as sdkSchemas from "@noya-ai/sdk";
|
|
20
|
+
import { z as zod } from "zod";
|
|
21
|
+
function toMcpResult(value) {
|
|
22
|
+
const text = typeof value === "string" ? value : JSON.stringify(value, null, 2) ?? "";
|
|
23
|
+
return { content: [{ type: "text", text }] };
|
|
24
|
+
}
|
|
25
|
+
var PASSTHROUGH_INPUT_SHAPE = { args: zod.unknown().describe("Pass-through arguments \u2014 see SDK docs for the shape.") };
|
|
26
|
+
function asRawShape(schema) {
|
|
27
|
+
let current = schema;
|
|
28
|
+
for (let i = 0; i < 6; i++) {
|
|
29
|
+
const def = current._def;
|
|
30
|
+
if (def.typeName === "ZodObject") break;
|
|
31
|
+
if (def.schema) {
|
|
32
|
+
current = def.schema;
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if (def.innerType) {
|
|
36
|
+
current = def.innerType;
|
|
37
|
+
continue;
|
|
38
|
+
}
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
const shape = current.shape;
|
|
42
|
+
return shape ?? {};
|
|
43
|
+
}
|
|
44
|
+
function registerGeneratedTools(server, getClient) {
|
|
45
|
+
const client = getClient();
|
|
46
|
+
server.tool(
|
|
47
|
+
"data_alternative_fear_greed",
|
|
48
|
+
"Auto-generated from sdk.data.alternative.fearGreed",
|
|
49
|
+
asRawShape(alternativeSchemas.FearGreedBody),
|
|
50
|
+
async (args) => {
|
|
51
|
+
const result = await Promise.resolve(client.data.alternative.fearGreed(args));
|
|
52
|
+
return toMcpResult(result);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
server.tool(
|
|
56
|
+
"data_batch_dispatch",
|
|
57
|
+
"Auto-generated from sdk.data.batch.dispatch",
|
|
58
|
+
{},
|
|
59
|
+
async () => {
|
|
60
|
+
const result = await Promise.resolve(client.data.batch.dispatch());
|
|
61
|
+
return toMcpResult(result);
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
server.tool(
|
|
65
|
+
"data_coingecko_price",
|
|
66
|
+
"Auto-generated from sdk.data.coingecko.price",
|
|
67
|
+
asRawShape(coingeckoSchemas.PriceBody),
|
|
68
|
+
async (args) => {
|
|
69
|
+
const result = await Promise.resolve(client.data.coingecko.price(args));
|
|
70
|
+
return toMcpResult(result);
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
server.tool(
|
|
74
|
+
"data_coingecko_ohlcv",
|
|
75
|
+
"Auto-generated from sdk.data.coingecko.ohlcv",
|
|
76
|
+
asRawShape(coingeckoSchemas.OhlcvBody),
|
|
77
|
+
async (args) => {
|
|
78
|
+
const result = await Promise.resolve(client.data.coingecko.ohlcv(args));
|
|
79
|
+
return toMcpResult(result);
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
server.tool(
|
|
83
|
+
"data_coingecko_token_info",
|
|
84
|
+
"Auto-generated from sdk.data.coingecko.tokenInfo",
|
|
85
|
+
asRawShape(coingeckoSchemas.TokenInfoBody),
|
|
86
|
+
async (args) => {
|
|
87
|
+
const result = await Promise.resolve(client.data.coingecko.tokenInfo(args));
|
|
88
|
+
return toMcpResult(result);
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
server.tool(
|
|
92
|
+
"data_coingecko_trending",
|
|
93
|
+
"Auto-generated from sdk.data.coingecko.trending",
|
|
94
|
+
{},
|
|
95
|
+
async () => {
|
|
96
|
+
const result = await Promise.resolve(client.data.coingecko.trending());
|
|
97
|
+
return toMcpResult(result);
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
server.tool(
|
|
101
|
+
"data_coingecko_search",
|
|
102
|
+
"Auto-generated from sdk.data.coingecko.search",
|
|
103
|
+
asRawShape(coingeckoSchemas.SearchBody),
|
|
104
|
+
async (args) => {
|
|
105
|
+
const result = await Promise.resolve(client.data.coingecko.search(args));
|
|
106
|
+
return toMcpResult(result);
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
server.tool(
|
|
110
|
+
"data_coingecko_price_history",
|
|
111
|
+
"Auto-generated from sdk.data.coingecko.priceHistory",
|
|
112
|
+
asRawShape(coingeckoSchemas.PriceHistoryBody),
|
|
113
|
+
async (args) => {
|
|
114
|
+
const result = await Promise.resolve(client.data.coingecko.priceHistory(args));
|
|
115
|
+
return toMcpResult(result);
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
server.tool(
|
|
119
|
+
"data_coingecko_price_at_date",
|
|
120
|
+
"Auto-generated from sdk.data.coingecko.priceAtDate",
|
|
121
|
+
asRawShape(coingeckoSchemas.PriceAtDateBody),
|
|
122
|
+
async (args) => {
|
|
123
|
+
const result = await Promise.resolve(client.data.coingecko.priceAtDate(args));
|
|
124
|
+
return toMcpResult(result);
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
server.tool(
|
|
128
|
+
"data_coinglass_funding_rates",
|
|
129
|
+
"Auto-generated from sdk.data.coinglass.fundingRates",
|
|
130
|
+
asRawShape(coinglassSchemas.FundingRatesBody),
|
|
131
|
+
async (args) => {
|
|
132
|
+
const result = await Promise.resolve(client.data.coinglass.fundingRates(args));
|
|
133
|
+
return toMcpResult(result);
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
server.tool(
|
|
137
|
+
"data_coinglass_open_interest",
|
|
138
|
+
"Auto-generated from sdk.data.coinglass.openInterest",
|
|
139
|
+
asRawShape(coinglassSchemas.OpenInterestBody),
|
|
140
|
+
async (args) => {
|
|
141
|
+
const result = await Promise.resolve(client.data.coinglass.openInterest(args));
|
|
142
|
+
return toMcpResult(result);
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
server.tool(
|
|
146
|
+
"data_coinglass_liquidations",
|
|
147
|
+
"Auto-generated from sdk.data.coinglass.liquidations",
|
|
148
|
+
asRawShape(coinglassSchemas.LiquidationsBody),
|
|
149
|
+
async (args) => {
|
|
150
|
+
const result = await Promise.resolve(client.data.coinglass.liquidations(args));
|
|
151
|
+
return toMcpResult(result);
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
server.tool(
|
|
155
|
+
"data_coinglass_long_short_ratio",
|
|
156
|
+
"Auto-generated from sdk.data.coinglass.longShortRatio",
|
|
157
|
+
asRawShape(coinglassSchemas.LongShortRatioBody),
|
|
158
|
+
async (args) => {
|
|
159
|
+
const result = await Promise.resolve(client.data.coinglass.longShortRatio(args));
|
|
160
|
+
return toMcpResult(result);
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
server.tool(
|
|
164
|
+
"data_coinglass_supported_coins",
|
|
165
|
+
"Auto-generated from sdk.data.coinglass.supportedCoins",
|
|
166
|
+
{},
|
|
167
|
+
async () => {
|
|
168
|
+
const result = await Promise.resolve(client.data.coinglass.supportedCoins());
|
|
169
|
+
return toMcpResult(result);
|
|
170
|
+
}
|
|
171
|
+
);
|
|
172
|
+
server.tool(
|
|
173
|
+
"data_coinglass_supported_exchanges",
|
|
174
|
+
"Auto-generated from sdk.data.coinglass.supportedExchanges",
|
|
175
|
+
{},
|
|
176
|
+
async () => {
|
|
177
|
+
const result = await Promise.resolve(client.data.coinglass.supportedExchanges());
|
|
178
|
+
return toMcpResult(result);
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
server.tool(
|
|
182
|
+
"data_coinglass_exchange_pairs",
|
|
183
|
+
"Auto-generated from sdk.data.coinglass.exchangePairs",
|
|
184
|
+
asRawShape(coinglassSchemas.ExchangePairsBody),
|
|
185
|
+
async (args) => {
|
|
186
|
+
const result = await Promise.resolve(client.data.coinglass.exchangePairs(args));
|
|
187
|
+
return toMcpResult(result);
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
server.tool(
|
|
191
|
+
"data_coinglass_liquidations_by_exchange",
|
|
192
|
+
"Auto-generated from sdk.data.coinglass.liquidationsByExchange",
|
|
193
|
+
asRawShape(coinglassSchemas.LiquidationsByExchangeBody),
|
|
194
|
+
async (args) => {
|
|
195
|
+
const result = await Promise.resolve(client.data.coinglass.liquidationsByExchange(args));
|
|
196
|
+
return toMcpResult(result);
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
server.tool(
|
|
200
|
+
"data_coinglass_funding_rate_history",
|
|
201
|
+
"Auto-generated from sdk.data.coinglass.fundingRateHistory",
|
|
202
|
+
asRawShape(coinglassSchemas.FundingRateHistoryBody),
|
|
203
|
+
async (args) => {
|
|
204
|
+
const result = await Promise.resolve(client.data.coinglass.fundingRateHistory(args));
|
|
205
|
+
return toMcpResult(result);
|
|
206
|
+
}
|
|
207
|
+
);
|
|
208
|
+
server.tool(
|
|
209
|
+
"data_coinglass_open_interest_history",
|
|
210
|
+
"Auto-generated from sdk.data.coinglass.openInterestHistory",
|
|
211
|
+
asRawShape(coinglassSchemas.FundingRateHistoryBody),
|
|
212
|
+
async (args) => {
|
|
213
|
+
const result = await Promise.resolve(client.data.coinglass.openInterestHistory(args));
|
|
214
|
+
return toMcpResult(result);
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
server.tool(
|
|
218
|
+
"data_coinglass_liquidation_history",
|
|
219
|
+
"Auto-generated from sdk.data.coinglass.liquidationHistory",
|
|
220
|
+
asRawShape(coinglassSchemas.FundingRateHistoryBody),
|
|
221
|
+
async (args) => {
|
|
222
|
+
const result = await Promise.resolve(client.data.coinglass.liquidationHistory(args));
|
|
223
|
+
return toMcpResult(result);
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
server.tool(
|
|
227
|
+
"data_coinglass_long_short_ratio_history",
|
|
228
|
+
"Auto-generated from sdk.data.coinglass.longShortRatioHistory",
|
|
229
|
+
asRawShape(coinglassSchemas.FundingRateHistoryBody),
|
|
230
|
+
async (args) => {
|
|
231
|
+
const result = await Promise.resolve(client.data.coinglass.longShortRatioHistory(args));
|
|
232
|
+
return toMcpResult(result);
|
|
233
|
+
}
|
|
234
|
+
);
|
|
235
|
+
server.tool(
|
|
236
|
+
"data_composite_market_snapshot",
|
|
237
|
+
"Auto-generated from sdk.data.composite.marketSnapshot",
|
|
238
|
+
asRawShape(compositeSchemas.MarketSnapshotBody),
|
|
239
|
+
async (args) => {
|
|
240
|
+
const result = await Promise.resolve(client.data.composite.marketSnapshot(args));
|
|
241
|
+
return toMcpResult(result);
|
|
242
|
+
}
|
|
243
|
+
);
|
|
244
|
+
server.tool(
|
|
245
|
+
"data_composite_alpha_radar",
|
|
246
|
+
"Auto-generated from sdk.data.composite.alphaRadar",
|
|
247
|
+
asRawShape(compositeSchemas.AlphaRadarBody),
|
|
248
|
+
async (args) => {
|
|
249
|
+
const result = await Promise.resolve(client.data.composite.alphaRadar(args));
|
|
250
|
+
return toMcpResult(result);
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
server.tool(
|
|
254
|
+
"data_composite_wallet_xray",
|
|
255
|
+
"Auto-generated from sdk.data.composite.walletXray",
|
|
256
|
+
asRawShape(compositeSchemas.WalletXrayBody),
|
|
257
|
+
async (args) => {
|
|
258
|
+
const result = await Promise.resolve(client.data.composite.walletXray(args));
|
|
259
|
+
return toMcpResult(result);
|
|
260
|
+
}
|
|
261
|
+
);
|
|
262
|
+
server.tool(
|
|
263
|
+
"data_composite_health",
|
|
264
|
+
"Auto-generated from sdk.data.composite.health",
|
|
265
|
+
{},
|
|
266
|
+
async () => {
|
|
267
|
+
const result = await Promise.resolve(client.data.composite.health());
|
|
268
|
+
return toMcpResult(result);
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
server.tool(
|
|
272
|
+
"data_cryptonews_news",
|
|
273
|
+
"Auto-generated from sdk.data.cryptonews.news",
|
|
274
|
+
asRawShape(cryptonewsSchemas.NewsBody),
|
|
275
|
+
async (args) => {
|
|
276
|
+
const result = await Promise.resolve(client.data.cryptonews.news(args));
|
|
277
|
+
return toMcpResult(result);
|
|
278
|
+
}
|
|
279
|
+
);
|
|
280
|
+
server.tool(
|
|
281
|
+
"data_cryptonews_sentiment",
|
|
282
|
+
"Auto-generated from sdk.data.cryptonews.sentiment",
|
|
283
|
+
asRawShape(cryptonewsSchemas.SentimentBody),
|
|
284
|
+
async (args) => {
|
|
285
|
+
const result = await Promise.resolve(client.data.cryptonews.sentiment(args));
|
|
286
|
+
return toMcpResult(result);
|
|
287
|
+
}
|
|
288
|
+
);
|
|
289
|
+
server.tool(
|
|
290
|
+
"data_cryptonews_trending",
|
|
291
|
+
"Auto-generated from sdk.data.cryptonews.trending",
|
|
292
|
+
asRawShape(cryptonewsSchemas.TrendingQuery),
|
|
293
|
+
async (args) => {
|
|
294
|
+
const result = await Promise.resolve(client.data.cryptonews.trending(args));
|
|
295
|
+
return toMcpResult(result);
|
|
296
|
+
}
|
|
297
|
+
);
|
|
298
|
+
server.tool(
|
|
299
|
+
"data_defillama_tvl",
|
|
300
|
+
"Auto-generated from sdk.data.defillama.tvl",
|
|
301
|
+
asRawShape(defillamaSchemas.TvlBody),
|
|
302
|
+
async (args) => {
|
|
303
|
+
const result = await Promise.resolve(client.data.defillama.tvl(args));
|
|
304
|
+
return toMcpResult(result);
|
|
305
|
+
}
|
|
306
|
+
);
|
|
307
|
+
server.tool(
|
|
308
|
+
"data_defillama_yields",
|
|
309
|
+
"Auto-generated from sdk.data.defillama.yields",
|
|
310
|
+
asRawShape(defillamaSchemas.YieldsBody),
|
|
311
|
+
async (args) => {
|
|
312
|
+
const result = await Promise.resolve(client.data.defillama.yields(args));
|
|
313
|
+
return toMcpResult(result);
|
|
314
|
+
}
|
|
315
|
+
);
|
|
316
|
+
server.tool(
|
|
317
|
+
"data_defillama_protocol_fees",
|
|
318
|
+
"Auto-generated from sdk.data.defillama.protocolFees",
|
|
319
|
+
asRawShape(defillamaSchemas.ProtocolFeesBody),
|
|
320
|
+
async (args) => {
|
|
321
|
+
const result = await Promise.resolve(client.data.defillama.protocolFees(args));
|
|
322
|
+
return toMcpResult(result);
|
|
323
|
+
}
|
|
324
|
+
);
|
|
325
|
+
server.tool(
|
|
326
|
+
"data_defillama_dex_volumes",
|
|
327
|
+
"Auto-generated from sdk.data.defillama.dexVolumes",
|
|
328
|
+
asRawShape(defillamaSchemas.DexVolumesBody),
|
|
329
|
+
async (args) => {
|
|
330
|
+
const result = await Promise.resolve(client.data.defillama.dexVolumes(args));
|
|
331
|
+
return toMcpResult(result);
|
|
332
|
+
}
|
|
333
|
+
);
|
|
334
|
+
server.tool(
|
|
335
|
+
"data_defillama_stablecoins",
|
|
336
|
+
"Auto-generated from sdk.data.defillama.stablecoins",
|
|
337
|
+
asRawShape(defillamaSchemas.StablecoinsBody),
|
|
338
|
+
async (args) => {
|
|
339
|
+
const result = await Promise.resolve(client.data.defillama.stablecoins(args));
|
|
340
|
+
return toMcpResult(result);
|
|
341
|
+
}
|
|
342
|
+
);
|
|
343
|
+
server.tool(
|
|
344
|
+
"data_defillama_bridges",
|
|
345
|
+
"Auto-generated from sdk.data.defillama.bridges",
|
|
346
|
+
asRawShape(defillamaSchemas.BridgesBody),
|
|
347
|
+
async (args) => {
|
|
348
|
+
const result = await Promise.resolve(client.data.defillama.bridges(args));
|
|
349
|
+
return toMcpResult(result);
|
|
350
|
+
}
|
|
351
|
+
);
|
|
352
|
+
server.tool(
|
|
353
|
+
"data_defillama_bridges_list",
|
|
354
|
+
"Auto-generated from sdk.data.defillama.bridgesList",
|
|
355
|
+
{},
|
|
356
|
+
async () => {
|
|
357
|
+
const result = await Promise.resolve(client.data.defillama.bridgesList());
|
|
358
|
+
return toMcpResult(result);
|
|
359
|
+
}
|
|
360
|
+
);
|
|
361
|
+
server.tool(
|
|
362
|
+
"data_geckoterminal_token_pools",
|
|
363
|
+
"Auto-generated from sdk.data.geckoterminal.tokenPools",
|
|
364
|
+
asRawShape(geckoterminalSchemas.TokenPoolsBody),
|
|
365
|
+
async (args) => {
|
|
366
|
+
const result = await Promise.resolve(client.data.geckoterminal.tokenPools(args));
|
|
367
|
+
return toMcpResult(result);
|
|
368
|
+
}
|
|
369
|
+
);
|
|
370
|
+
server.tool(
|
|
371
|
+
"data_geckoterminal_pool_ohlcv",
|
|
372
|
+
"Auto-generated from sdk.data.geckoterminal.poolOhlcv",
|
|
373
|
+
asRawShape(geckoterminalSchemas.PoolOhlcvBody),
|
|
374
|
+
async (args) => {
|
|
375
|
+
const result = await Promise.resolve(client.data.geckoterminal.poolOhlcv(args));
|
|
376
|
+
return toMcpResult(result);
|
|
377
|
+
}
|
|
378
|
+
);
|
|
379
|
+
server.tool(
|
|
380
|
+
"data_geckoterminal_pool_trades",
|
|
381
|
+
"Auto-generated from sdk.data.geckoterminal.poolTrades",
|
|
382
|
+
asRawShape(geckoterminalSchemas.PoolTradesBody),
|
|
383
|
+
async (args) => {
|
|
384
|
+
const result = await Promise.resolve(client.data.geckoterminal.poolTrades(args));
|
|
385
|
+
return toMcpResult(result);
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
server.tool(
|
|
389
|
+
"data_geckoterminal_trending_pools",
|
|
390
|
+
"Auto-generated from sdk.data.geckoterminal.trendingPools",
|
|
391
|
+
{},
|
|
392
|
+
async () => {
|
|
393
|
+
const result = await Promise.resolve(client.data.geckoterminal.trendingPools());
|
|
394
|
+
return toMcpResult(result);
|
|
395
|
+
}
|
|
396
|
+
);
|
|
397
|
+
server.tool(
|
|
398
|
+
"data_geckoterminal_token_info",
|
|
399
|
+
"Auto-generated from sdk.data.geckoterminal.tokenInfo",
|
|
400
|
+
asRawShape(geckoterminalSchemas.TokenInfoBody),
|
|
401
|
+
async (args) => {
|
|
402
|
+
const result = await Promise.resolve(client.data.geckoterminal.tokenInfo(args));
|
|
403
|
+
return toMcpResult(result);
|
|
404
|
+
}
|
|
405
|
+
);
|
|
406
|
+
server.tool(
|
|
407
|
+
"data_kaito_entities",
|
|
408
|
+
"Auto-generated from sdk.data.kaito.entities",
|
|
409
|
+
asRawShape(kaitoSchemas.EntitiesQuery),
|
|
410
|
+
async (args) => {
|
|
411
|
+
const result = await Promise.resolve(client.data.kaito.entities(args));
|
|
412
|
+
return toMcpResult(result);
|
|
413
|
+
}
|
|
414
|
+
);
|
|
415
|
+
server.tool(
|
|
416
|
+
"data_kaito_narratives",
|
|
417
|
+
"Auto-generated from sdk.data.kaito.narratives",
|
|
418
|
+
asRawShape(kaitoSchemas.NarrativesQuery),
|
|
419
|
+
async (args) => {
|
|
420
|
+
const result = await Promise.resolve(client.data.kaito.narratives(args));
|
|
421
|
+
return toMcpResult(result);
|
|
422
|
+
}
|
|
423
|
+
);
|
|
424
|
+
server.tool(
|
|
425
|
+
"data_kaito_search",
|
|
426
|
+
"Auto-generated from sdk.data.kaito.search",
|
|
427
|
+
asRawShape(kaitoSchemas.SearchBody),
|
|
428
|
+
async (args) => {
|
|
429
|
+
const result = await Promise.resolve(client.data.kaito.search(args));
|
|
430
|
+
return toMcpResult(result);
|
|
431
|
+
}
|
|
432
|
+
);
|
|
433
|
+
server.tool(
|
|
434
|
+
"data_kaito_advanced_search",
|
|
435
|
+
"Auto-generated from sdk.data.kaito.advancedSearch",
|
|
436
|
+
asRawShape(kaitoSchemas.AdvancedSearchBody),
|
|
437
|
+
async (args) => {
|
|
438
|
+
const result = await Promise.resolve(client.data.kaito.advancedSearch(args));
|
|
439
|
+
return toMcpResult(result);
|
|
440
|
+
}
|
|
441
|
+
);
|
|
442
|
+
server.tool(
|
|
443
|
+
"data_kaito_tweet_engagement",
|
|
444
|
+
"Auto-generated from sdk.data.kaito.tweetEngagement",
|
|
445
|
+
asRawShape(kaitoSchemas.TweetEngagementBody),
|
|
446
|
+
async (args) => {
|
|
447
|
+
const result = await Promise.resolve(client.data.kaito.tweetEngagement(args));
|
|
448
|
+
return toMcpResult(result);
|
|
449
|
+
}
|
|
450
|
+
);
|
|
451
|
+
server.tool(
|
|
452
|
+
"data_kaito_feeds",
|
|
453
|
+
"Auto-generated from sdk.data.kaito.feeds",
|
|
454
|
+
asRawShape(kaitoSchemas.FeedsBody),
|
|
455
|
+
async (args) => {
|
|
456
|
+
const result = await Promise.resolve(client.data.kaito.feeds(args));
|
|
457
|
+
return toMcpResult(result);
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
server.tool(
|
|
461
|
+
"data_kaito_sentiment",
|
|
462
|
+
"Auto-generated from sdk.data.kaito.sentiment",
|
|
463
|
+
asRawShape(kaitoSchemas.SentimentBody),
|
|
464
|
+
async (args) => {
|
|
465
|
+
const result = await Promise.resolve(client.data.kaito.sentiment(args));
|
|
466
|
+
return toMcpResult(result);
|
|
467
|
+
}
|
|
468
|
+
);
|
|
469
|
+
server.tool(
|
|
470
|
+
"data_kaito_engagement",
|
|
471
|
+
"Auto-generated from sdk.data.kaito.engagement",
|
|
472
|
+
asRawShape(kaitoSchemas.EngagementBody),
|
|
473
|
+
async (args) => {
|
|
474
|
+
const result = await Promise.resolve(client.data.kaito.engagement(args));
|
|
475
|
+
return toMcpResult(result);
|
|
476
|
+
}
|
|
477
|
+
);
|
|
478
|
+
server.tool(
|
|
479
|
+
"data_kaito_mentions",
|
|
480
|
+
"Auto-generated from sdk.data.kaito.mentions",
|
|
481
|
+
asRawShape(kaitoSchemas.EngagementBody),
|
|
482
|
+
async (args) => {
|
|
483
|
+
const result = await Promise.resolve(client.data.kaito.mentions(args));
|
|
484
|
+
return toMcpResult(result);
|
|
485
|
+
}
|
|
486
|
+
);
|
|
487
|
+
server.tool(
|
|
488
|
+
"data_kaito_mindshare",
|
|
489
|
+
"Auto-generated from sdk.data.kaito.mindshare",
|
|
490
|
+
asRawShape(kaitoSchemas.MindshareBody),
|
|
491
|
+
async (args) => {
|
|
492
|
+
const result = await Promise.resolve(client.data.kaito.mindshare(args));
|
|
493
|
+
return toMcpResult(result);
|
|
494
|
+
}
|
|
495
|
+
);
|
|
496
|
+
server.tool(
|
|
497
|
+
"data_kaito_mindshare_arena",
|
|
498
|
+
"Auto-generated from sdk.data.kaito.mindshareArena",
|
|
499
|
+
asRawShape(kaitoSchemas.MindshareArenaBody),
|
|
500
|
+
async (args) => {
|
|
501
|
+
const result = await Promise.resolve(client.data.kaito.mindshareArena(args));
|
|
502
|
+
return toMcpResult(result);
|
|
503
|
+
}
|
|
504
|
+
);
|
|
505
|
+
server.tool(
|
|
506
|
+
"data_kaito_mindshare_delta",
|
|
507
|
+
"Auto-generated from sdk.data.kaito.mindshareDelta",
|
|
508
|
+
asRawShape(kaitoSchemas.MindshareDeltaBody),
|
|
509
|
+
async (args) => {
|
|
510
|
+
const result = await Promise.resolve(client.data.kaito.mindshareDelta(args));
|
|
511
|
+
return toMcpResult(result);
|
|
512
|
+
}
|
|
513
|
+
);
|
|
514
|
+
server.tool(
|
|
515
|
+
"data_kaito_mindshare_narrative",
|
|
516
|
+
"Auto-generated from sdk.data.kaito.mindshareNarrative",
|
|
517
|
+
asRawShape(kaitoSchemas.MindshareNarrativeBody),
|
|
518
|
+
async (args) => {
|
|
519
|
+
const result = await Promise.resolve(client.data.kaito.mindshareNarrative(args));
|
|
520
|
+
return toMcpResult(result);
|
|
521
|
+
}
|
|
522
|
+
);
|
|
523
|
+
server.tool(
|
|
524
|
+
"data_kaito_kol_mindshare",
|
|
525
|
+
"Auto-generated from sdk.data.kaito.kolMindshare",
|
|
526
|
+
asRawShape(kaitoSchemas.KolMindshareBody),
|
|
527
|
+
async (args) => {
|
|
528
|
+
const result = await Promise.resolve(client.data.kaito.kolMindshare(args));
|
|
529
|
+
return toMcpResult(result);
|
|
530
|
+
}
|
|
531
|
+
);
|
|
532
|
+
server.tool(
|
|
533
|
+
"data_kaito_events",
|
|
534
|
+
"Auto-generated from sdk.data.kaito.events",
|
|
535
|
+
asRawShape(kaitoSchemas.EventsBody),
|
|
536
|
+
async (args) => {
|
|
537
|
+
const result = await Promise.resolve(client.data.kaito.events(args));
|
|
538
|
+
return toMcpResult(result);
|
|
539
|
+
}
|
|
540
|
+
);
|
|
541
|
+
server.tool(
|
|
542
|
+
"data_kaito_twitter_user_metadata",
|
|
543
|
+
"Auto-generated from sdk.data.kaito.twitterUserMetadata",
|
|
544
|
+
asRawShape(kaitoSchemas.TwitterUserMetadataBody),
|
|
545
|
+
async (args) => {
|
|
546
|
+
const result = await Promise.resolve(client.data.kaito.twitterUserMetadata(args));
|
|
547
|
+
return toMcpResult(result);
|
|
548
|
+
}
|
|
549
|
+
);
|
|
550
|
+
server.tool(
|
|
551
|
+
"data_kaito_market_smart_following",
|
|
552
|
+
"Auto-generated from sdk.data.kaito.marketSmartFollowing",
|
|
553
|
+
asRawShape(kaitoSchemas.MarketSmartFollowingBody),
|
|
554
|
+
async (args) => {
|
|
555
|
+
const result = await Promise.resolve(client.data.kaito.marketSmartFollowing(args));
|
|
556
|
+
return toMcpResult(result);
|
|
557
|
+
}
|
|
558
|
+
);
|
|
559
|
+
server.tool(
|
|
560
|
+
"data_kaito_smart_followers",
|
|
561
|
+
"Auto-generated from sdk.data.kaito.smartFollowers",
|
|
562
|
+
asRawShape(kaitoSchemas.SmartFollowersBody),
|
|
563
|
+
async (args) => {
|
|
564
|
+
const result = await Promise.resolve(client.data.kaito.smartFollowers(args));
|
|
565
|
+
return toMcpResult(result);
|
|
566
|
+
}
|
|
567
|
+
);
|
|
568
|
+
server.tool(
|
|
569
|
+
"data_kaito_smart_following",
|
|
570
|
+
"Auto-generated from sdk.data.kaito.smartFollowing",
|
|
571
|
+
asRawShape(kaitoSchemas.SmartFollowingBody),
|
|
572
|
+
async (args) => {
|
|
573
|
+
const result = await Promise.resolve(client.data.kaito.smartFollowing(args));
|
|
574
|
+
return toMcpResult(result);
|
|
575
|
+
}
|
|
576
|
+
);
|
|
577
|
+
server.tool(
|
|
578
|
+
"data_moralis_wallet",
|
|
579
|
+
"Auto-generated from sdk.data.moralis.wallet",
|
|
580
|
+
asRawShape(moralisSchemas.WalletBody),
|
|
581
|
+
async (args) => {
|
|
582
|
+
const result = await Promise.resolve(client.data.moralis.wallet(args));
|
|
583
|
+
return toMcpResult(result);
|
|
584
|
+
}
|
|
585
|
+
);
|
|
586
|
+
server.tool(
|
|
587
|
+
"data_moralis_transfers",
|
|
588
|
+
"Auto-generated from sdk.data.moralis.transfers",
|
|
589
|
+
asRawShape(moralisSchemas.TransfersBody),
|
|
590
|
+
async (args) => {
|
|
591
|
+
const result = await Promise.resolve(client.data.moralis.transfers(args));
|
|
592
|
+
return toMcpResult(result);
|
|
593
|
+
}
|
|
594
|
+
);
|
|
595
|
+
server.tool(
|
|
596
|
+
"data_moralis_defi_positions",
|
|
597
|
+
"Auto-generated from sdk.data.moralis.defiPositions",
|
|
598
|
+
asRawShape(moralisSchemas.DefiPositionsBody),
|
|
599
|
+
async (args) => {
|
|
600
|
+
const result = await Promise.resolve(client.data.moralis.defiPositions(args));
|
|
601
|
+
return toMcpResult(result);
|
|
602
|
+
}
|
|
603
|
+
);
|
|
604
|
+
server.tool(
|
|
605
|
+
"data_moralis_nft_holdings",
|
|
606
|
+
"Auto-generated from sdk.data.moralis.nftHoldings",
|
|
607
|
+
asRawShape(moralisSchemas.NftHoldingsBody),
|
|
608
|
+
async (args) => {
|
|
609
|
+
const result = await Promise.resolve(client.data.moralis.nftHoldings(args));
|
|
610
|
+
return toMcpResult(result);
|
|
611
|
+
}
|
|
612
|
+
);
|
|
613
|
+
server.tool(
|
|
614
|
+
"data_noya_tokens_search",
|
|
615
|
+
"Auto-generated from sdk.data.noya.tokensSearch",
|
|
616
|
+
asRawShape(noyaSchemas.TokensSearchBody),
|
|
617
|
+
async (args) => {
|
|
618
|
+
const result = await Promise.resolve(client.data.noya.tokensSearch(args));
|
|
619
|
+
return toMcpResult(result);
|
|
620
|
+
}
|
|
621
|
+
);
|
|
622
|
+
server.tool(
|
|
623
|
+
"data_noya_tokens_similar",
|
|
624
|
+
"Auto-generated from sdk.data.noya.tokensSimilar",
|
|
625
|
+
asRawShape(noyaSchemas.TokensSimilarBody),
|
|
626
|
+
async (args) => {
|
|
627
|
+
const result = await Promise.resolve(client.data.noya.tokensSimilar(args));
|
|
628
|
+
return toMcpResult(result);
|
|
629
|
+
}
|
|
630
|
+
);
|
|
631
|
+
server.tool(
|
|
632
|
+
"data_noya_tokens_recommendations",
|
|
633
|
+
"Auto-generated from sdk.data.noya.tokensRecommendations",
|
|
634
|
+
asRawShape(noyaSchemas.TokensRecommendationsBody),
|
|
635
|
+
async (args) => {
|
|
636
|
+
const result = await Promise.resolve(client.data.noya.tokensRecommendations(args));
|
|
637
|
+
return toMcpResult(result);
|
|
638
|
+
}
|
|
639
|
+
);
|
|
640
|
+
server.tool(
|
|
641
|
+
"data_noya_tokens_top_score",
|
|
642
|
+
"Auto-generated from sdk.data.noya.tokensTopScore",
|
|
643
|
+
asRawShape(noyaSchemas.TopTokensByScoreBody),
|
|
644
|
+
async (args) => {
|
|
645
|
+
const result = await Promise.resolve(client.data.noya.tokensTopScore(args));
|
|
646
|
+
return toMcpResult(result);
|
|
647
|
+
}
|
|
648
|
+
);
|
|
649
|
+
server.tool(
|
|
650
|
+
"data_noya_tokens_health",
|
|
651
|
+
"Auto-generated from sdk.data.noya.tokensHealth",
|
|
652
|
+
{},
|
|
653
|
+
async () => {
|
|
654
|
+
const result = await Promise.resolve(client.data.noya.tokensHealth());
|
|
655
|
+
return toMcpResult(result);
|
|
656
|
+
}
|
|
657
|
+
);
|
|
658
|
+
server.tool(
|
|
659
|
+
"data_noya_tokens_versions",
|
|
660
|
+
"Auto-generated from sdk.data.noya.tokensVersions",
|
|
661
|
+
{},
|
|
662
|
+
async () => {
|
|
663
|
+
const result = await Promise.resolve(client.data.noya.tokensVersions());
|
|
664
|
+
return toMcpResult(result);
|
|
665
|
+
}
|
|
666
|
+
);
|
|
667
|
+
server.tool(
|
|
668
|
+
"data_noya_tokens_by_version",
|
|
669
|
+
"Auto-generated from sdk.data.noya.tokensByVersion",
|
|
670
|
+
asRawShape(noyaSchemas.TokensByVersionBody),
|
|
671
|
+
async (args) => {
|
|
672
|
+
const result = await Promise.resolve(client.data.noya.tokensByVersion(args));
|
|
673
|
+
return toMcpResult(result);
|
|
674
|
+
}
|
|
675
|
+
);
|
|
676
|
+
server.tool(
|
|
677
|
+
"data_noya_tokens_detail",
|
|
678
|
+
"Auto-generated from sdk.data.noya.tokensDetail",
|
|
679
|
+
asRawShape(noyaSchemas.TokenDetailBody),
|
|
680
|
+
async (args) => {
|
|
681
|
+
const result = await Promise.resolve(client.data.noya.tokensDetail(args));
|
|
682
|
+
return toMcpResult(result);
|
|
683
|
+
}
|
|
684
|
+
);
|
|
685
|
+
server.tool(
|
|
686
|
+
"data_noya_polymarket_search",
|
|
687
|
+
"Auto-generated from sdk.data.noya.polymarketSearch",
|
|
688
|
+
asRawShape(noyaSchemas.PolymarketSearchBody),
|
|
689
|
+
async (args) => {
|
|
690
|
+
const result = await Promise.resolve(client.data.noya.polymarketSearch(args));
|
|
691
|
+
return toMcpResult(result);
|
|
692
|
+
}
|
|
693
|
+
);
|
|
694
|
+
server.tool(
|
|
695
|
+
"data_noya_polymarket_similar",
|
|
696
|
+
"Auto-generated from sdk.data.noya.polymarketSimilar",
|
|
697
|
+
asRawShape(noyaSchemas.PolymarketSimilarBody),
|
|
698
|
+
async (args) => {
|
|
699
|
+
const result = await Promise.resolve(client.data.noya.polymarketSimilar(args));
|
|
700
|
+
return toMcpResult(result);
|
|
701
|
+
}
|
|
702
|
+
);
|
|
703
|
+
server.tool(
|
|
704
|
+
"data_noya_polymarket_recommendations",
|
|
705
|
+
"Auto-generated from sdk.data.noya.polymarketRecommendations",
|
|
706
|
+
asRawShape(noyaSchemas.PolymarketRecommendationsBody),
|
|
707
|
+
async (args) => {
|
|
708
|
+
const result = await Promise.resolve(client.data.noya.polymarketRecommendations(args));
|
|
709
|
+
return toMcpResult(result);
|
|
710
|
+
}
|
|
711
|
+
);
|
|
712
|
+
server.tool(
|
|
713
|
+
"data_noya_polymarket_top_ev",
|
|
714
|
+
"Auto-generated from sdk.data.noya.polymarketTopEv",
|
|
715
|
+
asRawShape(noyaSchemas.TopMarketsByEvBody),
|
|
716
|
+
async (args) => {
|
|
717
|
+
const result = await Promise.resolve(client.data.noya.polymarketTopEv(args));
|
|
718
|
+
return toMcpResult(result);
|
|
719
|
+
}
|
|
720
|
+
);
|
|
721
|
+
server.tool(
|
|
722
|
+
"data_noya_polymarket_filter",
|
|
723
|
+
"Auto-generated from sdk.data.noya.polymarketFilter",
|
|
724
|
+
asRawShape(noyaSchemas.PolymarketFilterBody),
|
|
725
|
+
async (args) => {
|
|
726
|
+
const result = await Promise.resolve(client.data.noya.polymarketFilter(args));
|
|
727
|
+
return toMcpResult(result);
|
|
728
|
+
}
|
|
729
|
+
);
|
|
730
|
+
server.tool(
|
|
731
|
+
"data_noya_polymarket_events",
|
|
732
|
+
"Auto-generated from sdk.data.noya.polymarketEvents",
|
|
733
|
+
asRawShape(noyaSchemas.PolymarketEventsBody),
|
|
734
|
+
async (args) => {
|
|
735
|
+
const result = await Promise.resolve(client.data.noya.polymarketEvents(args));
|
|
736
|
+
return toMcpResult(result);
|
|
737
|
+
}
|
|
738
|
+
);
|
|
739
|
+
server.tool(
|
|
740
|
+
"data_noya_polymarket_by_event",
|
|
741
|
+
"Auto-generated from sdk.data.noya.polymarketByEvent",
|
|
742
|
+
asRawShape(noyaSchemas.PolymarketByEventBody),
|
|
743
|
+
async (args) => {
|
|
744
|
+
const result = await Promise.resolve(client.data.noya.polymarketByEvent(args));
|
|
745
|
+
return toMcpResult(result);
|
|
746
|
+
}
|
|
747
|
+
);
|
|
748
|
+
server.tool(
|
|
749
|
+
"data_noya_polymarket_tags",
|
|
750
|
+
"Auto-generated from sdk.data.noya.polymarketTags",
|
|
751
|
+
asRawShape(noyaSchemas.PolymarketTagsBody),
|
|
752
|
+
async (args) => {
|
|
753
|
+
const result = await Promise.resolve(client.data.noya.polymarketTags(args));
|
|
754
|
+
return toMcpResult(result);
|
|
755
|
+
}
|
|
756
|
+
);
|
|
757
|
+
server.tool(
|
|
758
|
+
"data_noya_polymarket_health",
|
|
759
|
+
"Auto-generated from sdk.data.noya.polymarketHealth",
|
|
760
|
+
{},
|
|
761
|
+
async () => {
|
|
762
|
+
const result = await Promise.resolve(client.data.noya.polymarketHealth());
|
|
763
|
+
return toMcpResult(result);
|
|
764
|
+
}
|
|
765
|
+
);
|
|
766
|
+
server.tool(
|
|
767
|
+
"data_noya_polymarket_analysis_versions",
|
|
768
|
+
"Auto-generated from sdk.data.noya.polymarketAnalysisVersions",
|
|
769
|
+
asRawShape(noyaSchemas.AnalysisVersionsBody),
|
|
770
|
+
async (args) => {
|
|
771
|
+
const result = await Promise.resolve(client.data.noya.polymarketAnalysisVersions(args));
|
|
772
|
+
return toMcpResult(result);
|
|
773
|
+
}
|
|
774
|
+
);
|
|
775
|
+
server.tool(
|
|
776
|
+
"data_noya_polymarket_analysis_latest",
|
|
777
|
+
"Auto-generated from sdk.data.noya.polymarketAnalysisLatest",
|
|
778
|
+
{},
|
|
779
|
+
async () => {
|
|
780
|
+
const result = await Promise.resolve(client.data.noya.polymarketAnalysisLatest());
|
|
781
|
+
return toMcpResult(result);
|
|
782
|
+
}
|
|
783
|
+
);
|
|
784
|
+
server.tool(
|
|
785
|
+
"data_noya_polymarket_analysis_events",
|
|
786
|
+
"Auto-generated from sdk.data.noya.polymarketAnalysisEvents",
|
|
787
|
+
asRawShape(noyaSchemas.AnalysisEventsBody),
|
|
788
|
+
async (args) => {
|
|
789
|
+
const result = await Promise.resolve(client.data.noya.polymarketAnalysisEvents(args));
|
|
790
|
+
return toMcpResult(result);
|
|
791
|
+
}
|
|
792
|
+
);
|
|
793
|
+
server.tool(
|
|
794
|
+
"data_noya_polymarket_analysis_event_history",
|
|
795
|
+
"Auto-generated from sdk.data.noya.polymarketAnalysisEventHistory",
|
|
796
|
+
asRawShape(noyaSchemas.AnalysisEventHistoryBody),
|
|
797
|
+
async (args) => {
|
|
798
|
+
const result = await Promise.resolve(client.data.noya.polymarketAnalysisEventHistory(args));
|
|
799
|
+
return toMcpResult(result);
|
|
800
|
+
}
|
|
801
|
+
);
|
|
802
|
+
server.tool(
|
|
803
|
+
"data_noya_polymarket_analysis_market_history",
|
|
804
|
+
"Auto-generated from sdk.data.noya.polymarketAnalysisMarketHistory",
|
|
805
|
+
asRawShape(noyaSchemas.AnalysisMarketHistoryBody),
|
|
806
|
+
async (args) => {
|
|
807
|
+
const result = await Promise.resolve(client.data.noya.polymarketAnalysisMarketHistory(args));
|
|
808
|
+
return toMcpResult(result);
|
|
809
|
+
}
|
|
810
|
+
);
|
|
811
|
+
server.tool(
|
|
812
|
+
"data_noya_polymarket_analysis_top",
|
|
813
|
+
"Auto-generated from sdk.data.noya.polymarketAnalysisTop",
|
|
814
|
+
asRawShape(noyaSchemas.AnalysisTopBody),
|
|
815
|
+
async (args) => {
|
|
816
|
+
const result = await Promise.resolve(client.data.noya.polymarketAnalysisTop(args));
|
|
817
|
+
return toMcpResult(result);
|
|
818
|
+
}
|
|
819
|
+
);
|
|
820
|
+
server.tool(
|
|
821
|
+
"data_noya_polymarket_analysis_health",
|
|
822
|
+
"Auto-generated from sdk.data.noya.polymarketAnalysisHealth",
|
|
823
|
+
{},
|
|
824
|
+
async () => {
|
|
825
|
+
const result = await Promise.resolve(client.data.noya.polymarketAnalysisHealth());
|
|
826
|
+
return toMcpResult(result);
|
|
827
|
+
}
|
|
828
|
+
);
|
|
829
|
+
server.tool(
|
|
830
|
+
"account_polymarket_address",
|
|
831
|
+
"Derive the Polymarket Safe address (CREATE2) for the user's EOA. Mirrors `noya_get_polymarket_address` MCP tool \u2014 pure local derivation, no network call beyond the one /api/me to resolve the EOA",
|
|
832
|
+
{},
|
|
833
|
+
async () => {
|
|
834
|
+
const result = await Promise.resolve(client.account.polymarketAddress());
|
|
835
|
+
return toMcpResult(result);
|
|
836
|
+
}
|
|
837
|
+
);
|
|
838
|
+
server.tool(
|
|
839
|
+
"account_address",
|
|
840
|
+
"Resolved Ethereum address from /api/me. Throws if anonymous",
|
|
841
|
+
{},
|
|
842
|
+
async () => {
|
|
843
|
+
const result = await Promise.resolve(client.account.address());
|
|
844
|
+
return toMcpResult(result);
|
|
845
|
+
}
|
|
846
|
+
);
|
|
847
|
+
server.tool(
|
|
848
|
+
"account_sign_message",
|
|
849
|
+
"Auto-generated from sdk.account.signMessage",
|
|
850
|
+
asRawShape(sdkSchemas.SignMessageInput),
|
|
851
|
+
async (args) => {
|
|
852
|
+
const result = await Promise.resolve(client.account.signMessage(args));
|
|
853
|
+
return toMcpResult(result);
|
|
854
|
+
}
|
|
855
|
+
);
|
|
856
|
+
server.tool(
|
|
857
|
+
"account_sign_transaction",
|
|
858
|
+
"Auto-generated from sdk.account.signTransaction",
|
|
859
|
+
asRawShape(sdkSchemas.SignTransactionInput),
|
|
860
|
+
async (args) => {
|
|
861
|
+
const result = await Promise.resolve(client.account.signTransaction(args));
|
|
862
|
+
return toMcpResult(result);
|
|
863
|
+
}
|
|
864
|
+
);
|
|
865
|
+
server.tool(
|
|
866
|
+
"account_sign_typed_data",
|
|
867
|
+
"Auto-generated from sdk.account.signTypedData",
|
|
868
|
+
asRawShape(sdkSchemas.SignTypedDataInput),
|
|
869
|
+
async (args) => {
|
|
870
|
+
const result = await Promise.resolve(client.account.signTypedData(args));
|
|
871
|
+
return toMcpResult(result);
|
|
872
|
+
}
|
|
873
|
+
);
|
|
874
|
+
server.tool(
|
|
875
|
+
"account_to_viem",
|
|
876
|
+
"Returns a viem `LocalAccount` whose signing methods POST to signer. Memoized \u2014 same Account instance always returns the same viem account",
|
|
877
|
+
{},
|
|
878
|
+
async () => {
|
|
879
|
+
const result = await Promise.resolve(client.account.toViem());
|
|
880
|
+
return toMcpResult(result);
|
|
881
|
+
}
|
|
882
|
+
);
|
|
883
|
+
server.tool(
|
|
884
|
+
"chain_wallet_get_wallet_details",
|
|
885
|
+
"Auto-generated from sdk.chain.wallet.getWalletDetails",
|
|
886
|
+
asRawShape(sdkSchemas.WalletGetWalletDetailsInput),
|
|
887
|
+
async (args) => {
|
|
888
|
+
const result = await Promise.resolve(client.chain.wallet.getWalletDetails(args));
|
|
889
|
+
return toMcpResult(result);
|
|
890
|
+
}
|
|
891
|
+
);
|
|
892
|
+
server.tool(
|
|
893
|
+
"chain_wallet_native_transfer",
|
|
894
|
+
"Auto-generated from sdk.chain.wallet.nativeTransfer",
|
|
895
|
+
asRawShape(sdkSchemas.WalletNativeTransferInput),
|
|
896
|
+
async (args) => {
|
|
897
|
+
const result = await Promise.resolve(client.chain.wallet.nativeTransfer(args));
|
|
898
|
+
return toMcpResult(result);
|
|
899
|
+
}
|
|
900
|
+
);
|
|
901
|
+
server.tool(
|
|
902
|
+
"chain_erc20_get_balance",
|
|
903
|
+
"Auto-generated from sdk.chain.erc20.getBalance",
|
|
904
|
+
asRawShape(sdkSchemas.Erc20GetBalanceInput),
|
|
905
|
+
async (args) => {
|
|
906
|
+
const result = await Promise.resolve(client.chain.erc20.getBalance(args));
|
|
907
|
+
return toMcpResult(result);
|
|
908
|
+
}
|
|
909
|
+
);
|
|
910
|
+
server.tool(
|
|
911
|
+
"chain_erc20_get_allowance",
|
|
912
|
+
"Auto-generated from sdk.chain.erc20.getAllowance",
|
|
913
|
+
asRawShape(sdkSchemas.Erc20GetAllowanceInput),
|
|
914
|
+
async (args) => {
|
|
915
|
+
const result = await Promise.resolve(client.chain.erc20.getAllowance(args));
|
|
916
|
+
return toMcpResult(result);
|
|
917
|
+
}
|
|
918
|
+
);
|
|
919
|
+
server.tool(
|
|
920
|
+
"chain_erc20_get_erc20_token_address",
|
|
921
|
+
"Auto-generated from sdk.chain.erc20.getErc20TokenAddress",
|
|
922
|
+
asRawShape(sdkSchemas.Erc20GetErc20TokenAddressInput),
|
|
923
|
+
async (args) => {
|
|
924
|
+
const result = await Promise.resolve(client.chain.erc20.getErc20TokenAddress(args));
|
|
925
|
+
return toMcpResult(result);
|
|
926
|
+
}
|
|
927
|
+
);
|
|
928
|
+
server.tool(
|
|
929
|
+
"chain_erc20_transfer",
|
|
930
|
+
"Auto-generated from sdk.chain.erc20.transfer",
|
|
931
|
+
asRawShape(sdkSchemas.Erc20TransferInput),
|
|
932
|
+
async (args) => {
|
|
933
|
+
const result = await Promise.resolve(client.chain.erc20.transfer(args));
|
|
934
|
+
return toMcpResult(result);
|
|
935
|
+
}
|
|
936
|
+
);
|
|
937
|
+
server.tool(
|
|
938
|
+
"chain_erc20_approve",
|
|
939
|
+
"Auto-generated from sdk.chain.erc20.approve",
|
|
940
|
+
asRawShape(sdkSchemas.Erc20ApproveInput),
|
|
941
|
+
async (args) => {
|
|
942
|
+
const result = await Promise.resolve(client.chain.erc20.approve(args));
|
|
943
|
+
return toMcpResult(result);
|
|
944
|
+
}
|
|
945
|
+
);
|
|
946
|
+
server.tool(
|
|
947
|
+
"chain_erc721_get_balance",
|
|
948
|
+
"Auto-generated from sdk.chain.erc721.getBalance",
|
|
949
|
+
asRawShape(sdkSchemas.Erc721GetBalanceInput),
|
|
950
|
+
async (args) => {
|
|
951
|
+
const result = await Promise.resolve(client.chain.erc721.getBalance(args));
|
|
952
|
+
return toMcpResult(result);
|
|
953
|
+
}
|
|
954
|
+
);
|
|
955
|
+
server.tool(
|
|
956
|
+
"chain_erc721_mint",
|
|
957
|
+
"Auto-generated from sdk.chain.erc721.mint",
|
|
958
|
+
asRawShape(sdkSchemas.Erc721MintInput),
|
|
959
|
+
async (args) => {
|
|
960
|
+
const result = await Promise.resolve(client.chain.erc721.mint(args));
|
|
961
|
+
return toMcpResult(result);
|
|
962
|
+
}
|
|
963
|
+
);
|
|
964
|
+
server.tool(
|
|
965
|
+
"chain_erc721_transfer",
|
|
966
|
+
"Auto-generated from sdk.chain.erc721.transfer",
|
|
967
|
+
asRawShape(sdkSchemas.Erc721TransferInput),
|
|
968
|
+
async (args) => {
|
|
969
|
+
const result = await Promise.resolve(client.chain.erc721.transfer(args));
|
|
970
|
+
return toMcpResult(result);
|
|
971
|
+
}
|
|
972
|
+
);
|
|
973
|
+
server.tool(
|
|
974
|
+
"chain_weth_wrap_eth",
|
|
975
|
+
"Auto-generated from sdk.chain.weth.wrapEth",
|
|
976
|
+
asRawShape(sdkSchemas.WethWrapEthInput),
|
|
977
|
+
async (args) => {
|
|
978
|
+
const result = await Promise.resolve(client.chain.weth.wrapEth(args));
|
|
979
|
+
return toMcpResult(result);
|
|
980
|
+
}
|
|
981
|
+
);
|
|
982
|
+
server.tool(
|
|
983
|
+
"chain_weth_unwrap_eth",
|
|
984
|
+
"Auto-generated from sdk.chain.weth.unwrapEth",
|
|
985
|
+
asRawShape(sdkSchemas.WethUnwrapEthInput),
|
|
986
|
+
async (args) => {
|
|
987
|
+
const result = await Promise.resolve(client.chain.weth.unwrapEth(args));
|
|
988
|
+
return toMcpResult(result);
|
|
989
|
+
}
|
|
990
|
+
);
|
|
991
|
+
server.tool(
|
|
992
|
+
"chain_compound_supply",
|
|
993
|
+
"Auto-generated from sdk.chain.compound.supply",
|
|
994
|
+
asRawShape(sdkSchemas.CompoundSupplyInput),
|
|
995
|
+
async (args) => {
|
|
996
|
+
const result = await Promise.resolve(client.chain.compound.supply(args));
|
|
997
|
+
return toMcpResult(result);
|
|
998
|
+
}
|
|
999
|
+
);
|
|
1000
|
+
server.tool(
|
|
1001
|
+
"chain_compound_withdraw",
|
|
1002
|
+
"Auto-generated from sdk.chain.compound.withdraw",
|
|
1003
|
+
asRawShape(sdkSchemas.CompoundSupplyInput),
|
|
1004
|
+
async (args) => {
|
|
1005
|
+
const result = await Promise.resolve(client.chain.compound.withdraw(args));
|
|
1006
|
+
return toMcpResult(result);
|
|
1007
|
+
}
|
|
1008
|
+
);
|
|
1009
|
+
server.tool(
|
|
1010
|
+
"chain_compound_borrow",
|
|
1011
|
+
"Auto-generated from sdk.chain.compound.borrow",
|
|
1012
|
+
asRawShape(sdkSchemas.CompoundSupplyInput),
|
|
1013
|
+
async (args) => {
|
|
1014
|
+
const result = await Promise.resolve(client.chain.compound.borrow(args));
|
|
1015
|
+
return toMcpResult(result);
|
|
1016
|
+
}
|
|
1017
|
+
);
|
|
1018
|
+
server.tool(
|
|
1019
|
+
"chain_compound_repay",
|
|
1020
|
+
"Auto-generated from sdk.chain.compound.repay",
|
|
1021
|
+
asRawShape(sdkSchemas.CompoundSupplyInput),
|
|
1022
|
+
async (args) => {
|
|
1023
|
+
const result = await Promise.resolve(client.chain.compound.repay(args));
|
|
1024
|
+
return toMcpResult(result);
|
|
1025
|
+
}
|
|
1026
|
+
);
|
|
1027
|
+
server.tool(
|
|
1028
|
+
"chain_compound_get_portfolio",
|
|
1029
|
+
"Auto-generated from sdk.chain.compound.getPortfolio",
|
|
1030
|
+
asRawShape(sdkSchemas.CompoundGetPortfolioInput),
|
|
1031
|
+
async (args) => {
|
|
1032
|
+
const result = await Promise.resolve(client.chain.compound.getPortfolio(args));
|
|
1033
|
+
return toMcpResult(result);
|
|
1034
|
+
}
|
|
1035
|
+
);
|
|
1036
|
+
server.tool(
|
|
1037
|
+
"chain_morpho_deposit",
|
|
1038
|
+
"Auto-generated from sdk.chain.morpho.deposit",
|
|
1039
|
+
asRawShape(sdkSchemas.MorphoDepositInput),
|
|
1040
|
+
async (args) => {
|
|
1041
|
+
const result = await Promise.resolve(client.chain.morpho.deposit(args));
|
|
1042
|
+
return toMcpResult(result);
|
|
1043
|
+
}
|
|
1044
|
+
);
|
|
1045
|
+
server.tool(
|
|
1046
|
+
"chain_morpho_withdraw",
|
|
1047
|
+
"Auto-generated from sdk.chain.morpho.withdraw",
|
|
1048
|
+
asRawShape(sdkSchemas.MorphoDepositInput),
|
|
1049
|
+
async (args) => {
|
|
1050
|
+
const result = await Promise.resolve(client.chain.morpho.withdraw(args));
|
|
1051
|
+
return toMcpResult(result);
|
|
1052
|
+
}
|
|
1053
|
+
);
|
|
1054
|
+
server.tool(
|
|
1055
|
+
"chain_enso_route",
|
|
1056
|
+
"Auto-generated from sdk.chain.enso.route",
|
|
1057
|
+
asRawShape(sdkSchemas.EnsoRouteInput),
|
|
1058
|
+
async (args) => {
|
|
1059
|
+
const result = await Promise.resolve(client.chain.enso.route(args));
|
|
1060
|
+
return toMcpResult(result);
|
|
1061
|
+
}
|
|
1062
|
+
);
|
|
1063
|
+
server.tool(
|
|
1064
|
+
"chain_enso_bridge",
|
|
1065
|
+
"Auto-generated from sdk.chain.enso.bridge",
|
|
1066
|
+
asRawShape(sdkSchemas.EnsoBridgeInput),
|
|
1067
|
+
async (args) => {
|
|
1068
|
+
const result = await Promise.resolve(client.chain.enso.bridge(args));
|
|
1069
|
+
return toMcpResult(result);
|
|
1070
|
+
}
|
|
1071
|
+
);
|
|
1072
|
+
server.tool(
|
|
1073
|
+
"chain_pyth_fetch_price_feed",
|
|
1074
|
+
"Auto-generated from sdk.chain.pyth.fetchPriceFeed",
|
|
1075
|
+
asRawShape(sdkSchemas.PythFetchPriceFeedInput),
|
|
1076
|
+
async (args) => {
|
|
1077
|
+
const result = await Promise.resolve(client.chain.pyth.fetchPriceFeed(args));
|
|
1078
|
+
return toMcpResult(result);
|
|
1079
|
+
}
|
|
1080
|
+
);
|
|
1081
|
+
server.tool(
|
|
1082
|
+
"chain_pyth_fetch_price",
|
|
1083
|
+
"Auto-generated from sdk.chain.pyth.fetchPrice",
|
|
1084
|
+
asRawShape(sdkSchemas.PythFetchPriceInput),
|
|
1085
|
+
async (args) => {
|
|
1086
|
+
const result = await Promise.resolve(client.chain.pyth.fetchPrice(args));
|
|
1087
|
+
return toMcpResult(result);
|
|
1088
|
+
}
|
|
1089
|
+
);
|
|
1090
|
+
server.tool(
|
|
1091
|
+
"chain_defillama_find_protocol",
|
|
1092
|
+
"Auto-generated from sdk.chain.defillama.findProtocol",
|
|
1093
|
+
asRawShape(sdkSchemas.DefillamaFindProtocolInput),
|
|
1094
|
+
async (args) => {
|
|
1095
|
+
const result = await Promise.resolve(client.chain.defillama.findProtocol(args));
|
|
1096
|
+
return toMcpResult(result);
|
|
1097
|
+
}
|
|
1098
|
+
);
|
|
1099
|
+
server.tool(
|
|
1100
|
+
"chain_defillama_get_protocol",
|
|
1101
|
+
"Auto-generated from sdk.chain.defillama.getProtocol",
|
|
1102
|
+
asRawShape(sdkSchemas.DefillamaGetProtocolInput),
|
|
1103
|
+
async (args) => {
|
|
1104
|
+
const result = await Promise.resolve(client.chain.defillama.getProtocol(args));
|
|
1105
|
+
return toMcpResult(result);
|
|
1106
|
+
}
|
|
1107
|
+
);
|
|
1108
|
+
server.tool(
|
|
1109
|
+
"chain_defillama_get_token_prices",
|
|
1110
|
+
"Auto-generated from sdk.chain.defillama.getTokenPrices",
|
|
1111
|
+
asRawShape(sdkSchemas.DefillamaGetTokenPricesInput),
|
|
1112
|
+
async (args) => {
|
|
1113
|
+
const result = await Promise.resolve(client.chain.defillama.getTokenPrices(args));
|
|
1114
|
+
return toMcpResult(result);
|
|
1115
|
+
}
|
|
1116
|
+
);
|
|
1117
|
+
server.tool(
|
|
1118
|
+
"chain_x402_make_http_request",
|
|
1119
|
+
"Auto-generated from sdk.chain.x402.makeHttpRequest",
|
|
1120
|
+
asRawShape(sdkSchemas.X402MakeHttpRequestInput),
|
|
1121
|
+
async (args) => {
|
|
1122
|
+
const result = await Promise.resolve(client.chain.x402.makeHttpRequest(args));
|
|
1123
|
+
return toMcpResult(result);
|
|
1124
|
+
}
|
|
1125
|
+
);
|
|
1126
|
+
server.tool(
|
|
1127
|
+
"chain_x402_discover_services",
|
|
1128
|
+
"Auto-generated from sdk.chain.x402.discoverServices",
|
|
1129
|
+
asRawShape(sdkSchemas.X402DiscoverServicesInput),
|
|
1130
|
+
async (args) => {
|
|
1131
|
+
const result = await Promise.resolve(client.chain.x402.discoverServices(args));
|
|
1132
|
+
return toMcpResult(result);
|
|
1133
|
+
}
|
|
1134
|
+
);
|
|
1135
|
+
server.tool(
|
|
1136
|
+
"predict_search_markets",
|
|
1137
|
+
"Auto-generated from sdk.predict.searchMarkets",
|
|
1138
|
+
asRawShape(sdkSchemas.SearchMarketsInput),
|
|
1139
|
+
async (args) => {
|
|
1140
|
+
const result = await Promise.resolve(client.predict.searchMarkets(args));
|
|
1141
|
+
return toMcpResult(result);
|
|
1142
|
+
}
|
|
1143
|
+
);
|
|
1144
|
+
server.tool(
|
|
1145
|
+
"predict_search_events",
|
|
1146
|
+
"Auto-generated from sdk.predict.searchEvents",
|
|
1147
|
+
asRawShape(sdkSchemas.SearchEventsInput),
|
|
1148
|
+
async (args) => {
|
|
1149
|
+
const result = await Promise.resolve(client.predict.searchEvents(args));
|
|
1150
|
+
return toMcpResult(result);
|
|
1151
|
+
}
|
|
1152
|
+
);
|
|
1153
|
+
server.tool(
|
|
1154
|
+
"predict_get_market",
|
|
1155
|
+
"Auto-generated from sdk.predict.getMarket",
|
|
1156
|
+
asRawShape(sdkSchemas.GetMarketInput),
|
|
1157
|
+
async (args) => {
|
|
1158
|
+
const result = await Promise.resolve(client.predict.getMarket(args));
|
|
1159
|
+
return toMcpResult(result);
|
|
1160
|
+
}
|
|
1161
|
+
);
|
|
1162
|
+
server.tool(
|
|
1163
|
+
"predict_get_orderbook",
|
|
1164
|
+
"Auto-generated from sdk.predict.getOrderbook",
|
|
1165
|
+
asRawShape(sdkSchemas.GetOrderbookInput),
|
|
1166
|
+
async (args) => {
|
|
1167
|
+
const result = await Promise.resolve(client.predict.getOrderbook(args));
|
|
1168
|
+
return toMcpResult(result);
|
|
1169
|
+
}
|
|
1170
|
+
);
|
|
1171
|
+
server.tool(
|
|
1172
|
+
"predict_strategy_playbook",
|
|
1173
|
+
"Auto-generated from sdk.predict.strategyPlaybook",
|
|
1174
|
+
asRawShape(sdkSchemas.StrategyPlaybookInput),
|
|
1175
|
+
async (args) => {
|
|
1176
|
+
const result = await Promise.resolve(client.predict.strategyPlaybook(args));
|
|
1177
|
+
return toMcpResult(result);
|
|
1178
|
+
}
|
|
1179
|
+
);
|
|
1180
|
+
server.tool(
|
|
1181
|
+
"predict_create_order",
|
|
1182
|
+
"Auto-generated from sdk.predict.createOrder",
|
|
1183
|
+
asRawShape(sdkSchemas.CreateOrderInput),
|
|
1184
|
+
async (args) => {
|
|
1185
|
+
const result = await Promise.resolve(client.predict.createOrder(args));
|
|
1186
|
+
return toMcpResult(result);
|
|
1187
|
+
}
|
|
1188
|
+
);
|
|
1189
|
+
server.tool(
|
|
1190
|
+
"predict_cancel_order",
|
|
1191
|
+
"Auto-generated from sdk.predict.cancelOrder",
|
|
1192
|
+
asRawShape(sdkSchemas.CancelOrderInput),
|
|
1193
|
+
async (args) => {
|
|
1194
|
+
const result = await Promise.resolve(client.predict.cancelOrder(args));
|
|
1195
|
+
return toMcpResult(result);
|
|
1196
|
+
}
|
|
1197
|
+
);
|
|
1198
|
+
server.tool(
|
|
1199
|
+
"predict_positions",
|
|
1200
|
+
"Auto-generated from sdk.predict.positions",
|
|
1201
|
+
asRawShape(sdkSchemas.PositionsInput),
|
|
1202
|
+
async (args) => {
|
|
1203
|
+
const result = await Promise.resolve(client.predict.positions(args));
|
|
1204
|
+
return toMcpResult(result);
|
|
1205
|
+
}
|
|
1206
|
+
);
|
|
1207
|
+
server.tool(
|
|
1208
|
+
"predict_open_orders",
|
|
1209
|
+
"Auto-generated from sdk.predict.openOrders",
|
|
1210
|
+
asRawShape(sdkSchemas.OpenOrdersInput),
|
|
1211
|
+
async (args) => {
|
|
1212
|
+
const result = await Promise.resolve(client.predict.openOrders(args));
|
|
1213
|
+
return toMcpResult(result);
|
|
1214
|
+
}
|
|
1215
|
+
);
|
|
1216
|
+
server.tool(
|
|
1217
|
+
"predict_my_trades",
|
|
1218
|
+
"Auto-generated from sdk.predict.myTrades",
|
|
1219
|
+
asRawShape(sdkSchemas.MyTradesInput),
|
|
1220
|
+
async (args) => {
|
|
1221
|
+
const result = await Promise.resolve(client.predict.myTrades(args));
|
|
1222
|
+
return toMcpResult(result);
|
|
1223
|
+
}
|
|
1224
|
+
);
|
|
1225
|
+
server.tool(
|
|
1226
|
+
"predict_get_order",
|
|
1227
|
+
"Auto-generated from sdk.predict.getOrder",
|
|
1228
|
+
asRawShape(sdkSchemas.GetOrderInput),
|
|
1229
|
+
async (args) => {
|
|
1230
|
+
const result = await Promise.resolve(client.predict.getOrder(args));
|
|
1231
|
+
return toMcpResult(result);
|
|
1232
|
+
}
|
|
1233
|
+
);
|
|
1234
|
+
server.tool(
|
|
1235
|
+
"threads_list",
|
|
1236
|
+
"GET /api/threads \u2192 returns the list of threads for the authed user",
|
|
1237
|
+
{},
|
|
1238
|
+
async () => {
|
|
1239
|
+
const result = await Promise.resolve(client.threads.list());
|
|
1240
|
+
return toMcpResult(result);
|
|
1241
|
+
}
|
|
1242
|
+
);
|
|
1243
|
+
server.tool(
|
|
1244
|
+
"threads_search",
|
|
1245
|
+
"GET /api/threads/search?q=",
|
|
1246
|
+
asRawShape(sdkSchemas.SearchInput),
|
|
1247
|
+
async (args) => {
|
|
1248
|
+
const result = await Promise.resolve(client.threads.search(args));
|
|
1249
|
+
return toMcpResult(result);
|
|
1250
|
+
}
|
|
1251
|
+
);
|
|
1252
|
+
server.tool(
|
|
1253
|
+
"threads_get_messages",
|
|
1254
|
+
"GET /api/threads/:id/messages",
|
|
1255
|
+
asRawShape(sdkSchemas.GetMessagesInput),
|
|
1256
|
+
async (args) => {
|
|
1257
|
+
const result = await Promise.resolve(client.threads.getMessages(args));
|
|
1258
|
+
return toMcpResult(result);
|
|
1259
|
+
}
|
|
1260
|
+
);
|
|
1261
|
+
server.tool(
|
|
1262
|
+
"threads_summary",
|
|
1263
|
+
"GET /api/threads/:id/summary \u2014 compact summary for voice agent context",
|
|
1264
|
+
asRawShape(sdkSchemas.SummaryInput),
|
|
1265
|
+
async (args) => {
|
|
1266
|
+
const result = await Promise.resolve(client.threads.summary(args));
|
|
1267
|
+
return toMcpResult(result);
|
|
1268
|
+
}
|
|
1269
|
+
);
|
|
1270
|
+
server.tool(
|
|
1271
|
+
"threads_delete",
|
|
1272
|
+
"DELETE /api/threads/:id",
|
|
1273
|
+
asRawShape(sdkSchemas.DeleteInput),
|
|
1274
|
+
async (args) => {
|
|
1275
|
+
const result = await Promise.resolve(client.threads.delete(args));
|
|
1276
|
+
return toMcpResult(result);
|
|
1277
|
+
}
|
|
1278
|
+
);
|
|
1279
|
+
server.tool(
|
|
1280
|
+
"threads_send_message",
|
|
1281
|
+
"POST /api/messages",
|
|
1282
|
+
asRawShape(sdkSchemas.SendMessageInput),
|
|
1283
|
+
async (args) => {
|
|
1284
|
+
const result = await Promise.resolve(client.threads.sendMessage(args));
|
|
1285
|
+
return toMcpResult(result);
|
|
1286
|
+
}
|
|
1287
|
+
);
|
|
1288
|
+
server.tool(
|
|
1289
|
+
"threads_generate_id",
|
|
1290
|
+
"Pure local UUID v4. Mirrors `noya_generate_thread_id` MCP tool \u2014 useful for generating a stable threadId before sending the first message",
|
|
1291
|
+
{},
|
|
1292
|
+
async () => {
|
|
1293
|
+
const result = await Promise.resolve(client.threads.generateId());
|
|
1294
|
+
return toMcpResult(result);
|
|
1295
|
+
}
|
|
1296
|
+
);
|
|
1297
|
+
server.tool(
|
|
1298
|
+
"threads_agent_summary",
|
|
1299
|
+
"GET /api/agents/summarize \u2014 list of agents and their specialties",
|
|
1300
|
+
{},
|
|
1301
|
+
async () => {
|
|
1302
|
+
const result = await Promise.resolve(client.threads.agentSummary());
|
|
1303
|
+
return toMcpResult(result);
|
|
1304
|
+
}
|
|
1305
|
+
);
|
|
1306
|
+
server.tool(
|
|
1307
|
+
"portfolio_get",
|
|
1308
|
+
"GET /api/user/summary \u2014 wraps `noya_get_portfolio` MCP semantics by returning the user's identity + holdings + DCA + polymarket data in one shot. Falls back to the raw response if `data` is missing",
|
|
1309
|
+
{},
|
|
1310
|
+
async () => {
|
|
1311
|
+
const result = await Promise.resolve(client.portfolio.get());
|
|
1312
|
+
return toMcpResult(result);
|
|
1313
|
+
}
|
|
1314
|
+
);
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
// src/index.ts
|
|
1318
|
+
function registerTools(server, getClient) {
|
|
1319
|
+
registerGeneratedTools(server, getClient);
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
// src/stdio.ts
|
|
1323
|
+
async function main() {
|
|
1324
|
+
const apiKey = process.env.NOYA_API_KEY;
|
|
1325
|
+
const bearer = process.env.NOYA_BEARER;
|
|
1326
|
+
if (!apiKey && !bearer) {
|
|
1327
|
+
process.stderr.write(
|
|
1328
|
+
"noya-mcp requires NOYA_API_KEY (or NOYA_BEARER) to authenticate against agent-api.noya.ai\n"
|
|
1329
|
+
);
|
|
1330
|
+
process.exit(1);
|
|
1331
|
+
}
|
|
1332
|
+
const sdk = new NoyaSDK({
|
|
1333
|
+
...apiKey ? { apiKey } : {},
|
|
1334
|
+
...bearer ? { bearer } : {},
|
|
1335
|
+
...process.env.NOYA_AGENT_API_URL ? { noyaAgentApiUrl: process.env.NOYA_AGENT_API_URL } : {},
|
|
1336
|
+
...process.env.NOYA_DATA_SERVER_URL ? { dataServerUrl: process.env.NOYA_DATA_SERVER_URL } : {},
|
|
1337
|
+
...process.env.NOYA_SIGNER_URL ? { signer: { url: process.env.NOYA_SIGNER_URL } } : {}
|
|
1338
|
+
});
|
|
1339
|
+
const server = new McpServer({
|
|
1340
|
+
name: "noya-mcp",
|
|
1341
|
+
version: "0.0.0"
|
|
1342
|
+
});
|
|
1343
|
+
registerTools(server, () => sdk);
|
|
1344
|
+
const transport = new StdioServerTransport();
|
|
1345
|
+
await server.connect(transport);
|
|
1346
|
+
}
|
|
1347
|
+
main().catch((err) => {
|
|
1348
|
+
process.stderr.write(`noya-mcp failed: ${String(err)}
|
|
1349
|
+
`);
|
|
1350
|
+
process.exit(1);
|
|
1351
|
+
});
|