datasieve-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/README.md +51 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +213 -0
- package/dist/main.js.map +1 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# datasieve-mcp
|
|
2
|
+
|
|
3
|
+
MCP server for [DataSieve](https://api.datasieve.xyz) — standing watches for AI
|
|
4
|
+
agents, paid over x402. On-chain conditions on Base (wallet activity, whale
|
|
5
|
+
transfers, price crossings, new pools) and **dead-man switches for your own
|
|
6
|
+
agents** (your agent pings a URL; silence fires the alert). No account, no API
|
|
7
|
+
key: one gasless USDC payment per watch, signed locally — your key never leaves
|
|
8
|
+
your machine.
|
|
9
|
+
|
|
10
|
+
## Setup
|
|
11
|
+
|
|
12
|
+
Claude Code:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
claude mcp add datasieve -e DATASIEVE_PRIVATE_KEY=0x... -- npx -y datasieve-mcp
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Any MCP client (JSON config):
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"datasieve": {
|
|
24
|
+
"command": "npx",
|
|
25
|
+
"args": ["-y", "datasieve-mcp"],
|
|
26
|
+
"env": { "DATASIEVE_PRIVATE_KEY": "0x..." }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The key needs USDC on Base (payments are gasless EIP-3009 transfers — no ETH
|
|
33
|
+
required). Try everything free first against the sandbox:
|
|
34
|
+
`DATASIEVE_API_URL=https://staging.datasieve.xyz` with Base Sepolia faucet USDC
|
|
35
|
+
([faucet.circle.com](https://faucet.circle.com)).
|
|
36
|
+
|
|
37
|
+
## Tools
|
|
38
|
+
|
|
39
|
+
| tool | cost | what |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| `create_watch` | $0.50 (standard) / $1.00 (composite, ≤5 conditions) per 7 days | buy a watch; returns id, secret, ping URLs |
|
|
42
|
+
| `watch_status` | free | heartbeat, triggers, expiry, up/down per dead-man switch |
|
|
43
|
+
| `drain_events` | free | collect everything caught while you weren't running |
|
|
44
|
+
| `renew_watch` | tier price | +7 days, trigger budget reset |
|
|
45
|
+
| `ping_heartbeat` | free | keep your dead-man switch alive |
|
|
46
|
+
| `delete_watch` | free | cancel |
|
|
47
|
+
| `service_health` | free | verify our scanner is alive before you pay |
|
|
48
|
+
|
|
49
|
+
Watch ids and secrets are remembered in `~/.datasieve/watches.json` (mode 600),
|
|
50
|
+
so follow-up calls only need the watch id — the persistent memory your
|
|
51
|
+
ephemeral agent lacks.
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":""}
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* DataSieve MCP server — buy standing watches (on-chain conditions on Base,
|
|
4
|
+
* or dead-man switches for your own agents) over x402, from any MCP client.
|
|
5
|
+
*
|
|
6
|
+
* Config (env):
|
|
7
|
+
* DATASIEVE_PRIVATE_KEY 0x… EVM key holding USDC on Base (payments are
|
|
8
|
+
* gasless EIP-3009 transfers; the key never leaves
|
|
9
|
+
* this process). Omit to use only the free tools.
|
|
10
|
+
* DATASIEVE_API_URL default https://api.datasieve.xyz
|
|
11
|
+
* (sandbox: https://staging.datasieve.xyz, faucet USDC)
|
|
12
|
+
* DATASIEVE_STATE_FILE default ~/.datasieve/watches.json — remembers watch
|
|
13
|
+
* secrets so later tool calls don't need them.
|
|
14
|
+
*/
|
|
15
|
+
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
16
|
+
import { homedir } from 'node:os';
|
|
17
|
+
import { dirname, join } from 'node:path';
|
|
18
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
19
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
20
|
+
import { z } from 'zod';
|
|
21
|
+
const API = (process.env.DATASIEVE_API_URL ?? 'https://api.datasieve.xyz').replace(/\/$/, '');
|
|
22
|
+
const STATE_FILE = process.env.DATASIEVE_STATE_FILE ?? join(homedir(), '.datasieve', 'watches.json');
|
|
23
|
+
function loadState() {
|
|
24
|
+
try {
|
|
25
|
+
return JSON.parse(readFileSync(STATE_FILE, 'utf8'));
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function saveState(state) {
|
|
32
|
+
mkdirSync(dirname(STATE_FILE), { recursive: true });
|
|
33
|
+
writeFileSync(STATE_FILE, JSON.stringify(state, null, 2), { mode: 0o600 });
|
|
34
|
+
}
|
|
35
|
+
function rememberWatch(id, memo) {
|
|
36
|
+
const s = loadState();
|
|
37
|
+
s[id] = memo;
|
|
38
|
+
saveState(s);
|
|
39
|
+
}
|
|
40
|
+
function secretFor(id, provided) {
|
|
41
|
+
return provided ?? loadState()[id]?.secret;
|
|
42
|
+
}
|
|
43
|
+
// ---- x402-paying fetch (lazy: free tools work with no key) -------------------
|
|
44
|
+
let payFetchPromise = null;
|
|
45
|
+
function payFetch() {
|
|
46
|
+
if (!payFetchPromise) {
|
|
47
|
+
payFetchPromise = (async () => {
|
|
48
|
+
const key = process.env.DATASIEVE_PRIVATE_KEY;
|
|
49
|
+
if (!key || !/^0x[0-9a-fA-F]{64}$/.test(key)) {
|
|
50
|
+
throw new Error('DATASIEVE_PRIVATE_KEY is not set (0x… key holding USDC on Base). Free tools still work; paid tools need it.');
|
|
51
|
+
}
|
|
52
|
+
const [{ privateKeyToAccount }, { wrapFetchWithPayment, x402Client }, { ExactEvmScheme }] = await Promise.all([
|
|
53
|
+
import('viem/accounts'),
|
|
54
|
+
import('@x402/fetch'),
|
|
55
|
+
import('@x402/evm/exact/client'),
|
|
56
|
+
]);
|
|
57
|
+
const account = privateKeyToAccount(key);
|
|
58
|
+
const scheme = new ExactEvmScheme(account);
|
|
59
|
+
// Register mainnet and Sepolia: the wrapper pays whichever the server asks for.
|
|
60
|
+
const client = new x402Client()
|
|
61
|
+
.register('eip155:8453', scheme)
|
|
62
|
+
.register('eip155:84532', scheme);
|
|
63
|
+
return wrapFetchWithPayment(fetch, client);
|
|
64
|
+
})();
|
|
65
|
+
payFetchPromise.catch(() => (payFetchPromise = null));
|
|
66
|
+
}
|
|
67
|
+
return payFetchPromise;
|
|
68
|
+
}
|
|
69
|
+
// ---- helpers ------------------------------------------------------------------
|
|
70
|
+
function ok(data) {
|
|
71
|
+
return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
|
|
72
|
+
}
|
|
73
|
+
function fail(message) {
|
|
74
|
+
return { content: [{ type: 'text', text: `ERROR: ${message}` }], isError: true };
|
|
75
|
+
}
|
|
76
|
+
async function json(res) {
|
|
77
|
+
return (await res.json().catch(() => ({})));
|
|
78
|
+
}
|
|
79
|
+
const conditionShape = z
|
|
80
|
+
.object({
|
|
81
|
+
type: z.enum(['wallet-activity', 'token-transfers', 'price-cross', 'new-pairs', 'heartbeat']),
|
|
82
|
+
})
|
|
83
|
+
.passthrough()
|
|
84
|
+
.describe('One condition. Shapes: {type:"wallet-activity",address,direction?,minEth?} | ' +
|
|
85
|
+
'{type:"token-transfers",token,minAmount} | {type:"price-cross",pool,direction,threshold} | ' +
|
|
86
|
+
'{type:"new-pairs",minQuoteLiquidity?} | {type:"heartbeat",intervalSeconds,graceSeconds?,label?} ' +
|
|
87
|
+
'(heartbeat = dead-man switch: you get a pingUrl; silence past interval+grace fires the alert)');
|
|
88
|
+
// ---- server ---------------------------------------------------------------------
|
|
89
|
+
const server = new McpServer({ name: 'datasieve', version: '0.1.0' });
|
|
90
|
+
server.registerTool('create_watch', {
|
|
91
|
+
title: 'Create a watch (paid via x402)',
|
|
92
|
+
description: `Buy a standing watch from DataSieve (${API}). standard = $0.50/7d, 1 condition, 50 triggers; ` +
|
|
93
|
+
'composite = $1.00/7d, up to 5 any-match conditions (e.g. 5 heartbeat dead-man switches), 200 triggers. ' +
|
|
94
|
+
'Payment is a gasless USDC transfer signed locally. Events go to your webhookUrl (HMAC-signed) if set, ' +
|
|
95
|
+
'and always to a server-side mailbox drained with drain_events. The watch id + secret are remembered ' +
|
|
96
|
+
'locally so later calls need only the id.',
|
|
97
|
+
inputSchema: {
|
|
98
|
+
tier: z.enum(['standard', 'composite']).default('standard'),
|
|
99
|
+
conditions: z.array(conditionShape).min(1).max(5),
|
|
100
|
+
webhookUrl: z.string().url().optional(),
|
|
101
|
+
},
|
|
102
|
+
}, async ({ tier, conditions, webhookUrl }) => {
|
|
103
|
+
try {
|
|
104
|
+
const fetchPay = await payFetch();
|
|
105
|
+
const body = tier === 'standard'
|
|
106
|
+
? { condition: conditions[0], ...(webhookUrl ? { webhookUrl } : {}) }
|
|
107
|
+
: { conditions, ...(webhookUrl ? { webhookUrl } : {}) };
|
|
108
|
+
const res = await fetchPay(`${API}/watch/${tier}`, {
|
|
109
|
+
method: 'POST',
|
|
110
|
+
headers: { 'content-type': 'application/json' },
|
|
111
|
+
body: JSON.stringify(body),
|
|
112
|
+
});
|
|
113
|
+
const data = await json(res);
|
|
114
|
+
if (res.status !== 201)
|
|
115
|
+
return fail(`create failed (HTTP ${res.status}): ${JSON.stringify(data)}`);
|
|
116
|
+
const heartbeats = data.heartbeats ?? [];
|
|
117
|
+
rememberWatch(String(data.id), {
|
|
118
|
+
secret: String(data.secret),
|
|
119
|
+
tier,
|
|
120
|
+
pingUrls: heartbeats.map((h) => h.pingUrl).filter((u) => !!u),
|
|
121
|
+
});
|
|
122
|
+
return ok(data);
|
|
123
|
+
}
|
|
124
|
+
catch (err) {
|
|
125
|
+
return fail(err instanceof Error ? err.message : String(err));
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
server.registerTool('watch_status', {
|
|
129
|
+
title: 'Watch status (free)',
|
|
130
|
+
description: 'State, heartbeat lastCheckedAt, triggersUsed/cap, expiry, delivery stats, and for dead-man ' +
|
|
131
|
+
'switches: up/down, lastPingAt, nextDeadline, pingUrl. Secret is looked up from local state if omitted.',
|
|
132
|
+
inputSchema: { watchId: z.string(), secret: z.string().optional() },
|
|
133
|
+
}, async ({ watchId, secret }) => {
|
|
134
|
+
const s = secretFor(watchId, secret);
|
|
135
|
+
if (!s)
|
|
136
|
+
return fail(`no secret known for ${watchId}; pass it explicitly`);
|
|
137
|
+
const res = await fetch(`${API}/watch/${watchId}`, { headers: { authorization: `Bearer ${s}` } });
|
|
138
|
+
const data = await json(res);
|
|
139
|
+
return res.ok ? ok(data) : fail(`HTTP ${res.status}: ${JSON.stringify(data)}`);
|
|
140
|
+
});
|
|
141
|
+
server.registerTool('drain_events', {
|
|
142
|
+
title: 'Drain held events (free)',
|
|
143
|
+
description: 'Collect everything the watch caught — works with zero infrastructure (the mailbox pattern). ' +
|
|
144
|
+
'Pass `since` = last seen event id for incremental drains.',
|
|
145
|
+
inputSchema: { watchId: z.string(), since: z.string().optional(), secret: z.string().optional() },
|
|
146
|
+
}, async ({ watchId, since, secret }) => {
|
|
147
|
+
const s = secretFor(watchId, secret);
|
|
148
|
+
if (!s)
|
|
149
|
+
return fail(`no secret known for ${watchId}; pass it explicitly`);
|
|
150
|
+
const q = since ? `?since=${encodeURIComponent(since)}` : '';
|
|
151
|
+
const res = await fetch(`${API}/watch/${watchId}/events${q}`, {
|
|
152
|
+
headers: { authorization: `Bearer ${s}` },
|
|
153
|
+
});
|
|
154
|
+
const data = await json(res);
|
|
155
|
+
return res.ok ? ok(data) : fail(`HTTP ${res.status}: ${JSON.stringify(data)}`);
|
|
156
|
+
});
|
|
157
|
+
server.registerTool('renew_watch', {
|
|
158
|
+
title: 'Renew a watch (paid via x402)',
|
|
159
|
+
description: 'Extends the watch 7 more days at its tier price and resets the trigger budget.',
|
|
160
|
+
inputSchema: { watchId: z.string(), tier: z.enum(['standard', 'composite']).optional() },
|
|
161
|
+
}, async ({ watchId, tier }) => {
|
|
162
|
+
try {
|
|
163
|
+
const t = tier ?? loadState()[watchId]?.tier ?? 'standard';
|
|
164
|
+
const fetchPay = await payFetch();
|
|
165
|
+
const res = await fetchPay(`${API}/watch/${t}`, {
|
|
166
|
+
method: 'POST',
|
|
167
|
+
headers: { 'content-type': 'application/json' },
|
|
168
|
+
body: JSON.stringify({ renew: watchId }),
|
|
169
|
+
});
|
|
170
|
+
const data = await json(res);
|
|
171
|
+
return res.ok ? ok(data) : fail(`HTTP ${res.status}: ${JSON.stringify(data)}`);
|
|
172
|
+
}
|
|
173
|
+
catch (err) {
|
|
174
|
+
return fail(err instanceof Error ? err.message : String(err));
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
server.registerTool('delete_watch', {
|
|
178
|
+
title: 'Cancel a watch (free, no refund)',
|
|
179
|
+
inputSchema: { watchId: z.string(), secret: z.string().optional() },
|
|
180
|
+
}, async ({ watchId, secret }) => {
|
|
181
|
+
const s = secretFor(watchId, secret);
|
|
182
|
+
if (!s)
|
|
183
|
+
return fail(`no secret known for ${watchId}; pass it explicitly`);
|
|
184
|
+
const res = await fetch(`${API}/watch/${watchId}`, {
|
|
185
|
+
method: 'DELETE',
|
|
186
|
+
headers: { authorization: `Bearer ${s}` },
|
|
187
|
+
});
|
|
188
|
+
const data = await json(res);
|
|
189
|
+
return res.ok ? ok(data) : fail(`HTTP ${res.status}: ${JSON.stringify(data)}`);
|
|
190
|
+
});
|
|
191
|
+
server.registerTool('ping_heartbeat', {
|
|
192
|
+
title: 'Heartbeat check-in (free)',
|
|
193
|
+
description: 'Keep a dead-man switch alive. Pass the pingUrl from create_watch (or a watchId whose ping ' +
|
|
194
|
+
'URLs are in local state). Call this at least once per intervalSeconds.',
|
|
195
|
+
inputSchema: { pingUrl: z.string().optional(), watchId: z.string().optional() },
|
|
196
|
+
}, async ({ pingUrl, watchId }) => {
|
|
197
|
+
const urls = pingUrl ? [pingUrl] : (watchId && loadState()[watchId]?.pingUrls) || [];
|
|
198
|
+
if (urls.length === 0)
|
|
199
|
+
return fail('pass pingUrl, or a watchId with known ping URLs');
|
|
200
|
+
const results = await Promise.all(urls.map(async (u) => ({ url: u, ...(await json(await fetch(u, { method: 'POST' }))) })));
|
|
201
|
+
return ok(results.length === 1 ? results[0] : results);
|
|
202
|
+
});
|
|
203
|
+
server.registerTool('service_health', {
|
|
204
|
+
title: 'DataSieve service heartbeat (free, public)',
|
|
205
|
+
description: 'Scanner cursor lag vs chain head — verify the watcher is alive before you buy.',
|
|
206
|
+
inputSchema: {},
|
|
207
|
+
}, async () => {
|
|
208
|
+
const res = await fetch(`${API}/health`);
|
|
209
|
+
return ok(await json(res));
|
|
210
|
+
});
|
|
211
|
+
const transport = new StdioServerTransport();
|
|
212
|
+
await server.connect(transport);
|
|
213
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,2BAA2B,CAAC,CAAC,OAA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,MAAM,KAAK,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CACzF,CAAC;IACF,OAAO,EAAE,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AACzD,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB;IACE,KAAK,EAAE,4CAA4C;IACnD,WAAW,EAAE,gFAAgF;IAC7F,WAAW,EAAE,EAAE;CAChB,EACD,KAAK,IAAI,EAAE;IACT,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC;IACzC,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC,CACF,CAAC;AAEF,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "datasieve-mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for DataSieve — buy on-chain watches and dead-man switches for your agent over x402. No account; your wallet key stays on your machine.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "github:gitwormq/datasieve",
|
|
7
|
+
"homepage": "https://api.datasieve.xyz",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"bin": {
|
|
10
|
+
"datasieve-mcp": "./dist/main.js"
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/main.js",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc -p tsconfig.json",
|
|
19
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
20
|
+
"dev": "tsx src/main.ts",
|
|
21
|
+
"prepublishOnly": "pnpm build"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"mcp",
|
|
25
|
+
"x402",
|
|
26
|
+
"agents",
|
|
27
|
+
"monitoring",
|
|
28
|
+
"webhooks",
|
|
29
|
+
"dead-man-switch",
|
|
30
|
+
"base"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
34
|
+
"@x402/core": "2.18.0",
|
|
35
|
+
"@x402/evm": "2.18.0",
|
|
36
|
+
"@x402/fetch": "2.18.0",
|
|
37
|
+
"viem": "2.55.0",
|
|
38
|
+
"zod": "^3.25.0"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/node": "^22.13.0"
|
|
42
|
+
}
|
|
43
|
+
}
|