@defipipe/mcp 0.1.1 → 0.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/dist/server.js +11 -9
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -7,7 +7,7 @@ import { z } from "zod";
|
|
|
7
7
|
const API = process.env.DEFIPIPE_API_URL ?? "https://api.defipipe.io";
|
|
8
8
|
const SITE = process.env.DEFIPIPE_SITE_URL ?? "https://defipipe.io";
|
|
9
9
|
const KEY = process.env.DEFIPIPE_API_KEY;
|
|
10
|
-
const VERSION = "0.
|
|
10
|
+
const VERSION = "0.2.0";
|
|
11
11
|
function headers() {
|
|
12
12
|
return KEY ? { authorization: `Bearer ${KEY}` } : {};
|
|
13
13
|
}
|
|
@@ -93,14 +93,16 @@ export function buildServer() {
|
|
|
93
93
|
});
|
|
94
94
|
server.registerTool("get_aligned", {
|
|
95
95
|
title: "Query aligned time series",
|
|
96
|
-
description: "Resample up to 10 series onto one shared UTC time axis (GET /v1/aligned).
|
|
97
|
-
"
|
|
98
|
-
"
|
|
96
|
+
description: "Resample up to 10 series onto one shared UTC time axis (GET /v1/aligned). Timeframe " +
|
|
97
|
+
"and granularity are explicit: pick from/to and a freq from the ladder; freq=block " +
|
|
98
|
+
"returns one row per sampled block (max ~16h per request, API key required). Each " +
|
|
99
|
+
"value is the last observation at or before the boundary: no interpolation, no " +
|
|
100
|
+
"lookahead, safe for backtests. Free tier: 5m and coarser, trailing 90 days.",
|
|
99
101
|
inputSchema: {
|
|
100
102
|
series: z.array(z.string()).min(1).max(10).describe("Canonical series IDs (from search_datasets)"),
|
|
101
|
-
freq: z.enum(["1m", "5m", "15m", "1h", "4h", "1d", "7d"]).
|
|
102
|
-
from: z.string().
|
|
103
|
-
to: z.string().
|
|
103
|
+
freq: z.enum(["block", "1m", "5m", "15m", "1h", "4h", "1d", "7d"]).describe("Granularity. block and 1m require an API key."),
|
|
104
|
+
from: z.string().describe("ISO 8601 start of the timeframe, e.g. 2026-07-07"),
|
|
105
|
+
to: z.string().describe("ISO 8601 end of the timeframe, e.g. 2026-07-12"),
|
|
104
106
|
},
|
|
105
107
|
}, async ({ series, freq, from, to }) => {
|
|
106
108
|
const p = new URLSearchParams({ series: series.join(",") });
|
|
@@ -120,8 +122,8 @@ export function buildServer() {
|
|
|
120
122
|
"Paginate by passing the response's next_after_block as after_block.",
|
|
121
123
|
inputSchema: {
|
|
122
124
|
id: z.string().describe("Canonical series ID"),
|
|
123
|
-
from: z.string().
|
|
124
|
-
to: z.string().
|
|
125
|
+
from: z.string().describe("ISO 8601 start of the timeframe, e.g. 2026-07-11"),
|
|
126
|
+
to: z.string().describe("ISO 8601 end of the timeframe, e.g. 2026-07-12"),
|
|
125
127
|
after_block: z.number().int().optional().describe("Pagination cursor: only rows with a strictly greater block number"),
|
|
126
128
|
limit: z.number().int().min(1).max(10000).optional().describe("Rows per page, default 1,000"),
|
|
127
129
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@defipipe/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "MCP server for defipipe: historical, point-in-time DeFi contract state per block. Search datasets, query aligned time series and raw per-block rows.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|