@mailkite/mcp 0.3.0 → 0.5.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/package.json +2 -2
- package/spec/api.json +284 -42
- package/spec/cases.json +648 -108
- package/spec/schemas/decrypt-request.json +19 -0
- package/spec/schemas/encrypt-request.json +19 -0
- package/spec/schemas/send-request.json +3 -3
- package/spec/schemas/upload-attachment-request.json +18 -0
- package/spec/schemas/upload-attachment-response.json +14 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailkite/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Model Context Protocol server for MailKite — exposes the MailKite API to LLM agents as tools. A thin layer over the MailKite Node SDK and the shared sdks/spec contract.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
43
43
|
"ajv": "^8.17.1",
|
|
44
|
-
"mailkite": "^0.
|
|
44
|
+
"mailkite": "^0.5.0"
|
|
45
45
|
}
|
|
46
46
|
}
|
package/spec/api.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mailkite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Canonical interface contract for every MailKite SDK. One low-level request() plus one function per endpoint. All languages expose the same shape; only naming adapts to each language's convention (e.g. Go exports PascalCase).",
|
|
5
5
|
"baseUrl": "https://api.mailkite.dev",
|
|
6
6
|
"auth": {
|
|
@@ -12,167 +12,409 @@
|
|
|
12
12
|
{
|
|
13
13
|
"name": "send",
|
|
14
14
|
"summary": "Send a message over a verified domain. Pass `templateId` (+ optional `templateData`) to send from a saved or base template.",
|
|
15
|
-
"http": {
|
|
16
|
-
|
|
15
|
+
"http": {
|
|
16
|
+
"method": "POST",
|
|
17
|
+
"path": "/v1/send"
|
|
18
|
+
},
|
|
19
|
+
"args": [
|
|
20
|
+
{
|
|
21
|
+
"name": "message",
|
|
22
|
+
"in": "body",
|
|
23
|
+
"schema": "send-request"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
17
26
|
"returns": "send-response"
|
|
18
27
|
},
|
|
28
|
+
{
|
|
29
|
+
"name": "uploadAttachment",
|
|
30
|
+
"summary": "Upload a file to MailKite storage and get back a secure, time-limited URL. Reference the returned `url` as an attachment in send() (`{ filename, url }`) or link it inline in your HTML — instead of base64-inlining large files on every send. `content` is the file bytes, base64-encoded; `retentionDays` (7/30/90/365, default 7) sets how long the file and URL live.",
|
|
31
|
+
"http": {
|
|
32
|
+
"method": "POST",
|
|
33
|
+
"path": "/v1/attachments"
|
|
34
|
+
},
|
|
35
|
+
"args": [
|
|
36
|
+
{
|
|
37
|
+
"name": "file",
|
|
38
|
+
"in": "body",
|
|
39
|
+
"schema": "upload-attachment-request"
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
"returns": "upload-attachment-response"
|
|
43
|
+
},
|
|
19
44
|
{
|
|
20
45
|
"name": "listTemplates",
|
|
21
46
|
"summary": "List your saved email templates (light metadata only — no body). Use getTemplate for the full template.",
|
|
22
|
-
"http": {
|
|
47
|
+
"http": {
|
|
48
|
+
"method": "GET",
|
|
49
|
+
"path": "/api/templates"
|
|
50
|
+
},
|
|
23
51
|
"args": [],
|
|
24
52
|
"returns": "any"
|
|
25
53
|
},
|
|
26
54
|
{
|
|
27
55
|
"name": "listBaseTemplates",
|
|
28
56
|
"summary": "List the premade base templates (light metadata). Clone one with createTemplate({ baseId }) or send from it directly via send({ templateId }).",
|
|
29
|
-
"http": {
|
|
57
|
+
"http": {
|
|
58
|
+
"method": "GET",
|
|
59
|
+
"path": "/api/templates/base"
|
|
60
|
+
},
|
|
30
61
|
"args": [],
|
|
31
62
|
"returns": "any"
|
|
32
63
|
},
|
|
33
64
|
{
|
|
34
65
|
"name": "getTemplate",
|
|
35
66
|
"summary": "Get one template (full: subject, html, text, theme). Works for your templates (tpl_…) and base templates (base_…).",
|
|
36
|
-
"http": {
|
|
37
|
-
|
|
67
|
+
"http": {
|
|
68
|
+
"method": "GET",
|
|
69
|
+
"path": "/api/templates/{id}"
|
|
70
|
+
},
|
|
71
|
+
"args": [
|
|
72
|
+
{
|
|
73
|
+
"name": "id",
|
|
74
|
+
"in": "path"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
38
77
|
"returns": "any"
|
|
39
78
|
},
|
|
40
79
|
{
|
|
41
80
|
"name": "createTemplate",
|
|
42
81
|
"summary": "Create a template. Pass `baseId` to clone a base template into your own, or provide name/subject/html/text/theme directly.",
|
|
43
|
-
"http": {
|
|
44
|
-
|
|
82
|
+
"http": {
|
|
83
|
+
"method": "POST",
|
|
84
|
+
"path": "/api/templates"
|
|
85
|
+
},
|
|
86
|
+
"args": [
|
|
87
|
+
{
|
|
88
|
+
"name": "body",
|
|
89
|
+
"in": "body",
|
|
90
|
+
"schema": "create-template-request"
|
|
91
|
+
}
|
|
92
|
+
],
|
|
45
93
|
"returns": "any"
|
|
46
94
|
},
|
|
47
95
|
{
|
|
48
96
|
"name": "listDomains",
|
|
49
97
|
"summary": "List your domains, each with its webhook URL.",
|
|
50
|
-
"http": {
|
|
98
|
+
"http": {
|
|
99
|
+
"method": "GET",
|
|
100
|
+
"path": "/api/domains"
|
|
101
|
+
},
|
|
51
102
|
"args": [],
|
|
52
103
|
"returns": "any"
|
|
53
104
|
},
|
|
54
105
|
{
|
|
55
106
|
"name": "createDomain",
|
|
56
107
|
"summary": "Add a domain. Returns the domain + DNS records.",
|
|
57
|
-
"http": {
|
|
58
|
-
|
|
108
|
+
"http": {
|
|
109
|
+
"method": "POST",
|
|
110
|
+
"path": "/api/domains"
|
|
111
|
+
},
|
|
112
|
+
"args": [
|
|
113
|
+
{
|
|
114
|
+
"name": "body",
|
|
115
|
+
"in": "body",
|
|
116
|
+
"schema": "create-domain-request"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
59
119
|
"returns": "any"
|
|
60
120
|
},
|
|
61
121
|
{
|
|
62
122
|
"name": "getDomain",
|
|
63
123
|
"summary": "Get one domain with DNS records + webhook.",
|
|
64
|
-
"http": {
|
|
65
|
-
|
|
124
|
+
"http": {
|
|
125
|
+
"method": "GET",
|
|
126
|
+
"path": "/api/domains/{id}"
|
|
127
|
+
},
|
|
128
|
+
"args": [
|
|
129
|
+
{
|
|
130
|
+
"name": "id",
|
|
131
|
+
"in": "path"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
66
134
|
"returns": "any"
|
|
67
135
|
},
|
|
68
136
|
{
|
|
69
137
|
"name": "deleteDomain",
|
|
70
138
|
"summary": "Remove a domain.",
|
|
71
|
-
"http": {
|
|
72
|
-
|
|
139
|
+
"http": {
|
|
140
|
+
"method": "DELETE",
|
|
141
|
+
"path": "/api/domains/{id}"
|
|
142
|
+
},
|
|
143
|
+
"args": [
|
|
144
|
+
{
|
|
145
|
+
"name": "id",
|
|
146
|
+
"in": "path"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
73
149
|
"returns": "any"
|
|
74
150
|
},
|
|
75
151
|
{
|
|
76
152
|
"name": "verifyDomain",
|
|
77
153
|
"summary": "Check DNS and update status.",
|
|
78
|
-
"http": {
|
|
79
|
-
|
|
154
|
+
"http": {
|
|
155
|
+
"method": "POST",
|
|
156
|
+
"path": "/api/domains/{id}/verify"
|
|
157
|
+
},
|
|
158
|
+
"args": [
|
|
159
|
+
{
|
|
160
|
+
"name": "id",
|
|
161
|
+
"in": "path"
|
|
162
|
+
}
|
|
163
|
+
],
|
|
80
164
|
"returns": "any"
|
|
81
165
|
},
|
|
82
166
|
{
|
|
83
167
|
"name": "setWebhook",
|
|
84
168
|
"summary": "Set or replace the domain's catch-all webhook.",
|
|
85
|
-
"http": {
|
|
169
|
+
"http": {
|
|
170
|
+
"method": "PUT",
|
|
171
|
+
"path": "/api/domains/{id}/webhook"
|
|
172
|
+
},
|
|
86
173
|
"args": [
|
|
87
|
-
{
|
|
88
|
-
|
|
174
|
+
{
|
|
175
|
+
"name": "id",
|
|
176
|
+
"in": "path"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "body",
|
|
180
|
+
"in": "body",
|
|
181
|
+
"schema": "set-webhook-request"
|
|
182
|
+
}
|
|
89
183
|
],
|
|
90
184
|
"returns": "any"
|
|
91
185
|
},
|
|
92
186
|
{
|
|
93
187
|
"name": "deleteWebhook",
|
|
94
188
|
"summary": "Remove the domain's webhook.",
|
|
95
|
-
"http": {
|
|
96
|
-
|
|
189
|
+
"http": {
|
|
190
|
+
"method": "DELETE",
|
|
191
|
+
"path": "/api/domains/{id}/webhook"
|
|
192
|
+
},
|
|
193
|
+
"args": [
|
|
194
|
+
{
|
|
195
|
+
"name": "id",
|
|
196
|
+
"in": "path"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
97
199
|
"returns": "any"
|
|
98
200
|
},
|
|
99
201
|
{
|
|
100
202
|
"name": "testWebhook",
|
|
101
203
|
"summary": "Send a signed test event to the domain's webhook.",
|
|
102
|
-
"http": {
|
|
103
|
-
|
|
204
|
+
"http": {
|
|
205
|
+
"method": "POST",
|
|
206
|
+
"path": "/api/domains/{id}/webhook/test"
|
|
207
|
+
},
|
|
208
|
+
"args": [
|
|
209
|
+
{
|
|
210
|
+
"name": "id",
|
|
211
|
+
"in": "path"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
104
214
|
"returns": "any"
|
|
105
215
|
},
|
|
106
216
|
{
|
|
107
217
|
"name": "checkDomainAvailability",
|
|
108
218
|
"summary": "Check whether a domain is available to register, and at what price. Read-only — no charge.",
|
|
109
|
-
"http": {
|
|
110
|
-
|
|
219
|
+
"http": {
|
|
220
|
+
"method": "GET",
|
|
221
|
+
"path": "/api/domains/register/check"
|
|
222
|
+
},
|
|
223
|
+
"args": [
|
|
224
|
+
{
|
|
225
|
+
"name": "domain",
|
|
226
|
+
"in": "query"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
111
229
|
"returns": "any"
|
|
112
230
|
},
|
|
113
231
|
{
|
|
114
232
|
"name": "registerDomain",
|
|
115
233
|
"summary": "Register (buy) a domain on the customer's behalf; provisions mail DNS and adds it to the account in one call. Charges the registrar.",
|
|
116
|
-
"http": {
|
|
117
|
-
|
|
234
|
+
"http": {
|
|
235
|
+
"method": "POST",
|
|
236
|
+
"path": "/api/domains/register"
|
|
237
|
+
},
|
|
238
|
+
"args": [
|
|
239
|
+
{
|
|
240
|
+
"name": "body",
|
|
241
|
+
"in": "body",
|
|
242
|
+
"schema": "register-domain-request"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
118
245
|
"returns": "any",
|
|
119
246
|
"agentConfirm": true
|
|
120
247
|
},
|
|
121
248
|
{
|
|
122
249
|
"name": "listRoutes",
|
|
123
250
|
"summary": "List inbound routing rules.",
|
|
124
|
-
"http": {
|
|
251
|
+
"http": {
|
|
252
|
+
"method": "GET",
|
|
253
|
+
"path": "/api/routes"
|
|
254
|
+
},
|
|
125
255
|
"args": [],
|
|
126
256
|
"returns": "any"
|
|
127
257
|
},
|
|
128
258
|
{
|
|
129
259
|
"name": "createRoute",
|
|
130
260
|
"summary": "Create a route (match, action, destination).",
|
|
131
|
-
"http": {
|
|
132
|
-
|
|
261
|
+
"http": {
|
|
262
|
+
"method": "POST",
|
|
263
|
+
"path": "/api/routes"
|
|
264
|
+
},
|
|
265
|
+
"args": [
|
|
266
|
+
{
|
|
267
|
+
"name": "body",
|
|
268
|
+
"in": "body",
|
|
269
|
+
"schema": "create-route-request"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
133
272
|
"returns": "any"
|
|
134
273
|
},
|
|
135
274
|
{
|
|
136
275
|
"name": "agent",
|
|
137
276
|
"summary": "Send a message to one of your inbox agents and get its reply. Defaults to the account's default agent; pass `routeId` or `address` to target a specific agent, or `model` to override the model. This is separate from inbound routing — it does not match or override routes.",
|
|
138
|
-
"http": {
|
|
139
|
-
|
|
277
|
+
"http": {
|
|
278
|
+
"method": "POST",
|
|
279
|
+
"path": "/v1/agent"
|
|
280
|
+
},
|
|
281
|
+
"args": [
|
|
282
|
+
{
|
|
283
|
+
"name": "message",
|
|
284
|
+
"in": "body",
|
|
285
|
+
"schema": "agent-request"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
140
288
|
"returns": "agent-response"
|
|
141
289
|
},
|
|
142
290
|
{
|
|
143
291
|
"name": "route",
|
|
144
292
|
"summary": "Route a message to one of your registered routes (by `routeId` or `address`), running that route's action — agent, webhook, or forward. The route must already exist on your account; arbitrary destinations are not allowed.",
|
|
145
|
-
"http": {
|
|
146
|
-
|
|
293
|
+
"http": {
|
|
294
|
+
"method": "POST",
|
|
295
|
+
"path": "/v1/route"
|
|
296
|
+
},
|
|
297
|
+
"args": [
|
|
298
|
+
{
|
|
299
|
+
"name": "message",
|
|
300
|
+
"in": "body",
|
|
301
|
+
"schema": "route-message-request"
|
|
302
|
+
}
|
|
303
|
+
],
|
|
147
304
|
"returns": "route-response"
|
|
148
305
|
},
|
|
149
306
|
{
|
|
150
307
|
"name": "listMessages",
|
|
151
308
|
"summary": "List stored messages.",
|
|
152
|
-
"http": {
|
|
309
|
+
"http": {
|
|
310
|
+
"method": "GET",
|
|
311
|
+
"path": "/api/messages"
|
|
312
|
+
},
|
|
153
313
|
"args": [],
|
|
154
314
|
"returns": "any"
|
|
155
315
|
},
|
|
156
316
|
{
|
|
157
317
|
"name": "getMessage",
|
|
158
318
|
"summary": "Get a message with deliveries + attachments.",
|
|
159
|
-
"http": {
|
|
160
|
-
|
|
319
|
+
"http": {
|
|
320
|
+
"method": "GET",
|
|
321
|
+
"path": "/api/messages/{id}"
|
|
322
|
+
},
|
|
323
|
+
"args": [
|
|
324
|
+
{
|
|
325
|
+
"name": "id",
|
|
326
|
+
"in": "path"
|
|
327
|
+
}
|
|
328
|
+
],
|
|
161
329
|
"returns": "any"
|
|
162
330
|
},
|
|
163
331
|
{
|
|
164
332
|
"name": "retryDelivery",
|
|
165
333
|
"summary": "Re-deliver a stored message to its webhook.",
|
|
166
|
-
"http": {
|
|
167
|
-
|
|
334
|
+
"http": {
|
|
335
|
+
"method": "POST",
|
|
336
|
+
"path": "/api/deliveries/{id}/retry"
|
|
337
|
+
},
|
|
338
|
+
"args": [
|
|
339
|
+
{
|
|
340
|
+
"name": "id",
|
|
341
|
+
"in": "path"
|
|
342
|
+
}
|
|
343
|
+
],
|
|
168
344
|
"returns": "any"
|
|
169
345
|
},
|
|
170
346
|
{
|
|
171
347
|
"name": "verifyWebhook",
|
|
172
348
|
"summary": "Verify the `x-mailkite-signature` header on an inbound webhook delivery. Runs entirely locally (HMAC-SHA256 over `${t}.${payload}`) — no network call. Returns true only when the signature matches and the event is within the freshness window.",
|
|
173
349
|
"local": true,
|
|
174
|
-
"args": [
|
|
350
|
+
"args": [
|
|
351
|
+
{
|
|
352
|
+
"name": "body",
|
|
353
|
+
"in": "body",
|
|
354
|
+
"schema": "verify-webhook-request"
|
|
355
|
+
}
|
|
356
|
+
],
|
|
175
357
|
"returns": "boolean"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"name": "replyOk",
|
|
361
|
+
"summary": "The acknowledgement body a webhook consumer returns to confirm it processed the event — the string `{\"status\":\"ok\"}`. Send it with a 2xx when the route is in `ack` mode (or always — it's harmless in `lenient` mode). Local, no network call.",
|
|
362
|
+
"local": true,
|
|
363
|
+
"args": [],
|
|
364
|
+
"returns": "string",
|
|
365
|
+
"sdkOnly": true
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"name": "replySpam",
|
|
369
|
+
"summary": "Control-mode reply a webhook consumer returns to tell MailKite to mark the message as spam — the string `{\"status\":\"spam\"}`. Local, no network call.",
|
|
370
|
+
"local": true,
|
|
371
|
+
"args": [],
|
|
372
|
+
"returns": "string",
|
|
373
|
+
"sdkOnly": true
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"name": "replyDrop",
|
|
377
|
+
"summary": "Control-mode reply a webhook consumer returns to tell MailKite to drop (discard) the message — the string `{\"status\":\"drop\"}`. Local, no network call.",
|
|
378
|
+
"local": true,
|
|
379
|
+
"args": [],
|
|
380
|
+
"returns": "string",
|
|
381
|
+
"sdkOnly": true
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"name": "replyBlockSender",
|
|
385
|
+
"summary": "Control-mode reply a webhook consumer returns to tell MailKite to block the sender — the string `{\"status\":\"ok\",\"actions\":[{\"type\":\"block-sender\"}]}`. Local, no network call.",
|
|
386
|
+
"local": true,
|
|
387
|
+
"args": [],
|
|
388
|
+
"returns": "string",
|
|
389
|
+
"sdkOnly": true
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"name": "encrypt",
|
|
393
|
+
"summary": "Encrypt a UTF-8 string to a domain's RSA public key (SPKI/PEM), returning the at-rest envelope JSON (`{v,keyAlg,fp,enc,iv,wrappedKey,ciphertext}`). Hybrid scheme: a fresh AES-256-GCM content key wrapped with RSA-OAEP(SHA-256) — byte-compatible with MailKite's own at-rest encryption. Local, no network call.",
|
|
394
|
+
"local": true,
|
|
395
|
+
"args": [
|
|
396
|
+
{
|
|
397
|
+
"name": "body",
|
|
398
|
+
"in": "body",
|
|
399
|
+
"schema": "encrypt-request"
|
|
400
|
+
}
|
|
401
|
+
],
|
|
402
|
+
"returns": "string",
|
|
403
|
+
"sdkOnly": true
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
"name": "decrypt",
|
|
407
|
+
"summary": "Decrypt a MailKite at-rest envelope JSON with your RSA private key (PKCS8/PEM), returning the original UTF-8 string. Reverses `encrypt` / MailKite's at-rest encryption (RSA-OAEP(SHA-256) unwrap → AES-256-GCM open). Local, no network call.",
|
|
408
|
+
"local": true,
|
|
409
|
+
"args": [
|
|
410
|
+
{
|
|
411
|
+
"name": "body",
|
|
412
|
+
"in": "body",
|
|
413
|
+
"schema": "decrypt-request"
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
"returns": "string",
|
|
417
|
+
"sdkOnly": true
|
|
176
418
|
}
|
|
177
419
|
]
|
|
178
420
|
}
|