@missionsquad/mcp-defillama 1.0.0 → 1.2.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/README.md +82 -23
- package/dist/clients/defillama.client.d.ts +120 -29
- package/dist/clients/defillama.client.js +208 -159
- package/dist/clients/defillama.client.js.map +1 -1
- package/dist/clients/defillama.mock.client.d.ts +6 -2
- package/dist/clients/defillama.mock.client.js +6 -2
- package/dist/clients/defillama.mock.client.js.map +1 -1
- package/dist/handlers/datetime.d.ts +18 -0
- package/dist/handlers/datetime.js +92 -0
- package/dist/handlers/datetime.js.map +1 -0
- package/dist/handlers/defillama.d.ts +25 -1
- package/dist/handlers/defillama.js +298 -22
- package/dist/handlers/defillama.js.map +1 -1
- package/dist/handlers/defillama.types.d.ts +113 -6
- package/dist/handlers/defillama.types.js +3 -0
- package/dist/handlers/defillama.types.js.map +1 -1
- package/dist/handlers/transform.d.ts +34 -0
- package/dist/handlers/transform.js +241 -0
- package/dist/handlers/transform.js.map +1 -0
- package/dist/handlers/utils.d.ts +8 -0
- package/dist/handlers/utils.js +16 -0
- package/dist/handlers/utils.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/tools.d.ts +475 -7
- package/dist/tools.js +393 -24
- package/dist/tools.js.map +1 -1
- package/package.json +5 -3
package/dist/tools.js
CHANGED
|
@@ -1,93 +1,462 @@
|
|
|
1
|
-
import { getProtocolsHandler, getProtocolTvlHandler, getChainTvlHandler, getTokenPricesHandler, getHistoricalPricesHandler, getStablecoinsHandler, getStablecoinDataHandler } from "./handlers/defillama.js";
|
|
1
|
+
import { getProtocolsHandler, getProtocolTvlHandler, getHistoricalChainTvlHandler, getChainTvlHandler, getCurrentProtocolTvlHandler, getChainsHandler, getTokenPricesHandler, getHistoricalPricesHandler, getBatchHistoricalPricesHandler, getPriceChartHandler, getPricePercentageChangeHandler, getFirstPricesHandler, getBlockHandler, getStablecoinsHandler, getStablecoinChartsAllHandler, getStablecoinChartsChainHandler, getStablecoinDataHandler, getStablecoinChainsHandler, getStablecoinPricesHandler, getPoolsHandler, getPoolChartHandler, getDexsOverviewHandler, getDexsOverviewByChainHandler, getDexSummaryHandler, getOptionsOverviewHandler, getOptionsOverviewByChainHandler, getOptionSummaryHandler, getOpenInterestOverviewHandler, getFeesOverviewHandler, getFeesOverviewByChainHandler, getFeeSummaryHandler } from "./handlers/defillama.js";
|
|
2
|
+
// ---------------------------------------------------------------------------
|
|
3
|
+
// Reusable property fragments
|
|
4
|
+
// ---------------------------------------------------------------------------
|
|
5
|
+
// Responses are compacted by default; these optional controls fetch more.
|
|
6
|
+
const fullProp = {
|
|
7
|
+
full: { type: "boolean", description: "Optional. Return the complete untrimmed response (default false)" }
|
|
8
|
+
};
|
|
9
|
+
const pointsProp = {
|
|
10
|
+
points: { type: "number", description: "Optional. Max time-series data points to return (default 30)" }
|
|
11
|
+
};
|
|
12
|
+
const limitProp = {
|
|
13
|
+
limit: { type: "number", description: "Optional. Max number of items to return" }
|
|
14
|
+
};
|
|
15
|
+
const includeTokensProp = {
|
|
16
|
+
includeTokens: { type: "boolean", description: "Optional. Include token-level breakdowns (default false)" }
|
|
17
|
+
};
|
|
18
|
+
const dateTimeProp = (extra = "") => ({
|
|
19
|
+
type: "string",
|
|
20
|
+
description: `12-hour datetime string, e.g. "06/15/2024 03:30 PM" (UTC assumed), ` +
|
|
21
|
+
`or with a timezone "06/15/2024 03:30 PM America/New_York" / "+05:30". ` +
|
|
22
|
+
`UNIX seconds are also accepted.${extra}`
|
|
23
|
+
});
|
|
24
|
+
const coinsProperty = {
|
|
25
|
+
type: "array",
|
|
26
|
+
description: "Coin identifiers, e.g. \"ethereum:0xc02aaa...\" or \"coingecko:ethereum\"",
|
|
27
|
+
items: { type: "string" }
|
|
28
|
+
};
|
|
29
|
+
// Query options shared by the DEX/options/fees overview & summary endpoints.
|
|
30
|
+
const overviewProperties = {
|
|
31
|
+
dataType: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Optional. Metric to return (e.g. dailyVolume, dailyFees, dailyRevenue)"
|
|
34
|
+
},
|
|
35
|
+
excludeTotalDataChart: {
|
|
36
|
+
type: "boolean",
|
|
37
|
+
description: "Optional. Exclude the aggregated chart (default true; set false to include)"
|
|
38
|
+
},
|
|
39
|
+
excludeTotalDataChartBreakdown: {
|
|
40
|
+
type: "boolean",
|
|
41
|
+
description: "Optional. Exclude the broken-down chart (default true; set false to include)"
|
|
42
|
+
},
|
|
43
|
+
...pointsProp,
|
|
44
|
+
...limitProp,
|
|
45
|
+
...fullProp
|
|
46
|
+
};
|
|
2
47
|
export const tools = [
|
|
48
|
+
// -------------------------------------------------------------------------
|
|
49
|
+
// TVL
|
|
50
|
+
// -------------------------------------------------------------------------
|
|
3
51
|
{
|
|
4
52
|
name: "defillama_get_protocols",
|
|
5
|
-
description: "List all protocols tracked by DefiLlama"
|
|
53
|
+
description: "List all protocols tracked by DefiLlama with their TVL (trimmed to the top entries by TVL). " +
|
|
54
|
+
"Example: { \"limit\": 50 (optional), \"full\": false (optional) }",
|
|
6
55
|
inputSchema: {
|
|
7
56
|
type: "object",
|
|
8
|
-
properties: {},
|
|
57
|
+
properties: { ...limitProp, ...fullProp },
|
|
9
58
|
required: []
|
|
10
59
|
}
|
|
11
60
|
},
|
|
12
61
|
{
|
|
13
62
|
name: "defillama_get_protocol_tvl",
|
|
14
|
-
description: "Get TVL
|
|
63
|
+
description: "Get the historical TVL breakdown for a specific protocol. Returns current per-chain TVL and a " +
|
|
64
|
+
"downsampled TVL series by default. " +
|
|
65
|
+
"Example: { \"protocol\": \"aave\", \"points\": 60 (optional), \"includeTokens\": false (optional), \"full\": false (optional) }",
|
|
15
66
|
inputSchema: {
|
|
16
67
|
type: "object",
|
|
17
68
|
properties: {
|
|
18
|
-
protocol: { type: "string" }
|
|
69
|
+
protocol: { type: "string", description: "Protocol slug, e.g. aave" },
|
|
70
|
+
...pointsProp,
|
|
71
|
+
...includeTokensProp,
|
|
72
|
+
...fullProp
|
|
19
73
|
},
|
|
20
74
|
required: ["protocol"]
|
|
21
75
|
}
|
|
22
76
|
},
|
|
77
|
+
{
|
|
78
|
+
name: "defillama_get_historical_chain_tvl",
|
|
79
|
+
description: "Get historical TVL across all chains combined (downsampled time series). " +
|
|
80
|
+
"Example: { \"points\": 30 (optional), \"full\": false (optional) }",
|
|
81
|
+
inputSchema: {
|
|
82
|
+
type: "object",
|
|
83
|
+
properties: { ...pointsProp, ...fullProp },
|
|
84
|
+
required: []
|
|
85
|
+
}
|
|
86
|
+
},
|
|
23
87
|
{
|
|
24
88
|
name: "defillama_get_chain_tvl",
|
|
25
|
-
description: "Get TVL
|
|
89
|
+
description: "Get historical TVL for a specific chain (downsampled time series). " +
|
|
90
|
+
"Example: { \"chain\": \"ethereum\", \"points\": 30 (optional), \"full\": false (optional) }",
|
|
26
91
|
inputSchema: {
|
|
27
92
|
type: "object",
|
|
28
93
|
properties: {
|
|
29
|
-
chain: { type: "string" }
|
|
94
|
+
chain: { type: "string", description: "Chain name, e.g. ethereum" },
|
|
95
|
+
...pointsProp,
|
|
96
|
+
...fullProp
|
|
30
97
|
},
|
|
31
98
|
required: ["chain"]
|
|
32
99
|
}
|
|
33
100
|
},
|
|
101
|
+
{
|
|
102
|
+
name: "defillama_get_current_protocol_tvl",
|
|
103
|
+
description: "Get the current TVL of a protocol as a single number. " +
|
|
104
|
+
"Example: { \"protocol\": \"aave\" }",
|
|
105
|
+
inputSchema: {
|
|
106
|
+
type: "object",
|
|
107
|
+
properties: { protocol: { type: "string", description: "Protocol slug, e.g. aave" } },
|
|
108
|
+
required: ["protocol"]
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "defillama_get_chains",
|
|
113
|
+
description: "Get the current TVL of every chain (trimmed to the top chains by TVL). " +
|
|
114
|
+
"Example: { \"limit\": 50 (optional), \"full\": false (optional) }",
|
|
115
|
+
inputSchema: {
|
|
116
|
+
type: "object",
|
|
117
|
+
properties: { ...limitProp, ...fullProp },
|
|
118
|
+
required: []
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
// -------------------------------------------------------------------------
|
|
122
|
+
// Coins / Prices
|
|
123
|
+
// -------------------------------------------------------------------------
|
|
34
124
|
{
|
|
35
125
|
name: "defillama_get_token_prices",
|
|
36
|
-
description: "Get current prices of tokens"
|
|
126
|
+
description: "Get current prices of tokens by identifier. " +
|
|
127
|
+
"Example: { \"coins\": [\"ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2\", \"coingecko:bitcoin\"] }",
|
|
37
128
|
inputSchema: {
|
|
38
129
|
type: "object",
|
|
39
|
-
properties: {
|
|
40
|
-
coins: {
|
|
41
|
-
type: "array",
|
|
42
|
-
items: { type: "string" }
|
|
43
|
-
}
|
|
44
|
-
},
|
|
130
|
+
properties: { coins: coinsProperty },
|
|
45
131
|
required: ["coins"]
|
|
46
132
|
}
|
|
47
133
|
},
|
|
48
134
|
{
|
|
49
135
|
name: "defillama_get_historical_prices",
|
|
50
|
-
description: "Get
|
|
136
|
+
description: "Get token prices at a given historical date/time. " +
|
|
137
|
+
"Example: { \"coins\": [\"coingecko:ethereum\"], \"timestamp\": \"06/15/2024 03:30 PM\" }",
|
|
138
|
+
inputSchema: {
|
|
139
|
+
type: "object",
|
|
140
|
+
properties: {
|
|
141
|
+
coins: coinsProperty,
|
|
142
|
+
timestamp: dateTimeProp()
|
|
143
|
+
},
|
|
144
|
+
required: ["coins", "timestamp"]
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "defillama_get_batch_historical_prices",
|
|
149
|
+
description: "Get historical prices for multiple coins at multiple dates/times. " +
|
|
150
|
+
"Example: { \"coins\": { \"coingecko:ethereum\": [\"06/15/2024 03:30 PM\", \"01/01/2024 12:00 AM UTC\"] }, \"searchWidth\": \"4h\" (optional) }",
|
|
51
151
|
inputSchema: {
|
|
52
152
|
type: "object",
|
|
53
153
|
properties: {
|
|
54
154
|
coins: {
|
|
55
|
-
type: "
|
|
56
|
-
|
|
155
|
+
type: "object",
|
|
156
|
+
description: "Map of coin identifier to an array of datetime strings (or UNIX seconds)",
|
|
157
|
+
additionalProperties: { type: "array", items: { type: "string" } }
|
|
57
158
|
},
|
|
58
|
-
|
|
159
|
+
searchWidth: { type: "string", description: "Optional. Time range to search around each timestamp, e.g. 600 or 4h" }
|
|
59
160
|
},
|
|
60
|
-
required: ["coins"
|
|
161
|
+
required: ["coins"]
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: "defillama_get_price_chart",
|
|
166
|
+
description: "Get a price chart (token prices over time) for the given coins. " +
|
|
167
|
+
"Example: { \"coins\": [\"coingecko:ethereum\"], \"start\": \"01/01/2024 12:00 AM\" (optional), \"span\": 30 (optional), \"period\": \"2d\" (optional), \"points\": 30 (optional), \"full\": false (optional) }",
|
|
168
|
+
inputSchema: {
|
|
169
|
+
type: "object",
|
|
170
|
+
properties: {
|
|
171
|
+
coins: coinsProperty,
|
|
172
|
+
start: dateTimeProp(" Optional start of the range."),
|
|
173
|
+
end: dateTimeProp(" Optional end of the range."),
|
|
174
|
+
span: { type: "number", description: "Optional. Number of data points to return" },
|
|
175
|
+
period: { type: "string", description: "Optional. Duration between data points, e.g. 2d, 1h" },
|
|
176
|
+
searchWidth: { type: "string", description: "Optional. Time range to search around each point" },
|
|
177
|
+
...pointsProp,
|
|
178
|
+
...fullProp
|
|
179
|
+
},
|
|
180
|
+
required: ["coins"]
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "defillama_get_price_percentage_change",
|
|
185
|
+
description: "Get the percentage price change for the given coins over a period. " +
|
|
186
|
+
"Example: { \"coins\": [\"coingecko:ethereum\"], \"timestamp\": \"06/15/2024 03:30 PM\" (optional), \"period\": \"3w\" (optional), \"lookForward\": false (optional) }",
|
|
187
|
+
inputSchema: {
|
|
188
|
+
type: "object",
|
|
189
|
+
properties: {
|
|
190
|
+
coins: coinsProperty,
|
|
191
|
+
timestamp: dateTimeProp(" Optional reference time (defaults to now)."),
|
|
192
|
+
lookForward: { type: "boolean", description: "Optional. Look forward from the timestamp instead of backward" },
|
|
193
|
+
period: { type: "string", description: "Optional. Duration to measure the change over, e.g. 3w, 1d" }
|
|
194
|
+
},
|
|
195
|
+
required: ["coins"]
|
|
61
196
|
}
|
|
62
197
|
},
|
|
198
|
+
{
|
|
199
|
+
name: "defillama_get_first_prices",
|
|
200
|
+
description: "Get the earliest recorded price for the given coins. " +
|
|
201
|
+
"Example: { \"coins\": [\"coingecko:ethereum\"] }",
|
|
202
|
+
inputSchema: {
|
|
203
|
+
type: "object",
|
|
204
|
+
properties: { coins: coinsProperty },
|
|
205
|
+
required: ["coins"]
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: "defillama_get_block",
|
|
210
|
+
description: "Get the block height closest to a date/time on a given chain. " +
|
|
211
|
+
"Example: { \"chain\": \"ethereum\", \"timestamp\": \"06/15/2024 03:30 PM\" }",
|
|
212
|
+
inputSchema: {
|
|
213
|
+
type: "object",
|
|
214
|
+
properties: {
|
|
215
|
+
chain: { type: "string", description: "Chain name, e.g. ethereum" },
|
|
216
|
+
timestamp: dateTimeProp()
|
|
217
|
+
},
|
|
218
|
+
required: ["chain", "timestamp"]
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
// -------------------------------------------------------------------------
|
|
222
|
+
// Stablecoins
|
|
223
|
+
// -------------------------------------------------------------------------
|
|
63
224
|
{
|
|
64
225
|
name: "defillama_get_stablecoins",
|
|
65
|
-
description: "List
|
|
226
|
+
description: "List stablecoins with their circulating amounts (trimmed to the largest by circulating supply). " +
|
|
227
|
+
"Example: { \"includePrices\": true (optional), \"limit\": 50 (optional), \"full\": false (optional) }",
|
|
66
228
|
inputSchema: {
|
|
67
229
|
type: "object",
|
|
68
|
-
properties: {
|
|
230
|
+
properties: {
|
|
231
|
+
includePrices: { type: "boolean", description: "Optional. Include current stablecoin prices" },
|
|
232
|
+
...limitProp,
|
|
233
|
+
...fullProp
|
|
234
|
+
},
|
|
235
|
+
required: []
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: "defillama_get_stablecoin_charts_all",
|
|
240
|
+
description: "Get the historical market cap sum of all stablecoins (downsampled time series). " +
|
|
241
|
+
"Example: { \"stablecoin\": 1 (optional), \"points\": 30 (optional), \"full\": false (optional) }",
|
|
242
|
+
inputSchema: {
|
|
243
|
+
type: "object",
|
|
244
|
+
properties: {
|
|
245
|
+
stablecoin: { type: "number", description: "Optional. Stablecoin ID to filter by" },
|
|
246
|
+
...pointsProp,
|
|
247
|
+
...fullProp
|
|
248
|
+
},
|
|
69
249
|
required: []
|
|
70
250
|
}
|
|
71
251
|
},
|
|
252
|
+
{
|
|
253
|
+
name: "defillama_get_stablecoin_charts_chain",
|
|
254
|
+
description: "Get the historical stablecoin market cap on a specific chain (downsampled time series). " +
|
|
255
|
+
"Example: { \"chain\": \"ethereum\", \"stablecoin\": 1 (optional), \"points\": 30 (optional), \"full\": false (optional) }",
|
|
256
|
+
inputSchema: {
|
|
257
|
+
type: "object",
|
|
258
|
+
properties: {
|
|
259
|
+
chain: { type: "string", description: "Chain name, e.g. ethereum" },
|
|
260
|
+
stablecoin: { type: "number", description: "Optional. Stablecoin ID to filter by" },
|
|
261
|
+
...pointsProp,
|
|
262
|
+
...fullProp
|
|
263
|
+
},
|
|
264
|
+
required: ["chain"]
|
|
265
|
+
}
|
|
266
|
+
},
|
|
72
267
|
{
|
|
73
268
|
name: "defillama_get_stablecoin_data",
|
|
74
|
-
description: "Get data for a specific stablecoin"
|
|
269
|
+
description: "Get historical data for a specific stablecoin. " +
|
|
270
|
+
"Example: { \"asset\": \"1\", \"includeTokens\": false (optional), \"full\": false (optional) }",
|
|
75
271
|
inputSchema: {
|
|
76
272
|
type: "object",
|
|
77
273
|
properties: {
|
|
78
|
-
asset: { type: "string" }
|
|
274
|
+
asset: { type: "string", description: "Stablecoin ID (e.g. 1) or name" },
|
|
275
|
+
...includeTokensProp,
|
|
276
|
+
...fullProp
|
|
79
277
|
},
|
|
80
278
|
required: ["asset"]
|
|
81
279
|
}
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
name: "defillama_get_stablecoin_chains",
|
|
283
|
+
description: "Get current stablecoin totals for each chain (trimmed to the largest by circulating supply). " +
|
|
284
|
+
"Example: { \"limit\": 50 (optional), \"full\": false (optional) }",
|
|
285
|
+
inputSchema: {
|
|
286
|
+
type: "object",
|
|
287
|
+
properties: { ...limitProp, ...fullProp },
|
|
288
|
+
required: []
|
|
289
|
+
}
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
name: "defillama_get_stablecoin_prices",
|
|
293
|
+
description: "Get historical prices of stablecoins (downsampled time series). " +
|
|
294
|
+
"Example: { \"points\": 30 (optional), \"full\": false (optional) }",
|
|
295
|
+
inputSchema: {
|
|
296
|
+
type: "object",
|
|
297
|
+
properties: { ...pointsProp, ...fullProp },
|
|
298
|
+
required: []
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
// -------------------------------------------------------------------------
|
|
302
|
+
// Yields / APY
|
|
303
|
+
// -------------------------------------------------------------------------
|
|
304
|
+
{
|
|
305
|
+
name: "defillama_get_pools",
|
|
306
|
+
description: "Get the latest TVL and APY for yield pools (trimmed to the largest by TVL). " +
|
|
307
|
+
"Example: { \"limit\": 50 (optional), \"full\": false (optional) }",
|
|
308
|
+
inputSchema: {
|
|
309
|
+
type: "object",
|
|
310
|
+
properties: { ...limitProp, ...fullProp },
|
|
311
|
+
required: []
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: "defillama_get_pool_chart",
|
|
316
|
+
description: "Get historical APY and TVL for a specific yield pool (downsampled time series). " +
|
|
317
|
+
"Example: { \"pool\": \"747c1d2a-c668-4682-b9f9-296708a3dd90\", \"points\": 30 (optional), \"full\": false (optional) }",
|
|
318
|
+
inputSchema: {
|
|
319
|
+
type: "object",
|
|
320
|
+
properties: {
|
|
321
|
+
pool: { type: "string", description: "Pool ID (uuid from defillama_get_pools)" },
|
|
322
|
+
...pointsProp,
|
|
323
|
+
...fullProp
|
|
324
|
+
},
|
|
325
|
+
required: ["pool"]
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
// -------------------------------------------------------------------------
|
|
329
|
+
// DEX / Options volume
|
|
330
|
+
// -------------------------------------------------------------------------
|
|
331
|
+
{
|
|
332
|
+
name: "defillama_get_dexs_overview",
|
|
333
|
+
description: "Get a DEX trading volume overview across all chains. Charts are excluded by default. " +
|
|
334
|
+
"Example: { \"dataType\": \"dailyVolume\" (optional), \"limit\": 50 (optional), \"full\": false (optional) }",
|
|
335
|
+
inputSchema: { type: "object", properties: { ...overviewProperties }, required: [] }
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: "defillama_get_dexs_overview_by_chain",
|
|
339
|
+
description: "Get a DEX trading volume overview for a specific chain. " +
|
|
340
|
+
"Example: { \"chain\": \"ethereum\", \"dataType\": \"dailyVolume\" (optional), \"full\": false (optional) }",
|
|
341
|
+
inputSchema: {
|
|
342
|
+
type: "object",
|
|
343
|
+
properties: { chain: { type: "string", description: "Chain name, e.g. ethereum" }, ...overviewProperties },
|
|
344
|
+
required: ["chain"]
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
name: "defillama_get_dex_summary",
|
|
349
|
+
description: "Get a DEX trading volume summary for a specific protocol. " +
|
|
350
|
+
"Example: { \"protocol\": \"uniswap\", \"dataType\": \"dailyVolume\" (optional), \"full\": false (optional) }",
|
|
351
|
+
inputSchema: {
|
|
352
|
+
type: "object",
|
|
353
|
+
properties: { protocol: { type: "string", description: "DEX protocol slug, e.g. uniswap" }, ...overviewProperties },
|
|
354
|
+
required: ["protocol"]
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: "defillama_get_options_overview",
|
|
359
|
+
description: "Get an options volume overview across all chains. " +
|
|
360
|
+
"Example: { \"dataType\": \"dailyNotionalVolume\" (optional), \"full\": false (optional) }",
|
|
361
|
+
inputSchema: { type: "object", properties: { ...overviewProperties }, required: [] }
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
name: "defillama_get_options_overview_by_chain",
|
|
365
|
+
description: "Get an options volume overview for a specific chain. " +
|
|
366
|
+
"Example: { \"chain\": \"ethereum\", \"full\": false (optional) }",
|
|
367
|
+
inputSchema: {
|
|
368
|
+
type: "object",
|
|
369
|
+
properties: { chain: { type: "string", description: "Chain name, e.g. ethereum" }, ...overviewProperties },
|
|
370
|
+
required: ["chain"]
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
name: "defillama_get_option_summary",
|
|
375
|
+
description: "Get an options volume summary for a specific protocol. " +
|
|
376
|
+
"Example: { \"protocol\": \"lyra\", \"full\": false (optional) }",
|
|
377
|
+
inputSchema: {
|
|
378
|
+
type: "object",
|
|
379
|
+
properties: { protocol: { type: "string", description: "Options protocol slug" }, ...overviewProperties },
|
|
380
|
+
required: ["protocol"]
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
// -------------------------------------------------------------------------
|
|
384
|
+
// Perps / Open interest
|
|
385
|
+
// -------------------------------------------------------------------------
|
|
386
|
+
{
|
|
387
|
+
name: "defillama_get_open_interest_overview",
|
|
388
|
+
description: "Get a perpetuals open interest overview across all chains. " +
|
|
389
|
+
"Example: { \"full\": false (optional) }",
|
|
390
|
+
inputSchema: { type: "object", properties: { ...overviewProperties }, required: [] }
|
|
391
|
+
},
|
|
392
|
+
// -------------------------------------------------------------------------
|
|
393
|
+
// Fees / Revenue
|
|
394
|
+
// -------------------------------------------------------------------------
|
|
395
|
+
{
|
|
396
|
+
name: "defillama_get_fees_overview",
|
|
397
|
+
description: "Get a fees and revenue overview across all chains. " +
|
|
398
|
+
"Example: { \"dataType\": \"dailyFees\" (optional), \"limit\": 50 (optional), \"full\": false (optional) }",
|
|
399
|
+
inputSchema: { type: "object", properties: { ...overviewProperties }, required: [] }
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
name: "defillama_get_fees_overview_by_chain",
|
|
403
|
+
description: "Get a fees and revenue overview for a specific chain. " +
|
|
404
|
+
"Example: { \"chain\": \"ethereum\", \"dataType\": \"dailyRevenue\" (optional), \"full\": false (optional) }",
|
|
405
|
+
inputSchema: {
|
|
406
|
+
type: "object",
|
|
407
|
+
properties: { chain: { type: "string", description: "Chain name, e.g. ethereum" }, ...overviewProperties },
|
|
408
|
+
required: ["chain"]
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
name: "defillama_get_fee_summary",
|
|
413
|
+
description: "Get a fees and revenue summary for a specific protocol. " +
|
|
414
|
+
"Example: { \"protocol\": \"aave\", \"dataType\": \"dailyFees\" (optional), \"full\": false (optional) }",
|
|
415
|
+
inputSchema: {
|
|
416
|
+
type: "object",
|
|
417
|
+
properties: { protocol: { type: "string", description: "Protocol slug, e.g. aave" }, ...overviewProperties },
|
|
418
|
+
required: ["protocol"]
|
|
419
|
+
}
|
|
82
420
|
}
|
|
83
421
|
];
|
|
84
422
|
export const handlers = {
|
|
423
|
+
// TVL
|
|
85
424
|
"defillama_get_protocols": getProtocolsHandler,
|
|
86
425
|
"defillama_get_protocol_tvl": getProtocolTvlHandler,
|
|
426
|
+
"defillama_get_historical_chain_tvl": getHistoricalChainTvlHandler,
|
|
87
427
|
"defillama_get_chain_tvl": getChainTvlHandler,
|
|
428
|
+
"defillama_get_current_protocol_tvl": getCurrentProtocolTvlHandler,
|
|
429
|
+
"defillama_get_chains": getChainsHandler,
|
|
430
|
+
// Coins / Prices
|
|
88
431
|
"defillama_get_token_prices": getTokenPricesHandler,
|
|
89
432
|
"defillama_get_historical_prices": getHistoricalPricesHandler,
|
|
433
|
+
"defillama_get_batch_historical_prices": getBatchHistoricalPricesHandler,
|
|
434
|
+
"defillama_get_price_chart": getPriceChartHandler,
|
|
435
|
+
"defillama_get_price_percentage_change": getPricePercentageChangeHandler,
|
|
436
|
+
"defillama_get_first_prices": getFirstPricesHandler,
|
|
437
|
+
"defillama_get_block": getBlockHandler,
|
|
438
|
+
// Stablecoins
|
|
90
439
|
"defillama_get_stablecoins": getStablecoinsHandler,
|
|
91
|
-
"
|
|
440
|
+
"defillama_get_stablecoin_charts_all": getStablecoinChartsAllHandler,
|
|
441
|
+
"defillama_get_stablecoin_charts_chain": getStablecoinChartsChainHandler,
|
|
442
|
+
"defillama_get_stablecoin_data": getStablecoinDataHandler,
|
|
443
|
+
"defillama_get_stablecoin_chains": getStablecoinChainsHandler,
|
|
444
|
+
"defillama_get_stablecoin_prices": getStablecoinPricesHandler,
|
|
445
|
+
// Yields
|
|
446
|
+
"defillama_get_pools": getPoolsHandler,
|
|
447
|
+
"defillama_get_pool_chart": getPoolChartHandler,
|
|
448
|
+
// DEX / Options
|
|
449
|
+
"defillama_get_dexs_overview": getDexsOverviewHandler,
|
|
450
|
+
"defillama_get_dexs_overview_by_chain": getDexsOverviewByChainHandler,
|
|
451
|
+
"defillama_get_dex_summary": getDexSummaryHandler,
|
|
452
|
+
"defillama_get_options_overview": getOptionsOverviewHandler,
|
|
453
|
+
"defillama_get_options_overview_by_chain": getOptionsOverviewByChainHandler,
|
|
454
|
+
"defillama_get_option_summary": getOptionSummaryHandler,
|
|
455
|
+
// Perps
|
|
456
|
+
"defillama_get_open_interest_overview": getOpenInterestOverviewHandler,
|
|
457
|
+
// Fees / Revenue
|
|
458
|
+
"defillama_get_fees_overview": getFeesOverviewHandler,
|
|
459
|
+
"defillama_get_fees_overview_by_chain": getFeesOverviewByChainHandler,
|
|
460
|
+
"defillama_get_fee_summary": getFeeSummaryHandler
|
|
92
461
|
};
|
|
93
462
|
//# sourceMappingURL=tools.js.map
|
package/dist/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.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;IACvD,QAAQ;IACR,sCAAsC,EAAE,8BAA8B;IACtE,iBAAiB;IACjB,6BAA6B,EAAE,sBAAsB;IACrD,sCAAsC,EAAE,6BAA6B;IACrE,2BAA2B,EAAE,oBAAoB;CAClD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@missionsquad/mcp-defillama",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "MCP server for the DefiLlama API — exposes DeFi protocol TVL, chain TVL, token prices, and stablecoin data to MCP clients",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"build": "tsc && chmod +x dist/index.js",
|
|
21
21
|
"start": "node dist/index.js",
|
|
22
22
|
"dev": "tsc -w",
|
|
23
|
-
"test": "yarn build && env TEST_MODE=true node tests
|
|
24
|
-
"test:no-mock": "yarn build && env TEST_MODE=false node tests
|
|
23
|
+
"test": "yarn build && env TEST_MODE=true node --test tests/*.test.js",
|
|
24
|
+
"test:no-mock": "yarn build && env TEST_MODE=false node --test tests/*.test.js",
|
|
25
25
|
"prepare": "yarn build"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
@@ -45,9 +45,11 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@modelcontextprotocol/sdk": "^1.6.1",
|
|
48
|
+
"luxon": "^3.7.2",
|
|
48
49
|
"zod": "^4.0.0"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
52
|
+
"@types/luxon": "^3.7.1",
|
|
51
53
|
"@types/node": "^20.0.0",
|
|
52
54
|
"typescript": "^5.0.0"
|
|
53
55
|
}
|