@zerodust/mcp-server 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 +78 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +326 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# @zerodust/mcp-server
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) server for [ZeroDust](https://zerodust.xyz) - sweep native gas tokens to exactly zero.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @zerodust/mcp-server
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or run directly with npx:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @zerodust/mcp-server
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Configuration
|
|
18
|
+
|
|
19
|
+
### Claude Desktop
|
|
20
|
+
|
|
21
|
+
Add to your `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"zerodust": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["@zerodust/mcp-server"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Claude Code
|
|
35
|
+
|
|
36
|
+
Add to your `.claude/settings.json`:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"mcpServers": {
|
|
41
|
+
"zerodust": {
|
|
42
|
+
"command": "npx",
|
|
43
|
+
"args": ["@zerodust/mcp-server"]
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Environment Variables
|
|
50
|
+
|
|
51
|
+
| Variable | Description | Default |
|
|
52
|
+
|----------|-------------|---------|
|
|
53
|
+
| `ZERODUST_API_URL` | Custom API URL | `https://api.zerodust.xyz` |
|
|
54
|
+
| `ZERODUST_API_KEY` | API key for higher rate limits | - |
|
|
55
|
+
|
|
56
|
+
## Available Tools
|
|
57
|
+
|
|
58
|
+
| Tool | Description |
|
|
59
|
+
|------|-------------|
|
|
60
|
+
| `zerodust_info` | Get information about ZeroDust service and fees |
|
|
61
|
+
| `zerodust_get_chains` | List all supported blockchain chains |
|
|
62
|
+
| `zerodust_get_balances` | Check native token balances across all chains |
|
|
63
|
+
| `zerodust_get_quote` | Get a quote for sweeping a chain |
|
|
64
|
+
| `zerodust_get_sweep_status` | Check status of a submitted sweep |
|
|
65
|
+
| `zerodust_list_sweeps` | List past sweeps for an address |
|
|
66
|
+
|
|
67
|
+
## Example Prompts
|
|
68
|
+
|
|
69
|
+
Once configured, you can ask Claude:
|
|
70
|
+
|
|
71
|
+
- "What chains does ZeroDust support?"
|
|
72
|
+
- "Check my balances on 0x1234..."
|
|
73
|
+
- "Get a quote to sweep my Arbitrum ETH to Base"
|
|
74
|
+
- "What's the status of my sweep?"
|
|
75
|
+
|
|
76
|
+
## License
|
|
77
|
+
|
|
78
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview ZeroDust MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Model Context Protocol server that exposes ZeroDust tools for AI agents.
|
|
6
|
+
* Uses stdio transport for integration with Claude Desktop, Claude Code,
|
|
7
|
+
* and other MCP-compatible clients.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* npx @zerodust/mcp-server
|
|
11
|
+
*
|
|
12
|
+
* Configuration via environment variables:
|
|
13
|
+
* ZERODUST_API_URL - Custom API URL (default: https://api.zerodust.xyz)
|
|
14
|
+
* ZERODUST_API_KEY - Optional API key for higher rate limits
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;GAaG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview ZeroDust MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Model Context Protocol server that exposes ZeroDust tools for AI agents.
|
|
6
|
+
* Uses stdio transport for integration with Claude Desktop, Claude Code,
|
|
7
|
+
* and other MCP-compatible clients.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* npx @zerodust/mcp-server
|
|
11
|
+
*
|
|
12
|
+
* Configuration via environment variables:
|
|
13
|
+
* ZERODUST_API_URL - Custom API URL (default: https://api.zerodust.xyz)
|
|
14
|
+
* ZERODUST_API_KEY - Optional API key for higher rate limits
|
|
15
|
+
*/
|
|
16
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
17
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
18
|
+
import { z } from "zod";
|
|
19
|
+
const API_BASE = process.env.ZERODUST_API_URL || "https://api.zerodust.xyz";
|
|
20
|
+
const API_KEY = process.env.ZERODUST_API_KEY;
|
|
21
|
+
const server = new McpServer({
|
|
22
|
+
name: "zerodust",
|
|
23
|
+
version: "0.1.0",
|
|
24
|
+
});
|
|
25
|
+
// Helper to make API requests
|
|
26
|
+
async function apiRequest(path, options = {}) {
|
|
27
|
+
const headers = {
|
|
28
|
+
"Content-Type": "application/json",
|
|
29
|
+
"User-Agent": "zerodust-mcp-server/0.1.0",
|
|
30
|
+
};
|
|
31
|
+
if (API_KEY) {
|
|
32
|
+
headers["x-api-key"] = API_KEY;
|
|
33
|
+
}
|
|
34
|
+
const response = await fetch(`${API_BASE}${path}`, {
|
|
35
|
+
method: options.method || "GET",
|
|
36
|
+
headers,
|
|
37
|
+
body: options.body ? JSON.stringify(options.body) : undefined,
|
|
38
|
+
});
|
|
39
|
+
if (!response.ok) {
|
|
40
|
+
const error = await response.json().catch(() => ({ error: response.statusText }));
|
|
41
|
+
throw new Error(`ZeroDust API error (${response.status}): ${error.error || response.statusText}`);
|
|
42
|
+
}
|
|
43
|
+
return response.json();
|
|
44
|
+
}
|
|
45
|
+
// ============ Tool: Get Supported Chains ============
|
|
46
|
+
server.registerTool("zerodust_get_chains", {
|
|
47
|
+
description: "Get a list of all blockchain chains supported by ZeroDust for sweeping native gas tokens. Returns chain IDs, names, native tokens, and contract addresses.",
|
|
48
|
+
inputSchema: {},
|
|
49
|
+
}, async () => {
|
|
50
|
+
try {
|
|
51
|
+
const data = await apiRequest("/chains");
|
|
52
|
+
const enabledChains = data.chains.filter((c) => c.enabled);
|
|
53
|
+
const text = enabledChains
|
|
54
|
+
.map((c) => `${c.name} (chainId: ${c.chainId}) - ${c.nativeToken}`)
|
|
55
|
+
.join("\n");
|
|
56
|
+
return {
|
|
57
|
+
content: [
|
|
58
|
+
{
|
|
59
|
+
type: "text",
|
|
60
|
+
text: `Supported chains (${enabledChains.length}):\n${text}`,
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
return {
|
|
67
|
+
content: [
|
|
68
|
+
{
|
|
69
|
+
type: "text",
|
|
70
|
+
text: `Error fetching chains: ${error instanceof Error ? error.message : String(error)}`,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
isError: true,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
// ============ Tool: Get Balances ============
|
|
78
|
+
server.registerTool("zerodust_get_balances", {
|
|
79
|
+
description: "Check native gas token balances across all supported chains for a wallet address. Shows which chains have sweepable balances and their USD values.",
|
|
80
|
+
inputSchema: {
|
|
81
|
+
address: z
|
|
82
|
+
.string()
|
|
83
|
+
.regex(/^0x[a-fA-F0-9]{40}$/)
|
|
84
|
+
.describe("Ethereum wallet address (0x...)"),
|
|
85
|
+
},
|
|
86
|
+
}, async ({ address }) => {
|
|
87
|
+
try {
|
|
88
|
+
const data = await apiRequest(`/balances/${address}`);
|
|
89
|
+
const sweepable = data.chains.filter((b) => b.canSweep);
|
|
90
|
+
const nonZero = data.chains.filter((b) => b.balance !== "0" && !b.canSweep);
|
|
91
|
+
let text = "";
|
|
92
|
+
if (sweepable.length > 0) {
|
|
93
|
+
text += `Sweepable balances (${sweepable.length}):\n`;
|
|
94
|
+
text += sweepable
|
|
95
|
+
.map((b) => ` ${b.name}: ${b.balanceFormatted} ${b.nativeToken} (chainId: ${b.chainId})`)
|
|
96
|
+
.join("\n");
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
text += "No sweepable balances found.";
|
|
100
|
+
}
|
|
101
|
+
if (nonZero.length > 0) {
|
|
102
|
+
text += `\n\nToo small to sweep (${nonZero.length}):\n`;
|
|
103
|
+
text += nonZero
|
|
104
|
+
.map((b) => ` ${b.name}: ${b.balanceFormatted} ${b.nativeToken}`)
|
|
105
|
+
.join("\n");
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
content: [{ type: "text", text }],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
return {
|
|
113
|
+
content: [
|
|
114
|
+
{
|
|
115
|
+
type: "text",
|
|
116
|
+
text: `Error fetching balances: ${error instanceof Error ? error.message : String(error)}`,
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
isError: true,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
// ============ Tool: Get Quote ============
|
|
124
|
+
server.registerTool("zerodust_get_quote", {
|
|
125
|
+
description: "Get a quote for sweeping native gas tokens from one chain. Returns the estimated amount the user will receive, fee breakdown, and a quote ID for executing the sweep. Quotes expire in 60 seconds.",
|
|
126
|
+
inputSchema: {
|
|
127
|
+
fromChainId: z.number().int().positive().describe("Source chain ID to sweep from"),
|
|
128
|
+
toChainId: z.number().int().positive().describe("Destination chain ID to receive funds"),
|
|
129
|
+
userAddress: z
|
|
130
|
+
.string()
|
|
131
|
+
.regex(/^0x[a-fA-F0-9]{40}$/)
|
|
132
|
+
.describe("User's wallet address to sweep from"),
|
|
133
|
+
destination: z
|
|
134
|
+
.string()
|
|
135
|
+
.regex(/^0x[a-fA-F0-9]{40}$/)
|
|
136
|
+
.describe("Destination address to receive swept funds"),
|
|
137
|
+
},
|
|
138
|
+
}, async ({ fromChainId, toChainId, userAddress, destination }) => {
|
|
139
|
+
try {
|
|
140
|
+
const data = await apiRequest("/quote", {
|
|
141
|
+
method: "POST",
|
|
142
|
+
body: { fromChainId, toChainId, userAddress, destination },
|
|
143
|
+
});
|
|
144
|
+
const text = [
|
|
145
|
+
`Quote ID: ${data.quoteId}`,
|
|
146
|
+
`Balance: ${data.userBalance} wei`,
|
|
147
|
+
`Estimated receive: ${data.estimatedReceive} wei`,
|
|
148
|
+
`Mode: ${data.mode === 0 ? "Same-chain transfer" : "Cross-chain bridge"}`,
|
|
149
|
+
`Max total fee: ${data.fees.maxTotalFeeWei} wei`,
|
|
150
|
+
`Valid for: ${data.validForSeconds} seconds`,
|
|
151
|
+
"",
|
|
152
|
+
"To execute this sweep, the user must sign the EIP-712 typed data and EIP-7702 authorization using the SDK.",
|
|
153
|
+
].join("\n");
|
|
154
|
+
return {
|
|
155
|
+
content: [{ type: "text", text }],
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
return {
|
|
160
|
+
content: [
|
|
161
|
+
{
|
|
162
|
+
type: "text",
|
|
163
|
+
text: `Error getting quote: ${error instanceof Error ? error.message : String(error)}`,
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
isError: true,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
// ============ Tool: Check Sweep Status ============
|
|
171
|
+
server.registerTool("zerodust_get_sweep_status", {
|
|
172
|
+
description: "Check the status of a previously submitted sweep. Returns the current status (pending, simulating, executing, bridging, completed, failed), transaction hash if available, and error messages if failed.",
|
|
173
|
+
inputSchema: {
|
|
174
|
+
sweepId: z
|
|
175
|
+
.string()
|
|
176
|
+
.uuid()
|
|
177
|
+
.describe("The sweep ID returned from submitting a sweep"),
|
|
178
|
+
},
|
|
179
|
+
}, async ({ sweepId }) => {
|
|
180
|
+
try {
|
|
181
|
+
const data = await apiRequest(`/sweep/${sweepId}/status`);
|
|
182
|
+
const lines = [
|
|
183
|
+
`Sweep ID: ${data.sweepId}`,
|
|
184
|
+
`Status: ${data.status}`,
|
|
185
|
+
`Type: ${data.sweepType}`,
|
|
186
|
+
`From chain: ${data.fromChainId} → To chain: ${data.toChainId}`,
|
|
187
|
+
`Destination: ${data.destination}`,
|
|
188
|
+
];
|
|
189
|
+
if (data.txHash) {
|
|
190
|
+
lines.push(`TX Hash: ${data.txHash}`);
|
|
191
|
+
}
|
|
192
|
+
if (data.bridgeTrackingUrl) {
|
|
193
|
+
lines.push(`Bridge tracking: ${data.bridgeTrackingUrl}`);
|
|
194
|
+
}
|
|
195
|
+
if (data.errorMessage) {
|
|
196
|
+
lines.push(`Error: ${data.errorMessage}`);
|
|
197
|
+
}
|
|
198
|
+
return {
|
|
199
|
+
content: [{ type: "text", text: lines.join("\n") }],
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
return {
|
|
204
|
+
content: [
|
|
205
|
+
{
|
|
206
|
+
type: "text",
|
|
207
|
+
text: `Error checking sweep status: ${error instanceof Error ? error.message : String(error)}`,
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
isError: true,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
// ============ Tool: List Sweeps ============
|
|
215
|
+
server.registerTool("zerodust_list_sweeps", {
|
|
216
|
+
description: "List past sweeps for a wallet address. Shows sweep history with status and amounts.",
|
|
217
|
+
inputSchema: {
|
|
218
|
+
address: z
|
|
219
|
+
.string()
|
|
220
|
+
.regex(/^0x[a-fA-F0-9]{40}$/)
|
|
221
|
+
.describe("Wallet address to list sweeps for"),
|
|
222
|
+
limit: z
|
|
223
|
+
.number()
|
|
224
|
+
.int()
|
|
225
|
+
.min(1)
|
|
226
|
+
.max(100)
|
|
227
|
+
.optional()
|
|
228
|
+
.describe("Maximum number of results (default: 10)"),
|
|
229
|
+
},
|
|
230
|
+
}, async ({ address, limit }) => {
|
|
231
|
+
try {
|
|
232
|
+
const params = new URLSearchParams();
|
|
233
|
+
params.set("limit", String(limit || 10));
|
|
234
|
+
const data = await apiRequest(`/sweeps/${address}?${params}`);
|
|
235
|
+
if (data.sweeps.length === 0) {
|
|
236
|
+
return {
|
|
237
|
+
content: [{ type: "text", text: "No sweeps found for this address." }],
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
const text = data.sweeps
|
|
241
|
+
.map((s) => {
|
|
242
|
+
const lines = [
|
|
243
|
+
`[${s.status}] ${s.fromChainId} → ${s.toChainId} (${s.sweepType})`,
|
|
244
|
+
];
|
|
245
|
+
if (s.amountSent)
|
|
246
|
+
lines.push(` Amount: ${s.amountSent} wei`);
|
|
247
|
+
if (s.txHash)
|
|
248
|
+
lines.push(` TX: ${s.txHash}`);
|
|
249
|
+
lines.push(` Created: ${s.createdAt}`);
|
|
250
|
+
return lines.join("\n");
|
|
251
|
+
})
|
|
252
|
+
.join("\n\n");
|
|
253
|
+
return {
|
|
254
|
+
content: [
|
|
255
|
+
{
|
|
256
|
+
type: "text",
|
|
257
|
+
text: `Sweeps for ${address} (${data.total} total):\n\n${text}`,
|
|
258
|
+
},
|
|
259
|
+
],
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
return {
|
|
264
|
+
content: [
|
|
265
|
+
{
|
|
266
|
+
type: "text",
|
|
267
|
+
text: `Error listing sweeps: ${error instanceof Error ? error.message : String(error)}`,
|
|
268
|
+
},
|
|
269
|
+
],
|
|
270
|
+
isError: true,
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
// ============ Tool: Service Info ============
|
|
275
|
+
server.registerTool("zerodust_info", {
|
|
276
|
+
description: "Get information about ZeroDust service, including what it does, fee structure, and how to use it. Use this tool when the user asks about ZeroDust or needs to understand the service.",
|
|
277
|
+
inputSchema: {},
|
|
278
|
+
}, async () => {
|
|
279
|
+
return {
|
|
280
|
+
content: [
|
|
281
|
+
{
|
|
282
|
+
type: "text",
|
|
283
|
+
text: [
|
|
284
|
+
"ZeroDust - Sweep native gas tokens to exactly zero",
|
|
285
|
+
"",
|
|
286
|
+
"What it does:",
|
|
287
|
+
" ZeroDust sweeps 100% of native gas tokens (ETH, BNB, POL, etc.) from any",
|
|
288
|
+
" supported EVM chain, leaving exactly zero balance. Funds are sent to any",
|
|
289
|
+
" address on the same or a different chain.",
|
|
290
|
+
"",
|
|
291
|
+
"How it works:",
|
|
292
|
+
" 1. User signs an EIP-7702 authorization (delegates their EOA temporarily)",
|
|
293
|
+
" 2. User signs an EIP-712 sweep intent (specifies destination and limits)",
|
|
294
|
+
" 3. ZeroDust's relayer executes the sweep atomically",
|
|
295
|
+
" 4. User's balance goes to exactly zero, funds arrive at destination",
|
|
296
|
+
" 5. Delegation is automatically revoked after sweep",
|
|
297
|
+
"",
|
|
298
|
+
"Fee structure:",
|
|
299
|
+
" - Free tier: No service fee for sweeps under $1",
|
|
300
|
+
" - Standard: 1% service fee (min $0.05, max $0.50)",
|
|
301
|
+
" - Gas costs: Paid by relayer, reimbursed from swept amount",
|
|
302
|
+
" - Users always receive the quoted amount or more",
|
|
303
|
+
"",
|
|
304
|
+
"Supported chains: 25+ EVM chains including Ethereum, Arbitrum, Base,",
|
|
305
|
+
" Optimism, Polygon, BSC, Gnosis, and more.",
|
|
306
|
+
"",
|
|
307
|
+
"Integration:",
|
|
308
|
+
" - SDK: npm install @zerodust/sdk viem",
|
|
309
|
+
" - API: POST /quote, POST /sweep, GET /sweep/:id/status",
|
|
310
|
+
" - MCP: This server (stdio transport)",
|
|
311
|
+
].join("\n"),
|
|
312
|
+
},
|
|
313
|
+
],
|
|
314
|
+
};
|
|
315
|
+
});
|
|
316
|
+
// ============ Start Server ============
|
|
317
|
+
async function main() {
|
|
318
|
+
const transport = new StdioServerTransport();
|
|
319
|
+
await server.connect(transport);
|
|
320
|
+
console.error("ZeroDust MCP Server running on stdio");
|
|
321
|
+
}
|
|
322
|
+
main().catch((error) => {
|
|
323
|
+
console.error("Fatal error:", error);
|
|
324
|
+
process.exit(1);
|
|
325
|
+
});
|
|
326
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;GAaG;AAEH,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,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,0BAA0B,CAAC;AAC5E,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;AAE7C,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;CACjB,CAAC,CAAC;AAEH,8BAA8B;AAC9B,KAAK,UAAU,UAAU,CACvB,IAAY,EACZ,UAA+C,EAAE;IAEjD,MAAM,OAAO,GAA2B;QACtC,cAAc,EAAE,kBAAkB;QAClC,YAAY,EAAE,2BAA2B;KAC1C,CAAC;IACF,IAAI,OAAO,EA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ACT,uLAAuL;IACzL,WAAW,EAAE,EAAE;CAChB,EACD,KAAK,IAAI,EAAE;IACT,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE;oBACJ,oDAAoD;oBACpD,EAAE;oBACF,eAAe;oBACf,4EAA4E;oBAC5E,4EAA4E;oBAC5E,6CAA6C;oBAC7C,EAAE;oBACF,eAAe;oBACf,6EAA6E;oBAC7E,4EAA4E;oBAC5E,uDAAuD;oBACvD,uEAAuE;oBACvE,sDAAsD;oBACtD,EAAE;oBACF,gBAAgB;oBAChB,mDAAmD;oBACnD,qDAAqD;oBACrD,8DAA8D;oBAC9D,oDAAoD;oBACpD,EAAE;oBACF,sEAAsE;oBACtE,6CAA6C;oBAC7C,EAAE;oBACF,cAAc;oBACd,yCAAyC;oBACzC,0DAA0D;oBAC1D,wCAAwC;iBACzC,CAAC,IAAI,CAAC,IAAI,CAAC;aACb;SACF;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,yCAAyC;AAEzC,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;AACxD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zerodust/mcp-server",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for ZeroDust - sweep native gas tokens to zero via AI agents",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"zerodust-mcp": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"dev": "tsc --watch",
|
|
18
|
+
"start": "node dist/index.js",
|
|
19
|
+
"clean": "rm -rf dist",
|
|
20
|
+
"prepublishOnly": "npm run clean && npm run build"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"zerodust",
|
|
24
|
+
"mcp",
|
|
25
|
+
"model-context-protocol",
|
|
26
|
+
"ai-agent",
|
|
27
|
+
"ethereum",
|
|
28
|
+
"eip-7702",
|
|
29
|
+
"sweep",
|
|
30
|
+
"blockchain"
|
|
31
|
+
],
|
|
32
|
+
"author": "",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/zerodustxyz/zerodust.git",
|
|
37
|
+
"directory": "packages/mcp-server"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://zerodust.xyz",
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=18"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@modelcontextprotocol/sdk": "^1.2.0",
|
|
45
|
+
"zod": "^3.22.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/node": "^20.11.0",
|
|
49
|
+
"typescript": "^5.3.3"
|
|
50
|
+
}
|
|
51
|
+
}
|