@agentdomain/mcp-server 0.3.0 → 0.4.1

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.
Files changed (3) hide show
  1. package/README.md +13 -7
  2. package/dist/index.js +145 -6
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -12,21 +12,26 @@ Lets any MCP-compatible LLM client (Claude Desktop, ChatGPT desktop apps, custom
12
12
  - `lookup_agent` - find an agent by wallet
13
13
  - `search_agents` - search the public registry
14
14
  - `send_agent_email` - send an email from an agent's address
15
+ - `send_agent_email_batch` - queue up to 100 email objects in one API request
15
16
  - `list_agent_email` - read agent inbox/outbox messages
17
+ - `delete_agent_email` - permanently delete one inbox/outbox message
18
+ - `get_agent_email_usage` - inspect combined monthly sent and received usage
19
+ - `configure_email_webhook` - configure a signed inbound email webhook
16
20
  - `update_primary_email` - change the included primary email username
17
- - `create_email_alias` - create a Pro/Enterprise receive-and-send email alias
21
+ - `create_email_alias` - create a Starter/Pro/Enterprise receive-and-send email alias
18
22
  - `delete_email_alias` - delete an active email alias
19
23
  - `list_dns_records` - list DNS records for an agent domain
20
- - `create_dns_record` - create a user-managed DNS record
24
+ - `create_dns_record` - create a user-managed record; apex routing records activate external hosting
21
25
  - `update_dns_record` - update a user-managed DNS record
22
26
  - `delete_dns_record` - delete a user-managed DNS record
23
- - `reconfigure_ssl` - rebuild Cloudflare SaaS SSL and DNS validation records
27
+ - `reconfigure_ssl` - rebuild Cloudflare SaaS SSL when AgentDomain-managed hosting is active
24
28
  - `fund_renewal_vault` - top up an agent's renewal vault
25
29
  - `withdraw_renewal_vault` - build an owner-signed vault withdrawal transaction
26
30
  - `get_renewal_status` - check renewal date, amount, vault balance, and auto-renew state
27
31
  - `enable_auto_renew` - enable on-chain auto-renew with the AgentID NFT owner wallet
28
- - `get_service_plan` - inspect per-agent Included/Pro/Enterprise limits
29
- - `purchase_service_plan` - upgrade to Pro or Enterprise with x402 USDC
32
+ - `get_service_plan` - inspect per-agent Included/Starter/Pro/Enterprise limits
33
+ - `purchase_service_plan` - upgrade to Starter, Pro, or Enterprise with x402 USDC
34
+ - `schedule_service_plan_renewal` - choose the exact next-renewal plan and Enterprise tier
30
35
 
31
36
  ## Install
32
37
 
@@ -70,7 +75,7 @@ Optional onchain services charge only when enabled:
70
75
  - `registerEns: false` skips ENS and ENS cost.
71
76
  - `emailEnabled` is still accepted for old clients but is deprecated and ignored.
72
77
  - `emailUsername` customizes the primary inbox local-part; omit it for `agent@domain`.
73
- - `premiumPlan: "included" | "pro" | "enterprise"` selects the per-agent plan at registration.
78
+ - `premiumPlan: "included" | "starter" | "pro" | "enterprise"` selects the per-agent plan at registration.
74
79
 
75
80
  Use `quote_registration` first so the agent sees `platformFeeUsdc`, included
76
81
  email/SSL metadata, optional component costs, and `totalUsdc` before it signs
@@ -89,4 +94,5 @@ its own allowed endpoints, but it cannot sign x402 paid purchases by itself.
89
94
 
90
95
  ## License
91
96
 
92
- Apache-2.0. See the repository [LICENSE](../../LICENSE).
97
+ Public package releases are licensed under Apache-2.0. Private AgentDomain
98
+ platform code is not included in this package.
package/dist/index.js CHANGED
@@ -53,7 +53,7 @@ function getClient() {
53
53
  }
54
54
  return new AgentDomain(config);
55
55
  }
56
- const server = new Server({ name: 'agentdomain-mcp', version: '0.3.0' }, { capabilities: { tools: {} } });
56
+ const server = new Server({ name: 'agentdomain-mcp', version: '0.2.1' }, { capabilities: { tools: {} } });
57
57
  // ----------------------------------------------------------------------
58
58
  // TOOL DEFINITIONS
59
59
  // ----------------------------------------------------------------------
@@ -238,9 +238,58 @@ const TOOLS = [
238
238
  required: ['agentId', 'username'],
239
239
  },
240
240
  },
