@agentdomain/mcp-server 0.1.1 → 0.2.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.
- package/README.md +20 -10
- package/dist/index.js +132 -29
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -13,6 +13,9 @@ Lets any MCP-compatible LLM client (Claude Desktop, ChatGPT desktop apps, custom
|
|
|
13
13
|
- `search_agents` - search the public registry
|
|
14
14
|
- `send_agent_email` - send an email from an agent's address
|
|
15
15
|
- `list_agent_email` - read agent inbox/outbox messages
|
|
16
|
+
- `update_primary_email` - change the included primary email username
|
|
17
|
+
- `create_email_alias` - create a Pro/Enterprise receive-and-send email alias
|
|
18
|
+
- `delete_email_alias` - delete an active email alias
|
|
16
19
|
- `list_dns_records` - list DNS records for an agent domain
|
|
17
20
|
- `create_dns_record` - create a user-managed DNS record
|
|
18
21
|
- `update_dns_record` - update a user-managed DNS record
|
|
@@ -57,25 +60,32 @@ from any wallet, but the RenewalVault contract only accepts auto-renew changes f
|
|
|
57
60
|
|
|
58
61
|
## Pricing flags
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
+
Registration pricing includes the live domain price plus the annual AgentDomain
|
|
64
|
+
platform fee. Email setup, SSL certification, DNS orchestration, and AgentID NFT
|
|
65
|
+
mint/orchestration are included in that platform fee.
|
|
63
66
|
|
|
64
|
-
Optional services charge only when enabled:
|
|
67
|
+
Optional onchain services charge only when enabled:
|
|
65
68
|
|
|
66
69
|
- `registerBasename: false` skips Basename and Basename cost.
|
|
67
70
|
- `registerEns: false` skips ENS and ENS cost.
|
|
68
|
-
- `emailEnabled
|
|
71
|
+
- `emailEnabled` is still accepted for old clients but is deprecated and ignored.
|
|
72
|
+
- `emailUsername` customizes the primary inbox local-part; omit it for `agent@domain`.
|
|
73
|
+
- `premiumPlan: "included" | "pro" | "enterprise"` selects the per-agent plan at registration.
|
|
69
74
|
|
|
70
|
-
Use `quote_registration` first so the agent sees `
|
|
71
|
-
optional component costs, and `totalUsdc` before it signs
|
|
75
|
+
Use `quote_registration` first so the agent sees `platformFeeUsdc`, included
|
|
76
|
+
email/SSL metadata, optional component costs, and `totalUsdc` before it signs
|
|
77
|
+
the x402 payment.
|
|
72
78
|
|
|
73
79
|
For renewals, `get_renewal_status` returns the exact next renewal amount and the
|
|
74
80
|
shortfall to fund before the keeper can reserve and complete the renewal.
|
|
75
81
|
|
|
76
|
-
For
|
|
77
|
-
|
|
78
|
-
|
|
82
|
+
For Premium Plans, `purchase_service_plan` upgrades coverage through the
|
|
83
|
+
agent's current expiry. Future Premium Plan renewal is charged together with the
|
|
84
|
+
identity renewal quote in RenewalVault.
|
|
85
|
+
|
|
86
|
+
Autonomous Premium Plan purchase requires `AGENT_PRIVATE_KEY` for the owner or a
|
|
87
|
+
delegated wallet on Base with enough USDC. An agent-scoped API key can operate
|
|
88
|
+
its own allowed endpoints, but it cannot sign x402 paid purchases by itself.
|
|
79
89
|
|
|
80
90
|
## License
|
|
81
91
|
|
package/dist/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
26
26
|
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
27
27
|
import { z } from 'zod';
|
|
28
28
|
import { AgentDomain } from '@agentdomain/sdk';
|
|
29
|
-
import { AGENTDOMAIN_API_BASE_URL, SUPPORTED_FRAMEWORKS, SUPPORTED_TLDS, } from '@agentdomain/shared/constants';
|
|
29
|
+
import { AGENTDOMAIN_API_BASE_URL, SERVICE_PLAN_KEYS, SUPPORTED_FRAMEWORKS, SUPPORTED_TLDS, } from '@agentdomain/shared/constants';
|
|
30
30
|
import { createPublicClient, createWalletClient, http } from 'viem';
|
|
31
31
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
32
32
|
import { base, baseSepolia } from 'viem/chains';
|
|
@@ -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.
|
|
56
|
+
const server = new Server({ name: 'agentdomain-mcp', version: '0.2.1' }, { capabilities: { tools: {} } });
|
|
57
57
|
// ----------------------------------------------------------------------
|
|
58
58
|
// TOOL DEFINITIONS
|
|
59
59
|
// ----------------------------------------------------------------------
|
|
@@ -76,7 +76,7 @@ const TOOLS = [
|
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
name: 'quote_registration',
|
|
79
|
-
description: 'Get a price quote for registering an agent identity bundle. Domain, DNS, SSL
|
|
79
|
+
description: 'Get a price quote for registering an agent identity bundle. Domain, DNS, email, SSL, AgentID NFT orchestration, and platform fee are included by default. Basename and ENS are optional.',
|
|
80
80
|
inputSchema: {
|
|
81
81
|
type: 'object',
|
|
82
82
|
properties: {
|
|
@@ -94,18 +94,28 @@ const TOOLS = [
|
|
|
94
94
|
},
|
|
95
95
|
emailEnabled: {
|
|
96
96
|
type: 'boolean',
|
|
97
|
-
description: '
|
|
98
|
-
default:
|
|
97
|
+
description: 'Deprecated compatibility flag. Email is now always included.',
|
|
98
|
+
default: true,
|
|
99
|
+
},
|
|
100
|
+
emailUsername: {
|
|
101
|
+
type: 'string',
|
|
102
|
+
description: 'Primary email username. Defaults to agent, producing agent@domain.',
|
|
103
|
+
default: 'agent',
|
|
104
|
+
},
|
|
105
|
+
premiumPlan: {
|
|
106
|
+
type: 'string',
|
|
107
|
+
enum: SERVICE_PLAN_KEYS,
|
|
108
|
+
default: 'included',
|
|
109
|
+
description: 'Premium Plan to buy with registration.',
|
|
99
110
|
},
|
|
100
111
|
years: { type: 'integer', default: 1, minimum: 1, maximum: 10 },
|
|
101
|
-
discountCode: { type: 'string', description: 'Optional service-fee discount code' },
|
|
102
112
|
},
|
|
103
113
|
required: ['preferredName'],
|
|
104
114
|
},
|
|
105
115
|
},
|
|
106
116
|
{
|
|
107
117
|
name: 'register_agent_identity',
|
|
108
|
-
description: 'Register a complete agent identity bundle. Domain, DNS, SSL
|
|
118
|
+
description: 'Register a complete agent identity bundle. Domain, DNS, email, SSL, AgentID NFT orchestration, and platform fee are included by default. Basename and ENS are optional. Pays in USDC on Base. Requires AGENT_PRIVATE_KEY env var.',
|
|
109
119
|
inputSchema: {
|
|
110
120
|
type: 'object',
|
|
111
121
|
properties: {
|
|
@@ -129,10 +139,20 @@ const TOOLS = [
|
|
|
129
139
|
},
|
|
130
140
|
emailEnabled: {
|
|
131
141
|
type: 'boolean',
|
|
132
|
-
description: '
|
|
133
|
-
default:
|
|
142
|
+
description: 'Deprecated compatibility flag. Email is now always included.',
|
|
143
|
+
default: true,
|
|
144
|
+
},
|
|
145
|
+
emailUsername: {
|
|
146
|
+
type: 'string',
|
|
147
|
+
description: 'Primary email username. Defaults to agent, producing agent@domain.',
|
|
148
|
+
default: 'agent',
|
|
149
|
+
},
|
|
150
|
+
premiumPlan: {
|
|
151
|
+
type: 'string',
|
|
152
|
+
enum: SERVICE_PLAN_KEYS,
|
|
153
|
+
default: 'included',
|
|
154
|
+
description: 'Premium Plan to buy with registration.',
|
|
134
155
|
},
|
|
135
|
-
discountCode: { type: 'string', description: 'Optional service-fee discount code' },
|
|
136
156
|
years: { type: 'integer', default: 1, minimum: 1, maximum: 10 },
|
|
137
157
|
autoRenew: { type: 'boolean', default: false },
|
|
138
158
|
dnsTarget: { type: 'string', description: 'URL or IP to point the domain at' },
|
|
@@ -161,6 +181,17 @@ const TOOLS = [
|
|
|
161
181
|
required: ['wallet'],
|
|
162
182
|
},
|
|
163
183
|
},
|
|
184
|
+
{
|
|
185
|
+
name: 'get_agent',
|
|
186
|
+
description: 'Get one agent identity by AgentDomain agent ID. Works with an agent-scoped API key.',
|
|
187
|
+
inputSchema: {
|
|
188
|
+
type: 'object',
|
|
189
|
+
properties: {
|
|
190
|
+
agentId: { type: 'string', description: 'AgentDomain agent ID (UUID)' },
|
|
191
|
+
},
|
|
192
|
+
required: ['agentId'],
|
|
193
|
+
},
|
|
194
|
+
},
|
|
164
195
|
{
|
|
165
196
|
name: 'search_agents',
|
|
166
197
|
description: 'Search the public agent registry by name, capability, or framework.',
|
|
@@ -187,10 +218,50 @@ const TOOLS = [
|
|
|
187
218
|
to: { type: 'string' },
|
|
188
219
|
subject: { type: 'string' },
|
|
189
220
|
text: { type: 'string' },
|
|
221
|
+
fromAddress: {
|
|
222
|
+
type: 'string',
|
|
223
|
+
description: 'Optional primary or active alias address to send from.',
|
|
224
|
+
},
|
|
190
225
|
},
|
|
191
226
|
required: ['agentId', 'to', 'subject'],
|
|
192
227
|
},
|
|
193
228
|
},
|
|
229
|
+
{
|
|
230
|
+
name: 'update_primary_email',
|
|
231
|
+
description: 'Change the primary email username for an agent. The old primary address stops receiving new mail.',
|
|
232
|
+
inputSchema: {
|
|
233
|
+
type: 'object',
|
|
234
|
+
properties: {
|
|
235
|
+
agentId: { type: 'string', description: 'AgentDomain agent ID (UUID)' },
|
|
236
|
+
username: { type: 'string', description: 'New primary local-part, e.g. agent or support' },
|
|
237
|
+
},
|
|
238
|
+
required: ['agentId', 'username'],
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: 'create_email_alias',
|
|
243
|
+
description: 'Create an extra receive-and-send email alias. Requires Pro or Enterprise Premium Plan capacity.',
|
|
244
|
+
inputSchema: {
|
|
245
|
+
type: 'object',
|
|
246
|
+
properties: {
|
|
247
|
+
agentId: { type: 'string', description: 'AgentDomain agent ID (UUID)' },
|
|
248
|
+
username: { type: 'string', description: 'Alias local-part, e.g. billing' },
|
|
249
|
+
},
|
|
250
|
+
required: ['agentId', 'username'],
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
name: 'delete_email_alias',
|
|
255
|
+
description: 'Delete an active email alias from an agent.',
|
|
256
|
+
inputSchema: {
|
|
257
|
+
type: 'object',
|
|
258
|
+
properties: {
|
|
259
|
+
agentId: { type: 'string', description: 'AgentDomain agent ID (UUID)' },
|
|
260
|
+
emailAddress: { type: 'string', description: 'Full alias address to delete' },
|
|
261
|
+
},
|
|
262
|
+
required: ['agentId', 'emailAddress'],
|
|
263
|
+
},
|
|
264
|
+
},
|
|
194
265
|
{
|
|
195
266
|
name: 'list_agent_email',
|
|
196
267
|
description: 'List received/sent text-only email messages for an email-enabled agent, including extracted verification codes.',
|
|
@@ -307,7 +378,7 @@ const TOOLS = [
|
|
|
307
378
|
},
|
|
308
379
|
{
|
|
309
380
|
name: 'get_service_plan',
|
|
310
|
-
description: 'Get the current AgentDomain
|
|
381
|
+
description: 'Get the current AgentDomain Premium Plan, entitlement limits, billing interval, registry privacy, and recent purchases for one agent.',
|
|
311
382
|
inputSchema: {
|
|
312
383
|
type: 'object',
|
|
313
384
|
properties: {
|
|
@@ -318,23 +389,29 @@ const TOOLS = [
|
|
|
318
389
|
},
|
|
319
390
|
{
|
|
320
391
|
name: 'purchase_service_plan',
|
|
321
|
-
description: 'Upgrade one agent to Pro or Enterprise with x402 USDC. Requires AGENT_PRIVATE_KEY for the owner wallet.',
|
|
392
|
+
description: 'Upgrade one agent to a Pro or Enterprise Premium Plan with x402 USDC. Requires AGENT_PRIVATE_KEY for the owner wallet.',
|
|
322
393
|
inputSchema: {
|
|
323
394
|
type: 'object',
|
|
324
395
|
properties: {
|
|
325
396
|
agentId: { type: 'string' },
|
|
326
397
|
plan: { type: 'string', enum: ['pro', 'enterprise'] },
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
398
|
+
},
|
|
399
|
+
required: ['agentId', 'plan'],
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
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.',
|
|
405
|
+
inputSchema: {
|
|
406
|
+
type: 'object',
|
|
407
|
+
properties: {
|
|
408
|
+
agentId: { type: 'string' },
|
|
409
|
+
registryHidden: {
|
|
410
|
+
type: 'boolean',
|
|
411
|
+
description: 'true hides the agent from public registry/search; false makes it public',
|
|
335
412
|
},
|
|
336
413
|
},
|
|
337
|
-
required: ['agentId', '
|
|
414
|
+
required: ['agentId', 'registryHidden'],
|
|
338
415
|
},
|
|
339
416
|
},
|
|
340
417
|
{
|
|
@@ -374,9 +451,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
374
451
|
tld: z.enum(SUPPORTED_TLDS).default('xyz'),
|
|
375
452
|
registerBasename: z.boolean().default(true),
|
|
376
453
|
registerEns: z.boolean().default(false),
|
|
377
|
-
emailEnabled: z.boolean().default(
|
|
454
|
+
emailEnabled: z.boolean().default(true),
|
|
455
|
+
emailUsername: z.string().optional(),
|
|
456
|
+
premiumPlan: z.enum(SERVICE_PLAN_KEYS).default('included'),
|
|
378
457
|
years: z.number().int().min(1).max(10).default(1),
|
|
379
|
-
discountCode: z.string().max(50).optional(),
|
|
380
458
|
})
|
|
381
459
|
.parse(args);
|
|
382
460
|
const result = await client.quote(a);
|
|
@@ -406,10 +484,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
406
484
|
.string()
|
|
407
485
|
.regex(/^0x[a-fA-F0-9]{40}$/)
|
|
408
486
|
.optional(),
|
|
409
|
-
emailEnabled: z.boolean().default(
|
|
487
|
+
emailEnabled: z.boolean().default(true),
|
|
488
|
+
emailUsername: z.string().optional(),
|
|
489
|
+
premiumPlan: z.enum(SERVICE_PLAN_KEYS).default('included'),
|
|
410
490
|
years: z.number().int().min(1).max(10).default(1),
|
|
411
491
|
autoRenew: z.boolean().default(false),
|
|
412
|
-
discountCode: z.string().max(50).optional(),
|
|
413
492
|
dnsTarget: z.string().optional(),
|
|
414
493
|
metadata: z.record(z.any()).optional(),
|
|
415
494
|
})
|
|
@@ -428,6 +507,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
428
507
|
const result = await client.getAgentsByWallet(a.wallet);
|
|
429
508
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
430
509
|
}
|
|
510
|
+
case 'get_agent': {
|
|
511
|
+
const a = z.object({ agentId: z.string() }).parse(args);
|
|
512
|
+
const result = await client.getAgentById(a.agentId);
|
|
513
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
514
|
+
}
|
|
431
515
|
case 'search_agents': {
|
|
432
516
|
const a = z
|
|
433
517
|
.object({
|
|
@@ -447,10 +531,12 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
447
531
|
to: z.string(),
|
|
448
532
|
subject: z.string(),
|
|
449
533
|
text: z.string(),
|
|
534
|
+
fromAddress: z.string().email().optional(),
|
|
450
535
|
})
|
|
451
536
|
.parse(args);
|
|
452
537
|
const result = await client.sendEmail(a.agentId, {
|
|
453
538
|
to: a.to,
|
|
539
|
+
fromAddress: a.fromAddress,
|
|
454
540
|
subject: a.subject,
|
|
455
541
|
text: a.text,
|
|
456
542
|
});
|
|
@@ -461,6 +547,21 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
461
547
|
const result = await client.listEmail(a.agentId, { limit: a.limit });
|
|
462
548
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
463
549
|
}
|
|
550
|
+
case 'update_primary_email': {
|
|
551
|
+
const a = z.object({ agentId: z.string(), username: z.string() }).parse(args);
|
|
552
|
+
const result = await client.updatePrimaryEmail(a.agentId, a.username);
|
|
553
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
554
|
+
}
|
|
555
|
+
case 'create_email_alias': {
|
|
556
|
+
const a = z.object({ agentId: z.string(), username: z.string() }).parse(args);
|
|
557
|
+
const result = await client.createEmailAlias(a.agentId, a.username);
|
|
558
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
559
|
+
}
|
|
560
|
+
case 'delete_email_alias': {
|
|
561
|
+
const a = z.object({ agentId: z.string(), emailAddress: z.string().email() }).parse(args);
|
|
562
|
+
const result = await client.deleteEmailAlias(a.agentId, a.emailAddress);
|
|
563
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
564
|
+
}
|
|
464
565
|
case 'list_dns_records': {
|
|
465
566
|
const a = z.object({ agentId: z.string() }).parse(args);
|
|
466
567
|
const result = await client.listDnsRecords(a.agentId);
|
|
@@ -539,7 +640,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
539
640
|
content: [
|
|
540
641
|
{
|
|
541
642
|
type: 'text',
|
|
542
|
-
text: 'AGENT_PRIVATE_KEY env var is required to purchase a
|
|
643
|
+
text: 'AGENT_PRIVATE_KEY env var is required to purchase a Premium Plan.',
|
|
543
644
|
},
|
|
544
645
|
],
|
|
545
646
|
};
|
|
@@ -548,14 +649,16 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
548
649
|
.object({
|
|
549
650
|
agentId: z.string(),
|
|
550
651
|
plan: z.enum(['pro', 'enterprise']),
|
|
551
|
-
interval: z.enum(['monthly', 'yearly']),
|
|
552
|
-
autoRenew: z.boolean().default(false),
|
|
553
|
-
prepayPeriods: z.number().int().min(1).max(12).default(1),
|
|
554
652
|
})
|
|
555
653
|
.parse(args);
|
|
556
654
|
const result = await client.purchaseServicePlan(a);
|
|
557
655
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
558
656
|
}
|
|
657
|
+
case 'set_registry_visibility': {
|
|
658
|
+
const a = z.object({ agentId: z.string(), registryHidden: z.boolean() }).parse(args);
|
|
659
|
+
const result = await client.setRegistryVisibility(a.agentId, a.registryHidden);
|
|
660
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
661
|
+
}
|
|
559
662
|
case 'enable_auto_renew': {
|
|
560
663
|
if (!AGENT_PRIVATE_KEY) {
|
|
561
664
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentdomain/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "MCP server exposing AgentDomain registration and management tools to any LLM",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
22
|
-
"viem": "^2.
|
|
22
|
+
"viem": "^2.55.2",
|
|
23
23
|
"zod": "^3.24.1",
|
|
24
|
-
"@agentdomain/sdk": "^0.
|
|
25
|
-
"@agentdomain/shared": "^0.
|
|
24
|
+
"@agentdomain/sdk": "^0.2.1",
|
|
25
|
+
"@agentdomain/shared": "^0.2.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.10.5",
|
|
29
|
-
"tsx": "^4.
|
|
29
|
+
"tsx": "^4.23.1",
|
|
30
30
|
"typescript": "^5.7.2"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|