@terminator-network/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/dist/index.d.ts +1 -0
- package/dist/index.js +486 -0
- package/dist/index.js.map +1 -0
- package/package.json +33 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
#!/usr/bin/env node
|
|
3
|
+
|
|
4
|
+
// src/index.ts
|
|
5
|
+
import { readFileSync } from "fs";
|
|
6
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
8
|
+
import { Terminator } from "@terminator-network/core";
|
|
9
|
+
|
|
10
|
+
// src/tools/identity.ts
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
function registerIdentityTools(server2, terminator2) {
|
|
13
|
+
server2.tool(
|
|
14
|
+
"create_identity",
|
|
15
|
+
{
|
|
16
|
+
description: "Create a new disposable agent identity with a generated persona and selected resources (email, phone, virtual card). Returns the identity details including any provisioned resources.",
|
|
17
|
+
inputSchema: {
|
|
18
|
+
resources: z.array(z.enum(["email", "phone", "card"])).default(["email", "phone", "card"]).describe("Which resources to provision. Defaults to all three."),
|
|
19
|
+
ttl_minutes: z.number().int().positive().optional().describe("Time-to-live in minutes before auto-expiry."),
|
|
20
|
+
spend_limit_cents: z.number().int().positive().optional().describe("Maximum spend in cents for the virtual card."),
|
|
21
|
+
confirm: z.boolean().optional().describe("Set to true to confirm card creation if policy requires approval.")
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
async ({ resources, ttl_minutes, spend_limit_cents, confirm }) => {
|
|
25
|
+
try {
|
|
26
|
+
const identity = await terminator2.createIdentity({
|
|
27
|
+
resources,
|
|
28
|
+
ttlMinutes: ttl_minutes,
|
|
29
|
+
spendLimitCents: spend_limit_cents,
|
|
30
|
+
confirm
|
|
31
|
+
});
|
|
32
|
+
return {
|
|
33
|
+
content: [
|
|
34
|
+
{
|
|
35
|
+
type: "text",
|
|
36
|
+
text: JSON.stringify(
|
|
37
|
+
{
|
|
38
|
+
id: identity.id,
|
|
39
|
+
status: identity.status,
|
|
40
|
+
persona: identity.persona,
|
|
41
|
+
email: identity.email,
|
|
42
|
+
phone: identity.phone,
|
|
43
|
+
cardLastFour: identity.cardLastFour,
|
|
44
|
+
ttlExpiresAt: identity.ttlExpiresAt,
|
|
45
|
+
createdAt: identity.createdAt
|
|
46
|
+
},
|
|
47
|
+
null,
|
|
48
|
+
2
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
};
|
|
53
|
+
} catch (error) {
|
|
54
|
+
return {
|
|
55
|
+
content: [
|
|
56
|
+
{
|
|
57
|
+
type: "text",
|
|
58
|
+
text: `Error creating identity: ${error instanceof Error ? error.message : String(error)}`
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
isError: true
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
server2.tool(
|
|
67
|
+
"get_identity",
|
|
68
|
+
{
|
|
69
|
+
description: "Get details of a specific agent identity by ID.",
|
|
70
|
+
inputSchema: {
|
|
71
|
+
identity_id: z.string().describe("The identity ID to look up.")
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
async ({ identity_id }) => {
|
|
75
|
+
try {
|
|
76
|
+
const identity = terminator2.getIdentity(identity_id);
|
|
77
|
+
if (!identity) {
|
|
78
|
+
return {
|
|
79
|
+
content: [{ type: "text", text: `Identity not found: ${identity_id}` }],
|
|
80
|
+
isError: true
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
content: [{ type: "text", text: JSON.stringify(identity, null, 2) }]
|
|
85
|
+
};
|
|
86
|
+
} catch (error) {
|
|
87
|
+
return {
|
|
88
|
+
content: [
|
|
89
|
+
{
|
|
90
|
+
type: "text",
|
|
91
|
+
text: `Error: ${error instanceof Error ? error.message : String(error)}`
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
isError: true
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
server2.tool(
|
|
100
|
+
"list_identities",
|
|
101
|
+
{
|
|
102
|
+
description: "List all agent identities, optionally filtered by status.",
|
|
103
|
+
inputSchema: {
|
|
104
|
+
status: z.enum(["active", "killed", "all"]).default("all").describe("Filter by status. Defaults to all.")
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
async ({ status }) => {
|
|
108
|
+
try {
|
|
109
|
+
const identities = terminator2.listIdentities(status);
|
|
110
|
+
const summary = identities.map((i) => ({
|
|
111
|
+
id: i.id,
|
|
112
|
+
name: i.persona.fullName,
|
|
113
|
+
status: i.status,
|
|
114
|
+
email: i.email,
|
|
115
|
+
phone: i.phone,
|
|
116
|
+
cardLastFour: i.cardLastFour,
|
|
117
|
+
createdAt: i.createdAt
|
|
118
|
+
}));
|
|
119
|
+
return {
|
|
120
|
+
content: [{ type: "text", text: JSON.stringify(summary, null, 2) }]
|
|
121
|
+
};
|
|
122
|
+
} catch (error) {
|
|
123
|
+
return {
|
|
124
|
+
content: [
|
|
125
|
+
{
|
|
126
|
+
type: "text",
|
|
127
|
+
text: `Error: ${error instanceof Error ? error.message : String(error)}`
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
isError: true
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// src/tools/messages.ts
|
|
138
|
+
import { z as z2 } from "zod";
|
|
139
|
+
function registerMessageTools(server2, terminator2) {
|
|
140
|
+
server2.tool(
|
|
141
|
+
"read_messages",
|
|
142
|
+
{
|
|
143
|
+
description: "Read emails and SMS messages received by an identity. Returns all messages or only those since a given timestamp.",
|
|
144
|
+
inputSchema: {
|
|
145
|
+
identity_id: z2.string().describe("The identity ID to read messages for."),
|
|
146
|
+
since: z2.string().optional().describe("ISO 8601 timestamp. Only return messages after this time.")
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
async ({ identity_id, since }) => {
|
|
150
|
+
try {
|
|
151
|
+
const sinceDate = since ? new Date(since) : void 0;
|
|
152
|
+
const { emails, sms } = await terminator2.readMessages(identity_id, sinceDate);
|
|
153
|
+
return {
|
|
154
|
+
content: [
|
|
155
|
+
{
|
|
156
|
+
type: "text",
|
|
157
|
+
text: JSON.stringify(
|
|
158
|
+
{
|
|
159
|
+
emails: emails.map((e) => ({
|
|
160
|
+
from: e.from,
|
|
161
|
+
subject: e.subject,
|
|
162
|
+
text: e.text,
|
|
163
|
+
receivedAt: e.receivedAt
|
|
164
|
+
})),
|
|
165
|
+
sms: sms.map((s) => ({
|
|
166
|
+
from: s.from,
|
|
167
|
+
body: s.body,
|
|
168
|
+
receivedAt: s.receivedAt
|
|
169
|
+
})),
|
|
170
|
+
totalEmails: emails.length,
|
|
171
|
+
totalSms: sms.length
|
|
172
|
+
},
|
|
173
|
+
null,
|
|
174
|
+
2
|
|
175
|
+
)
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
};
|
|
179
|
+
} catch (error) {
|
|
180
|
+
return {
|
|
181
|
+
content: [
|
|
182
|
+
{
|
|
183
|
+
type: "text",
|
|
184
|
+
text: `Error reading messages: ${error instanceof Error ? error.message : String(error)}`
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
isError: true
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
);
|
|
192
|
+
server2.tool(
|
|
193
|
+
"extract_code",
|
|
194
|
+
{
|
|
195
|
+
description: "Parse the most recent messages for an identity and extract a verification code (OTP, PIN, etc.). Returns the code if found.",
|
|
196
|
+
inputSchema: {
|
|
197
|
+
identity_id: z2.string().describe("The identity ID to extract a code from.")
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
async ({ identity_id }) => {
|
|
201
|
+
try {
|
|
202
|
+
const code = await terminator2.extractCode(identity_id);
|
|
203
|
+
if (code) {
|
|
204
|
+
return {
|
|
205
|
+
content: [
|
|
206
|
+
{
|
|
207
|
+
type: "text",
|
|
208
|
+
text: JSON.stringify({ code, found: true })
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
content: [
|
|
215
|
+
{
|
|
216
|
+
type: "text",
|
|
217
|
+
text: JSON.stringify({
|
|
218
|
+
found: false,
|
|
219
|
+
message: "No verification code found in recent messages."
|
|
220
|
+
})
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
};
|
|
224
|
+
} catch (error) {
|
|
225
|
+
return {
|
|
226
|
+
content: [
|
|
227
|
+
{
|
|
228
|
+
type: "text",
|
|
229
|
+
text: `Error extracting code: ${error instanceof Error ? error.message : String(error)}`
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
isError: true
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// src/tools/card.ts
|
|
240
|
+
import { z as z3 } from "zod";
|
|
241
|
+
function registerCardTools(server2, terminator2) {
|
|
242
|
+
server2.tool(
|
|
243
|
+
"get_card_details",
|
|
244
|
+
{
|
|
245
|
+
description: "Get the full card details (PAN, CVV, expiry) for an identity's virtual card. These details are fetched live from the provider and never stored locally.",
|
|
246
|
+
inputSchema: {
|
|
247
|
+
identity_id: z3.string().describe("The identity ID to get card details for.")
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
async ({ identity_id }) => {
|
|
251
|
+
try {
|
|
252
|
+
const details = await terminator2.getCardDetails(identity_id);
|
|
253
|
+
return {
|
|
254
|
+
content: [
|
|
255
|
+
{
|
|
256
|
+
type: "text",
|
|
257
|
+
text: JSON.stringify(
|
|
258
|
+
{
|
|
259
|
+
pan: details.pan,
|
|
260
|
+
cvv: details.cvv,
|
|
261
|
+
expMonth: details.expMonth,
|
|
262
|
+
expYear: details.expYear,
|
|
263
|
+
lastFour: details.lastFour
|
|
264
|
+
},
|
|
265
|
+
null,
|
|
266
|
+
2
|
|
267
|
+
)
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
};
|
|
271
|
+
} catch (error) {
|
|
272
|
+
return {
|
|
273
|
+
content: [
|
|
274
|
+
{
|
|
275
|
+
type: "text",
|
|
276
|
+
text: `Error getting card details: ${error instanceof Error ? error.message : String(error)}`
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
isError: true
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// src/tools/kill-switch.ts
|
|
287
|
+
import { z as z4 } from "zod";
|
|
288
|
+
function registerKillTools(server2, terminator2) {
|
|
289
|
+
server2.tool(
|
|
290
|
+
"kill_identity",
|
|
291
|
+
{
|
|
292
|
+
description: "Revoke all resources (email, phone, card) for a single identity. The identity is permanently deactivated.",
|
|
293
|
+
inputSchema: {
|
|
294
|
+
identity_id: z4.string().describe("The identity ID to kill.")
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
async ({ identity_id }) => {
|
|
298
|
+
try {
|
|
299
|
+
const result = await terminator2.killIdentity(identity_id);
|
|
300
|
+
return {
|
|
301
|
+
content: [
|
|
302
|
+
{
|
|
303
|
+
type: "text",
|
|
304
|
+
text: JSON.stringify(
|
|
305
|
+
{
|
|
306
|
+
identityId: result.identityId,
|
|
307
|
+
emailRevoked: result.emailRevoked,
|
|
308
|
+
phoneRevoked: result.phoneRevoked,
|
|
309
|
+
cardRevoked: result.cardRevoked,
|
|
310
|
+
errors: result.errors.length > 0 ? result.errors : void 0,
|
|
311
|
+
status: "killed"
|
|
312
|
+
},
|
|
313
|
+
null,
|
|
314
|
+
2
|
|
315
|
+
)
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
};
|
|
319
|
+
} catch (error) {
|
|
320
|
+
return {
|
|
321
|
+
content: [
|
|
322
|
+
{
|
|
323
|
+
type: "text",
|
|
324
|
+
text: `Error killing identity: ${error instanceof Error ? error.message : String(error)}`
|
|
325
|
+
}
|
|
326
|
+
],
|
|
327
|
+
isError: true
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
);
|
|
332
|
+
server2.tool(
|
|
333
|
+
"kill_all",
|
|
334
|
+
{
|
|
335
|
+
description: "Emergency kill switch. Immediately revokes ALL active identities and their resources. This action cannot be undone.",
|
|
336
|
+
inputSchema: {
|
|
337
|
+
confirm: z4.boolean().describe("Must be true to confirm. This kills ALL active identities.")
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
async ({ confirm }) => {
|
|
341
|
+
if (!confirm) {
|
|
342
|
+
return {
|
|
343
|
+
content: [
|
|
344
|
+
{
|
|
345
|
+
type: "text",
|
|
346
|
+
text: "Kill switch not activated. Set confirm to true to proceed."
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
try {
|
|
352
|
+
const results = await terminator2.killAll();
|
|
353
|
+
const summary = {
|
|
354
|
+
totalKilled: results.length,
|
|
355
|
+
results: results.map((r) => ({
|
|
356
|
+
identityId: r.identityId,
|
|
357
|
+
emailRevoked: r.emailRevoked,
|
|
358
|
+
phoneRevoked: r.phoneRevoked,
|
|
359
|
+
cardRevoked: r.cardRevoked,
|
|
360
|
+
errors: r.errors.length > 0 ? r.errors : void 0
|
|
361
|
+
}))
|
|
362
|
+
};
|
|
363
|
+
return {
|
|
364
|
+
content: [{ type: "text", text: JSON.stringify(summary, null, 2) }]
|
|
365
|
+
};
|
|
366
|
+
} catch (error) {
|
|
367
|
+
return {
|
|
368
|
+
content: [
|
|
369
|
+
{
|
|
370
|
+
type: "text",
|
|
371
|
+
text: `Error executing kill switch: ${error instanceof Error ? error.message : String(error)}`
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
isError: true
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// src/tools/status.ts
|
|
382
|
+
import { z as z5 } from "zod";
|
|
383
|
+
function registerStatusTools(server2, terminator2) {
|
|
384
|
+
server2.tool(
|
|
385
|
+
"check_status",
|
|
386
|
+
{
|
|
387
|
+
description: "Health check. Shows which providers are configured and reachable, and how many active identities exist.",
|
|
388
|
+
inputSchema: {}
|
|
389
|
+
},
|
|
390
|
+
async () => {
|
|
391
|
+
try {
|
|
392
|
+
const status = await terminator2.checkStatus();
|
|
393
|
+
return {
|
|
394
|
+
content: [{ type: "text", text: JSON.stringify(status, null, 2) }]
|
|
395
|
+
};
|
|
396
|
+
} catch (error) {
|
|
397
|
+
return {
|
|
398
|
+
content: [
|
|
399
|
+
{
|
|
400
|
+
type: "text",
|
|
401
|
+
text: `Error checking status: ${error instanceof Error ? error.message : String(error)}`
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
isError: true
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
server2.tool(
|
|
410
|
+
"get_activity_log",
|
|
411
|
+
{
|
|
412
|
+
description: "Query the activity log. Shows a chronological record of all actions taken by identities.",
|
|
413
|
+
inputSchema: {
|
|
414
|
+
identity_id: z5.string().optional().describe("Filter by identity ID."),
|
|
415
|
+
event_type: z5.string().optional().describe("Filter by event type (e.g. 'email.received', 'card.created')."),
|
|
416
|
+
limit: z5.number().int().positive().default(20).describe("Max events to return.")
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
async ({ identity_id, event_type, limit }) => {
|
|
420
|
+
try {
|
|
421
|
+
const events = terminator2.getActivityLog({
|
|
422
|
+
identityId: identity_id,
|
|
423
|
+
eventType: event_type,
|
|
424
|
+
limit
|
|
425
|
+
});
|
|
426
|
+
const summary = events.map((e) => ({
|
|
427
|
+
timestamp: e.timestamp,
|
|
428
|
+
event: e.eventType,
|
|
429
|
+
identityId: e.identityId,
|
|
430
|
+
provider: e.provider,
|
|
431
|
+
details: e.details,
|
|
432
|
+
cost: e.costEstimateCents ? `$${(e.costEstimateCents / 100).toFixed(2)}` : void 0
|
|
433
|
+
}));
|
|
434
|
+
return {
|
|
435
|
+
content: [{ type: "text", text: JSON.stringify(summary, null, 2) }]
|
|
436
|
+
};
|
|
437
|
+
} catch (error) {
|
|
438
|
+
return {
|
|
439
|
+
content: [
|
|
440
|
+
{
|
|
441
|
+
type: "text",
|
|
442
|
+
text: `Error querying activity log: ${error instanceof Error ? error.message : String(error)}`
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
isError: true
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// src/index.ts
|
|
453
|
+
if (process.argv.includes("info")) {
|
|
454
|
+
const pkg = JSON.parse(
|
|
455
|
+
readFileSync(new URL("../package.json", import.meta.url), "utf-8")
|
|
456
|
+
);
|
|
457
|
+
console.log(`terminator-mcp-server v${pkg.version}`);
|
|
458
|
+
console.log(`Node.js ${process.version}`);
|
|
459
|
+
console.log(`CF API Token: ${process.env.TERMINATOR_CF_API_TOKEN ? "set" : "MISSING"}`);
|
|
460
|
+
console.log(`Twilio SID: ${process.env.TERMINATOR_TWILIO_ACCOUNT_SID ? "set" : "MISSING"}`);
|
|
461
|
+
console.log(`Lithic Key: ${process.env.TERMINATOR_LITHIC_API_KEY ? "set" : "MISSING"}`);
|
|
462
|
+
process.exit(0);
|
|
463
|
+
}
|
|
464
|
+
var terminator = new Terminator();
|
|
465
|
+
var server = new McpServer({
|
|
466
|
+
name: "terminator",
|
|
467
|
+
version: "0.1.0"
|
|
468
|
+
});
|
|
469
|
+
registerIdentityTools(server, terminator);
|
|
470
|
+
registerMessageTools(server, terminator);
|
|
471
|
+
registerCardTools(server, terminator);
|
|
472
|
+
registerKillTools(server, terminator);
|
|
473
|
+
registerStatusTools(server, terminator);
|
|
474
|
+
var transport = new StdioServerTransport();
|
|
475
|
+
await server.connect(transport);
|
|
476
|
+
process.on("SIGINT", async () => {
|
|
477
|
+
terminator.close();
|
|
478
|
+
await server.close();
|
|
479
|
+
process.exit(0);
|
|
480
|
+
});
|
|
481
|
+
process.on("SIGTERM", async () => {
|
|
482
|
+
terminator.close();
|
|
483
|
+
await server.close();
|
|
484
|
+
process.exit(0);
|
|
485
|
+
});
|
|
486
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/tools/identity.ts","../src/tools/messages.ts","../src/tools/card.ts","../src/tools/kill-switch.ts","../src/tools/status.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { readFileSync } from \"node:fs\";\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { Terminator } from \"@terminator-network/core\";\nimport { registerIdentityTools } from \"./tools/identity.js\";\nimport { registerMessageTools } from \"./tools/messages.js\";\nimport { registerCardTools } from \"./tools/card.js\";\nimport { registerKillTools } from \"./tools/kill-switch.js\";\nimport { registerStatusTools } from \"./tools/status.js\";\n\n// Diagnostics subcommand\nif (process.argv.includes(\"info\")) {\n\tconst pkg = JSON.parse(\n\t\treadFileSync(new URL(\"../package.json\", import.meta.url), \"utf-8\"),\n\t);\n\tconsole.log(`terminator-mcp-server v${pkg.version}`);\n\tconsole.log(`Node.js ${process.version}`);\n\tconsole.log(`CF API Token: ${process.env.TERMINATOR_CF_API_TOKEN ? \"set\" : \"MISSING\"}`);\n\tconsole.log(`Twilio SID: ${process.env.TERMINATOR_TWILIO_ACCOUNT_SID ? \"set\" : \"MISSING\"}`);\n\tconsole.log(`Lithic Key: ${process.env.TERMINATOR_LITHIC_API_KEY ? \"set\" : \"MISSING\"}`);\n\tprocess.exit(0);\n}\n\nconst terminator = new Terminator();\n\nconst server = new McpServer({\n\tname: \"terminator\",\n\tversion: \"0.1.0\",\n});\n\nregisterIdentityTools(server, terminator);\nregisterMessageTools(server, terminator);\nregisterCardTools(server, terminator);\nregisterKillTools(server, terminator);\nregisterStatusTools(server, terminator);\n\nconst transport = new StdioServerTransport();\nawait server.connect(transport);\n\nprocess.on(\"SIGINT\", async () => {\n\tterminator.close();\n\tawait server.close();\n\tprocess.exit(0);\n});\n\nprocess.on(\"SIGTERM\", async () => {\n\tterminator.close();\n\tawait server.close();\n\tprocess.exit(0);\n});\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { Terminator } from \"@terminator-network/core\";\nimport { z } from \"zod\";\n\nexport function registerIdentityTools(server: McpServer, terminator: Terminator) {\n\tserver.tool(\n\t\t\"create_identity\",\n\t\t{\n\t\t\tdescription:\n\t\t\t\t\"Create a new disposable agent identity with a generated persona and selected resources (email, phone, virtual card). Returns the identity details including any provisioned resources.\",\n\t\t\tinputSchema: {\n\t\t\t\tresources: z\n\t\t\t\t\t.array(z.enum([\"email\", \"phone\", \"card\"]))\n\t\t\t\t\t.default([\"email\", \"phone\", \"card\"])\n\t\t\t\t\t.describe(\"Which resources to provision. Defaults to all three.\"),\n\t\t\t\tttl_minutes: z\n\t\t\t\t\t.number()\n\t\t\t\t\t.int()\n\t\t\t\t\t.positive()\n\t\t\t\t\t.optional()\n\t\t\t\t\t.describe(\"Time-to-live in minutes before auto-expiry.\"),\n\t\t\t\tspend_limit_cents: z\n\t\t\t\t\t.number()\n\t\t\t\t\t.int()\n\t\t\t\t\t.positive()\n\t\t\t\t\t.optional()\n\t\t\t\t\t.describe(\"Maximum spend in cents for the virtual card.\"),\n\t\t\t\tconfirm: z\n\t\t\t\t\t.boolean()\n\t\t\t\t\t.optional()\n\t\t\t\t\t.describe(\"Set to true to confirm card creation if policy requires approval.\"),\n\t\t\t},\n\t\t},\n\t\tasync ({ resources, ttl_minutes, spend_limit_cents, confirm }) => {\n\t\t\ttry {\n\t\t\t\tconst identity = await terminator.createIdentity({\n\t\t\t\t\tresources,\n\t\t\t\t\tttlMinutes: ttl_minutes,\n\t\t\t\t\tspendLimitCents: spend_limit_cents,\n\t\t\t\t\tconfirm,\n\t\t\t\t});\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: JSON.stringify(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tid: identity.id,\n\t\t\t\t\t\t\t\t\tstatus: identity.status,\n\t\t\t\t\t\t\t\t\tpersona: identity.persona,\n\t\t\t\t\t\t\t\t\temail: identity.email,\n\t\t\t\t\t\t\t\t\tphone: identity.phone,\n\t\t\t\t\t\t\t\t\tcardLastFour: identity.cardLastFour,\n\t\t\t\t\t\t\t\t\tttlExpiresAt: identity.ttlExpiresAt,\n\t\t\t\t\t\t\t\t\tcreatedAt: identity.createdAt,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: `Error creating identity: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\tserver.tool(\n\t\t\"get_identity\",\n\t\t{\n\t\t\tdescription: \"Get details of a specific agent identity by ID.\",\n\t\t\tinputSchema: {\n\t\t\t\tidentity_id: z.string().describe(\"The identity ID to look up.\"),\n\t\t\t},\n\t\t},\n\t\tasync ({ identity_id }) => {\n\t\t\ttry {\n\t\t\t\tconst identity = terminator.getIdentity(identity_id);\n\t\t\t\tif (!identity) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [{ type: \"text\" as const, text: `Identity not found: ${identity_id}` }],\n\t\t\t\t\t\tisError: true,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\" as const, text: JSON.stringify(identity, null, 2) }],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: `Error: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\tserver.tool(\n\t\t\"list_identities\",\n\t\t{\n\t\t\tdescription: \"List all agent identities, optionally filtered by status.\",\n\t\t\tinputSchema: {\n\t\t\t\tstatus: z\n\t\t\t\t\t.enum([\"active\", \"killed\", \"all\"])\n\t\t\t\t\t.default(\"all\")\n\t\t\t\t\t.describe(\"Filter by status. Defaults to all.\"),\n\t\t\t},\n\t\t},\n\t\tasync ({ status }) => {\n\t\t\ttry {\n\t\t\t\tconst identities = terminator.listIdentities(status);\n\t\t\t\tconst summary = identities.map((i) => ({\n\t\t\t\t\tid: i.id,\n\t\t\t\t\tname: i.persona.fullName,\n\t\t\t\t\tstatus: i.status,\n\t\t\t\t\temail: i.email,\n\t\t\t\t\tphone: i.phone,\n\t\t\t\t\tcardLastFour: i.cardLastFour,\n\t\t\t\t\tcreatedAt: i.createdAt,\n\t\t\t\t}));\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\" as const, text: JSON.stringify(summary, null, 2) }],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: `Error: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { Terminator } from \"@terminator-network/core\";\nimport { z } from \"zod\";\n\nexport function registerMessageTools(server: McpServer, terminator: Terminator) {\n\tserver.tool(\n\t\t\"read_messages\",\n\t\t{\n\t\t\tdescription:\n\t\t\t\t\"Read emails and SMS messages received by an identity. Returns all messages or only those since a given timestamp.\",\n\t\t\tinputSchema: {\n\t\t\t\tidentity_id: z.string().describe(\"The identity ID to read messages for.\"),\n\t\t\t\tsince: z\n\t\t\t\t\t.string()\n\t\t\t\t\t.optional()\n\t\t\t\t\t.describe(\"ISO 8601 timestamp. Only return messages after this time.\"),\n\t\t\t},\n\t\t},\n\t\tasync ({ identity_id, since }) => {\n\t\t\ttry {\n\t\t\t\tconst sinceDate = since ? new Date(since) : undefined;\n\t\t\t\tconst { emails, sms } = await terminator.readMessages(identity_id, sinceDate);\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: JSON.stringify(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\temails: emails.map((e) => ({\n\t\t\t\t\t\t\t\t\t\tfrom: e.from,\n\t\t\t\t\t\t\t\t\t\tsubject: e.subject,\n\t\t\t\t\t\t\t\t\t\ttext: e.text,\n\t\t\t\t\t\t\t\t\t\treceivedAt: e.receivedAt,\n\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\tsms: sms.map((s) => ({\n\t\t\t\t\t\t\t\t\t\tfrom: s.from,\n\t\t\t\t\t\t\t\t\t\tbody: s.body,\n\t\t\t\t\t\t\t\t\t\treceivedAt: s.receivedAt,\n\t\t\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t\t\t\ttotalEmails: emails.length,\n\t\t\t\t\t\t\t\t\ttotalSms: sms.length,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: `Error reading messages: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\tserver.tool(\n\t\t\"extract_code\",\n\t\t{\n\t\t\tdescription:\n\t\t\t\t\"Parse the most recent messages for an identity and extract a verification code (OTP, PIN, etc.). Returns the code if found.\",\n\t\t\tinputSchema: {\n\t\t\t\tidentity_id: z.string().describe(\"The identity ID to extract a code from.\"),\n\t\t\t},\n\t\t},\n\t\tasync ({ identity_id }) => {\n\t\t\ttry {\n\t\t\t\tconst code = await terminator.extractCode(identity_id);\n\t\t\t\tif (code) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\t\ttext: JSON.stringify({ code, found: true }),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: JSON.stringify({\n\t\t\t\t\t\t\t\tfound: false,\n\t\t\t\t\t\t\t\tmessage: \"No verification code found in recent messages.\",\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: `Error extracting code: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { Terminator } from \"@terminator-network/core\";\nimport { z } from \"zod\";\n\nexport function registerCardTools(server: McpServer, terminator: Terminator) {\n\tserver.tool(\n\t\t\"get_card_details\",\n\t\t{\n\t\t\tdescription:\n\t\t\t\t\"Get the full card details (PAN, CVV, expiry) for an identity's virtual card. These details are fetched live from the provider and never stored locally.\",\n\t\t\tinputSchema: {\n\t\t\t\tidentity_id: z.string().describe(\"The identity ID to get card details for.\"),\n\t\t\t},\n\t\t},\n\t\tasync ({ identity_id }) => {\n\t\t\ttry {\n\t\t\t\tconst details = await terminator.getCardDetails(identity_id);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: JSON.stringify(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpan: details.pan,\n\t\t\t\t\t\t\t\t\tcvv: details.cvv,\n\t\t\t\t\t\t\t\t\texpMonth: details.expMonth,\n\t\t\t\t\t\t\t\t\texpYear: details.expYear,\n\t\t\t\t\t\t\t\t\tlastFour: details.lastFour,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: `Error getting card details: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { Terminator } from \"@terminator-network/core\";\nimport { z } from \"zod\";\n\nexport function registerKillTools(server: McpServer, terminator: Terminator) {\n\tserver.tool(\n\t\t\"kill_identity\",\n\t\t{\n\t\t\tdescription:\n\t\t\t\t\"Revoke all resources (email, phone, card) for a single identity. The identity is permanently deactivated.\",\n\t\t\tinputSchema: {\n\t\t\t\tidentity_id: z.string().describe(\"The identity ID to kill.\"),\n\t\t\t},\n\t\t},\n\t\tasync ({ identity_id }) => {\n\t\t\ttry {\n\t\t\t\tconst result = await terminator.killIdentity(identity_id);\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: JSON.stringify(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tidentityId: result.identityId,\n\t\t\t\t\t\t\t\t\temailRevoked: result.emailRevoked,\n\t\t\t\t\t\t\t\t\tphoneRevoked: result.phoneRevoked,\n\t\t\t\t\t\t\t\t\tcardRevoked: result.cardRevoked,\n\t\t\t\t\t\t\t\t\terrors: result.errors.length > 0 ? result.errors : undefined,\n\t\t\t\t\t\t\t\t\tstatus: \"killed\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: `Error killing identity: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\tserver.tool(\n\t\t\"kill_all\",\n\t\t{\n\t\t\tdescription:\n\t\t\t\t\"Emergency kill switch. Immediately revokes ALL active identities and their resources. This action cannot be undone.\",\n\t\t\tinputSchema: {\n\t\t\t\tconfirm: z\n\t\t\t\t\t.boolean()\n\t\t\t\t\t.describe(\"Must be true to confirm. This kills ALL active identities.\"),\n\t\t\t},\n\t\t},\n\t\tasync ({ confirm }) => {\n\t\t\tif (!confirm) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: \"Kill switch not activated. Set confirm to true to proceed.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t};\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst results = await terminator.killAll();\n\t\t\t\tconst summary = {\n\t\t\t\t\ttotalKilled: results.length,\n\t\t\t\t\tresults: results.map((r) => ({\n\t\t\t\t\t\tidentityId: r.identityId,\n\t\t\t\t\t\temailRevoked: r.emailRevoked,\n\t\t\t\t\t\tphoneRevoked: r.phoneRevoked,\n\t\t\t\t\t\tcardRevoked: r.cardRevoked,\n\t\t\t\t\t\terrors: r.errors.length > 0 ? r.errors : undefined,\n\t\t\t\t\t})),\n\t\t\t\t};\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\" as const, text: JSON.stringify(summary, null, 2) }],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: `Error executing kill switch: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n}\n","import type { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport type { Terminator } from \"@terminator-network/core\";\nimport { z } from \"zod\";\n\nexport function registerStatusTools(server: McpServer, terminator: Terminator) {\n\tserver.tool(\n\t\t\"check_status\",\n\t\t{\n\t\t\tdescription:\n\t\t\t\t\"Health check. Shows which providers are configured and reachable, and how many active identities exist.\",\n\t\t\tinputSchema: {},\n\t\t},\n\t\tasync () => {\n\t\t\ttry {\n\t\t\t\tconst status = await terminator.checkStatus();\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\" as const, text: JSON.stringify(status, null, 2) }],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: `Error checking status: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n\n\tserver.tool(\n\t\t\"get_activity_log\",\n\t\t{\n\t\t\tdescription:\n\t\t\t\t\"Query the activity log. Shows a chronological record of all actions taken by identities.\",\n\t\t\tinputSchema: {\n\t\t\t\tidentity_id: z.string().optional().describe(\"Filter by identity ID.\"),\n\t\t\t\tevent_type: z.string().optional().describe(\"Filter by event type (e.g. 'email.received', 'card.created').\"),\n\t\t\t\tlimit: z.number().int().positive().default(20).describe(\"Max events to return.\"),\n\t\t\t},\n\t\t},\n\t\tasync ({ identity_id, event_type, limit }) => {\n\t\t\ttry {\n\t\t\t\tconst events = terminator.getActivityLog({\n\t\t\t\t\tidentityId: identity_id,\n\t\t\t\t\teventType: event_type as import(\"@terminator-network/core\").ActivityEventType,\n\t\t\t\t\tlimit,\n\t\t\t\t});\n\n\t\t\t\tconst summary = events.map((e) => ({\n\t\t\t\t\ttimestamp: e.timestamp,\n\t\t\t\t\tevent: e.eventType,\n\t\t\t\t\tidentityId: e.identityId,\n\t\t\t\t\tprovider: e.provider,\n\t\t\t\t\tdetails: e.details,\n\t\t\t\t\tcost: e.costEstimateCents\n\t\t\t\t\t\t? `$${(e.costEstimateCents / 100).toFixed(2)}`\n\t\t\t\t\t\t: undefined,\n\t\t\t\t}));\n\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [{ type: \"text\" as const, text: JSON.stringify(summary, null, 2) }],\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\treturn {\n\t\t\t\t\tcontent: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: \"text\" as const,\n\t\t\t\t\t\t\ttext: `Error querying activity log: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tisError: true,\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t);\n}\n"],"mappings":";;;;AAEA,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;AACrC,SAAS,kBAAkB;;;ACH3B,SAAS,SAAS;AAEX,SAAS,sBAAsBA,SAAmBC,aAAwB;AAChF,EAAAD,QAAO;AAAA,IACN;AAAA,IACA;AAAA,MACC,aACC;AAAA,MACD,aAAa;AAAA,QACZ,WAAW,EACT,MAAM,EAAE,KAAK,CAAC,SAAS,SAAS,MAAM,CAAC,CAAC,EACxC,QAAQ,CAAC,SAAS,SAAS,MAAM,CAAC,EAClC,SAAS,sDAAsD;AAAA,QACjE,aAAa,EACX,OAAO,EACP,IAAI,EACJ,SAAS,EACT,SAAS,EACT,SAAS,6CAA6C;AAAA,QACxD,mBAAmB,EACjB,OAAO,EACP,IAAI,EACJ,SAAS,EACT,SAAS,EACT,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f,CAAC;","names":["server","terminator","z","server","terminator","z","server","terminator","z","server","terminator","z","server","terminator"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@terminator-network/mcp-server",
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "0.1.0",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"bin": {
|
|
10
|
+
"terminator-mcp-server": "dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"files": ["dist"],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsup",
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"dev": "tsx src/index.ts",
|
|
17
|
+
"clean": "rm -rf dist"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@modelcontextprotocol/sdk": "^1.27.0",
|
|
21
|
+
"@terminator-network/core": "workspace:*",
|
|
22
|
+
"zod": "^3.24.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"tsup": "^8.3.0",
|
|
26
|
+
"tsx": "^4.0.0",
|
|
27
|
+
"typescript": "^5.7.0",
|
|
28
|
+
"vitest": "^3.0.0"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=20.0.0"
|
|
32
|
+
}
|
|
33
|
+
}
|