241
+ {
242
+ name: 'send_agent_email_batch',
243
+ description: 'Queue up to 100 emails in one request; each recipient counts toward monthly usage.',
244
+ inputSchema: {
245
+ type: 'object',
246
+ properties: {
247
+ agentId: { type: 'string' },
248
+ messages: {
249
+ type: 'array',
250
+ maxItems: 100,
251
+ items: {
252
+ type: 'object',
253
+ properties: {
254
+ to: { type: 'string' },
255
+ subject: { type: 'string' },
256
+ text: { type: 'string' },
257
+ fromAddress: { type: 'string' },
258
+ },
259
+ required: ['to', 'subject', 'text'],
260
+ },
261
+ },
262
+ idempotencyKey: { type: 'string' },
263
+ },
264
+ required: ['agentId', 'messages'],
265
+ },
266
+ },
267
+ {
268
+ name: 'get_agent_email_usage',
269
+ description: 'Get combined sent and received monthly quota usage and reset date.',
270
+ inputSchema: {
271
+ type: 'object',
272
+ properties: { agentId: { type: 'string' } },
273
+ required: ['agentId'],
274
+ },
275
+ },
276
+ {
277
+ name: 'configure_email_webhook',
278
+ description: 'Configure the signed email.received webhook for an agent.',
279
+ inputSchema: {
280
+ type: 'object',
281
+ properties: {
282
+ agentId: { type: 'string' },
283
+ url: { type: 'string' },
284
+ payloadMode: { type: 'string', enum: ['metadata', 'inline_text'] },
285
+ enabled: { type: 'boolean' },
286
+ },
287
+ required: ['agentId', 'url'],
288
+ },
289
+ },
241
290
  {
242
291
  name: 'create_email_alias',
243
- description: 'Create an extra receive-and-send email alias. Requires Pro or Enterprise Premium Plan capacity.',
292
+ description: 'Create an extra receive-and-send email alias. Requires paid-plan alias capacity.',
244
293
  inputSchema: {
245
294
  type: 'object',
246
295
  properties: {
@@ -274,6 +323,18 @@ const TOOLS = [
274
323
  required: ['agentId'],
275
324
  },
276
325
  },
326
+ {
327
+ name: 'delete_agent_email',
328
+ description: 'Permanently delete one email message from an agent inbox.',
329
+ inputSchema: {
330
+ type: 'object',
331
+ properties: {
332
+ agentId: { type: 'string', description: 'AgentDomain agent ID (UUID)' },
333
+ messageId: { type: 'string', description: 'Email message ID (UUID)' },
334
+ },
335
+ required: ['agentId', 'messageId'],
336
+ },
337
+ },
277
338
  {
278
339
  name: 'list_dns_records',
279
340
  description: 'List Spaceship-backed DNS records for an agent domain.',
@@ -389,19 +450,23 @@ const TOOLS = [
389
450
  },
390
451
  {
391
452
  name: 'purchase_service_plan',
392
- description: 'Upgrade one agent to a Pro or Enterprise Premium Plan with x402 USDC. Requires AGENT_PRIVATE_KEY for the owner wallet.',
453
+ description: 'Upgrade one agent to Starter, Pro, or Enterprise with x402 USDC. Requires AGENT_PRIVATE_KEY for the owner wallet.',
393
454
  inputSchema: {
394
455
  type: 'object',
395
456
  properties: {
396
457
  agentId: { type: 'string' },
397
- plan: { type: 'string', enum: ['pro', 'enterprise'] },
458
+ plan: { type: 'string', enum: ['starter', 'pro', 'enterprise'] },
459
+ planSku: {
460
+ type: 'string',
461
+ description: 'For Enterprise, e.g. enterprise-100000 through enterprise-5000000.',
462
+ },
398
463
  },
399
464
  required: ['agentId', 'plan'],
400
465
  },
401
466
  },
402
467
  {
403
468
  name: 'set_registry_visibility',
404
- description: 'Hide or show one agent in the public AgentDomain registry. Hiding requires an active Pro or Enterprise Premium Plan.',
469
+ description: 'Hide or show one agent in the public AgentDomain registry. Hiding requires an active paid Premium Plan.',
405
470
  inputSchema: {
406
471
  type: 'object',
407
472
  properties: {
@@ -414,6 +479,22 @@ const TOOLS = [
414
479
  required: ['agentId', 'registryHidden'],
415
480
  },
416
481
  },
482
+ {
483
+ name: 'schedule_service_plan_renewal',
484
+ description: 'Choose the exact Premium Plan SKU to charge at the next identity renewal, including any Enterprise email tier.',
485
+ inputSchema: {
486
+ type: 'object',
487
+ properties: {
488
+ agentId: { type: 'string' },
489
+ plan: { type: 'string', enum: ['included', 'starter', 'pro', 'enterprise'] },
490
+ planSku: {
491
+ type: 'string',
492
+ description: 'Exact SKU; Enterprise examples range from enterprise-100000 to enterprise-5000000.',
493
+ },
494
+ },
495
+ required: ['agentId', 'plan', 'planSku'],
496
+ },
497
+ },
417
498
  {
418
499
  name: 'enable_auto_renew',
419
500
  description: 'Enable on-chain auto-renew for an agent. Requires the owner wallet private key and the RenewalVault contract address.',
@@ -547,6 +628,49 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
547
628
  const result = await client.listEmail(a.agentId, { limit: a.limit });
548
629
  return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
549
630
  }
631
+ case 'delete_agent_email': {
632
+ const a = z.object({ agentId: z.string().uuid(), messageId: z.string().uuid() }).parse(args);
633
+ const result = await client.deleteEmailMessage(a.agentId, a.messageId);
634
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
635
+ }
636
+ case 'send_agent_email_batch': {
637
+ const a = z
638
+ .object({
639
+ agentId: z.string(),
640
+ messages: z
641
+ .array(z.object({
642
+ to: z.string().email(),
643
+ subject: z.string(),
644
+ text: z.string(),
645
+ fromAddress: z.string().email().optional(),
646
+ }))
647
+ .max(100),
648
+ idempotencyKey: z.string().optional(),
649
+ })
650
+ .parse(args);
651
+ const result = await client.sendEmailBatch(a.agentId, {
652
+ messages: a.messages,
653
+ idempotencyKey: a.idempotencyKey,
654
+ });
655
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
656
+ }
657
+ case 'get_agent_email_usage': {
658
+ const a = z.object({ agentId: z.string() }).parse(args);
659
+ const result = await client.getEmailUsage(a.agentId);
660
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
661
+ }
662
+ case 'configure_email_webhook': {
663
+ const a = z
664
+ .object({
665
+ agentId: z.string(),
666
+ url: z.string().url(),
667
+ payloadMode: z.enum(['metadata', 'inline_text']).default('metadata'),
668
+ enabled: z.boolean().default(true),
669
+ })
670
+ .parse(args);
671
+ const result = await client.setEmailWebhook(a.agentId, a);
672
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
673
+ }
550
674
  case 'update_primary_email': {
551
675
  const a = z.object({ agentId: z.string(), username: z.string() }).parse(args);
552
676
  const result = await client.updatePrimaryEmail(a.agentId, a.username);
@@ -648,7 +772,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
648
772
  const a = z
649
773
  .object({
650
774
  agentId: z.string(),
651
- plan: z.enum(['pro', 'enterprise']),
775
+ plan: z.enum(['starter', 'pro', 'enterprise']),
776
+ planSku: z.custom().optional(),
652
777
  })
653
778
  .parse(args);
654
779
  const result = await client.purchaseServicePlan(a);
@@ -659,6 +784,20 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
659
784
  const result = await client.setRegistryVisibility(a.agentId, a.registryHidden);
660
785
  return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
661
786
  }
787
+ case 'schedule_service_plan_renewal': {
788
+ const a = z
789
+ .object({
790
+ agentId: z.string().uuid(),
791
+ plan: z.enum(['included', 'starter', 'pro', 'enterprise']),
792
+ planSku: z.custom(),
793
+ })
794
+ .parse(args);
795
+ const result = await client.scheduleServicePlanRenewal(a.agentId, {
796
+ plan: a.plan,
797
+ planSku: a.planSku,
798
+ });
799
+ return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
800
+ }
662
801
  case 'enable_auto_renew': {
663
802
  if (!AGENT_PRIVATE_KEY) {
664
803
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentdomain/mcp-server",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "MCP server exposing AgentDomain registration and management tools to any LLM",
5
5
  "license": "Apache-2.0",
6
6
  "repository": "https://github.com/0xmdrakib/AgentDomain.git",
@@ -24,8 +24,8 @@
24
24
  "@modelcontextprotocol/sdk": "^1.0.4",
25
25
  "viem": "^2.55.2",
26
26
  "zod": "^3.24.1",
27
- "@agentdomain/sdk": "^0.3.0",
28
- "@agentdomain/shared": "^0.3.0"
27
+ "@agentdomain/shared": "^0.4.0",
28
+ "@agentdomain/sdk": "^0.4.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.10.5",