@mailkite/mcp 0.3.0 → 0.4.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 +244 -42
- package/spec/cases.json +589 -108
- package/spec/schemas/decrypt-request.json +19 -0
- package/spec/schemas/encrypt-request.json +19 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailkite/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.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.4.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.4.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,369 @@
|
|
|
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
|
},
|
|
19
28
|
{
|
|
20
29
|
"name": "listTemplates",
|
|
21
30
|
"summary": "List your saved email templates (light metadata only — no body). Use getTemplate for the full template.",
|
|
22
|
-
"http": {
|
|
31
|
+
"http": {
|
|
32
|
+
"method": "GET",
|
|
33
|
+
"path": "/api/templates"
|
|
34
|
+
},
|
|
23
35
|
"args": [],
|
|
24
36
|
"returns": "any"
|
|
25
37
|
},
|
|
26
38
|
{
|
|
27
39
|
"name": "listBaseTemplates",
|
|
28
40
|
"summary": "List the premade base templates (light metadata). Clone one with createTemplate({ baseId }) or send from it directly via send({ templateId }).",
|
|
29
|
-
"http": {
|
|
41
|
+
"http": {
|
|
42
|
+
"method": "GET",
|
|
43
|
+
"path": "/api/templates/base"
|
|
44
|
+
},
|
|
30
45
|
"args": [],
|
|
31
46
|
"returns": "any"
|
|
32
47
|
},
|
|
33
48
|
{
|
|
34
49
|
"name": "getTemplate",
|
|
35
50
|
"summary": "Get one template (full: subject, html, text, theme). Works for your templates (tpl_…) and base templates (base_…).",
|
|
36
|
-
"http": {
|
|
37
|
-
|
|
51
|
+
"http": {
|
|
52
|
+
"method": "GET",
|
|
53
|
+
"path": "/api/templates/{id}"
|
|
54
|
+
},
|
|
55
|
+
"args": [
|
|
56
|
+
{
|
|
57
|
+
"name": "id",
|
|
58
|
+
"in": "path"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
38
61
|
"returns": "any"
|
|
39
62
|
},
|
|
40
63
|
{
|
|
41
64
|
"name": "createTemplate",
|
|
42
65
|
"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
|
-
|
|
66
|
+
"http": {
|
|
67
|
+
"method": "POST",
|
|
68
|
+
"path": "/api/templates"
|
|
69
|
+
},
|
|
70
|
+
"args": [
|
|
71
|
+
{
|
|
72
|
+
"name": "body",
|
|
73
|
+
"in": "body",
|
|
74
|
+
"schema": "create-template-request"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
45
77
|
"returns": "any"
|
|
46
78
|
},
|
|
47
79
|
{
|
|
48
80
|
"name": "listDomains",
|
|
49
81
|
"summary": "List your domains, each with its webhook URL.",
|
|
50
|
-
"http": {
|
|
82
|
+
"http": {
|
|
83
|
+
"method": "GET",
|
|
84
|
+
"path": "/api/domains"
|
|
85
|
+
},
|
|
51
86
|
"args": [],
|
|
52
87
|
"returns": "any"
|
|
53
88
|
},
|
|
54
89
|
{
|
|
55
90
|
"name": "createDomain",
|
|
56
91
|
"summary": "Add a domain. Returns the domain + DNS records.",
|
|
57
|
-
"http": {
|
|
58
|
-
|
|
92
|
+
"http": {
|
|
93
|
+
"method": "POST",
|
|
94
|
+
"path": "/api/domains"
|
|
95
|
+
},
|
|
96
|
+
"args": [
|
|
97
|
+
{
|
|
98
|
+
"name": "body",
|
|
99
|
+
"in": "body",
|
|
100
|
+
"schema": "create-domain-request"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
59
103
|
"returns": "any"
|
|
60
104
|
},
|
|
61
105
|
{
|
|
62
106
|
"name": "getDomain",
|
|
63
107
|
"summary": "Get one domain with DNS records + webhook.",
|
|
64
|
-
"http": {
|
|
65
|
-
|
|
108
|
+
"http": {
|
|
109
|
+
"method": "GET",
|
|
110
|
+
"path": "/api/domains/{id}"
|
|
111
|
+
},
|
|
112
|
+
"args": [
|
|
113
|
+
{
|
|
114
|
+
"name": "id",
|
|
115
|
+
"in": "path"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
66
118
|
"returns": "any"
|
|
67
119
|
},
|
|
68
120
|
{
|
|
69
121
|
"name": "deleteDomain",
|
|
70
122
|
"summary": "Remove a domain.",
|
|
71
|
-
"http": {
|
|
72
|
-
|
|
123
|
+
"http": {
|
|
124
|
+
"method": "DELETE",
|
|
125
|
+
"path": "/api/domains/{id}"
|
|
126
|
+
},
|
|
127
|
+
"args": [
|
|
128
|
+
{
|
|
129
|
+
"name": "id",
|
|
130
|
+
"in": "path"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
73
133
|
"returns": "any"
|
|
74
134
|
},
|
|
75
135
|
{
|
|
76
136
|
"name": "verifyDomain",
|
|
77
137
|
"summary": "Check DNS and update status.",
|
|
78
|
-
"http": {
|
|
79
|
-
|
|
138
|
+
"http": {
|
|
139
|
+
"method": "POST",
|
|
140
|
+
"path": "/api/domains/{id}/verify"
|
|
141
|
+
},
|
|
142
|
+
"args": [
|
|
143
|
+
{
|
|
144
|
+
"name": "id",
|
|
145
|
+
"in": "path"
|
|
146
|
+
}
|
|
147
|
+
],
|
|
80
148
|
"returns": "any"
|
|
81
149
|
},
|
|
82
150
|
{
|
|
83
151
|
"name": "setWebhook",
|
|
84
152
|
"summary": "Set or replace the domain's catch-all webhook.",
|
|
85
|
-
"http": {
|
|
153
|
+
"http": {
|
|
154
|
+
"method": "PUT",
|
|
155
|
+
"path": "/api/domains/{id}/webhook"
|
|
156
|
+
},
|
|
86
157
|
"args": [
|
|
87
|
-
{
|
|
88
|
-
|
|
158
|
+
{
|
|
159
|
+
"name": "id",
|
|
160
|
+
"in": "path"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"name": "body",
|
|
164
|
+
"in": "body",
|
|
165
|
+
"schema": "set-webhook-request"
|
|
166
|
+
}
|
|
89
167
|
],
|
|
90
168
|
"returns": "any"
|
|
91
169
|
},
|
|
92
170
|
{
|
|
93
171
|
"name": "deleteWebhook",
|
|
94
172
|
"summary": "Remove the domain's webhook.",
|
|
95
|
-
"http": {
|
|
96
|
-
|
|
173
|
+
"http": {
|
|
174
|
+
"method": "DELETE",
|
|
175
|
+
"path": "/api/domains/{id}/webhook"
|
|
176
|
+
},
|
|
177
|
+
"args": [
|
|
178
|
+
{
|
|
179
|
+
"name": "id",
|
|
180
|
+
"in": "path"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
97
183
|
"returns": "any"
|
|
98
184
|
},
|
|
99
185
|
{
|
|
100
186
|
"name": "testWebhook",
|
|
101
187
|
"summary": "Send a signed test event to the domain's webhook.",
|
|
102
|
-
"http": {
|
|
103
|
-
|
|
188
|
+
"http": {
|
|
189
|
+
"method": "POST",
|
|
190
|
+
"path": "/api/domains/{id}/webhook/test"
|
|
191
|
+
},
|
|
192
|
+
"args": [
|
|
193
|
+
{
|
|
194
|
+
"name": "id",
|
|
195
|
+
"in": "path"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
104
198
|
"returns": "any"
|
|
105
199
|
},
|
|
106
200
|
{
|
|
107
201
|
"name": "checkDomainAvailability",
|
|
108
202
|
"summary": "Check whether a domain is available to register, and at what price. Read-only — no charge.",
|
|
109
|
-
"http": {
|
|
110
|
-
|
|
203
|
+
"http": {
|
|
204
|
+
"method": "GET",
|
|
205
|
+
"path": "/api/domains/register/check"
|
|
206
|
+
},
|
|
207
|
+
"args": [
|
|
208
|
+
{
|
|
209
|
+
"name": "domain",
|
|
210
|
+
"in": "query"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
111
213
|
"returns": "any"
|
|
112
214
|
},
|
|
113
215
|
{
|
|
114
216
|
"name": "registerDomain",
|
|
115
217
|
"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
|
-
|
|
218
|
+
"http": {
|
|
219
|
+
"method": "POST",
|
|
220
|
+
"path": "/api/domains/register"
|
|
221
|
+
},
|
|
222
|
+
"args": [
|
|
223
|
+
{
|
|
224
|
+
"name": "body",
|
|
225
|
+
"in": "body",
|
|
226
|
+
"schema": "register-domain-request"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
118
229
|
"returns": "any",
|
|
119
230
|
"agentConfirm": true
|
|
120
231
|
},
|
|
121
232
|
{
|
|
122
233
|
"name": "listRoutes",
|
|
123
234
|
"summary": "List inbound routing rules.",
|
|
124
|
-
"http": {
|
|
235
|
+
"http": {
|
|
236
|
+
"method": "GET",
|
|
237
|
+
"path": "/api/routes"
|
|
238
|
+
},
|
|
125
239
|
"args": [],
|
|
126
240
|
"returns": "any"
|
|
127
241
|
},
|
|
128
242
|
{
|
|
129
243
|
"name": "createRoute",
|
|
130
244
|
"summary": "Create a route (match, action, destination).",
|
|
131
|
-
"http": {
|
|
132
|
-
|
|
245
|
+
"http": {
|
|
246
|
+
"method": "POST",
|
|
247
|
+
"path": "/api/routes"
|
|
248
|
+
},
|
|
249
|
+
"args": [
|
|
250
|
+
{
|
|
251
|
+
"name": "body",
|
|
252
|
+
"in": "body",
|
|
253
|
+
"schema": "create-route-request"
|
|
254
|
+
}
|
|
255
|
+
],
|
|
133
256
|
"returns": "any"
|
|
134
257
|
},
|
|
135
258
|
{
|
|
136
259
|
"name": "agent",
|
|
137
260
|
"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
|
-
|
|
261
|
+
"http": {
|
|
262
|
+
"method": "POST",
|
|
263
|
+
"path": "/v1/agent"
|
|
264
|
+
},
|
|
265
|
+
"args": [
|
|
266
|
+
{
|
|
267
|
+
"name": "message",
|
|
268
|
+
"in": "body",
|
|
269
|
+
"schema": "agent-request"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
140
272
|
"returns": "agent-response"
|
|
141
273
|
},
|
|
142
274
|
{
|
|
143
275
|
"name": "route",
|
|
144
276
|
"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
|
-
|
|
277
|
+
"http": {
|
|
278
|
+
"method": "POST",
|
|
279
|
+
"path": "/v1/route"
|
|
280
|
+
},
|
|
281
|
+
"args": [
|
|
282
|
+
{
|
|
283
|
+
"name": "message",
|
|
284
|
+
"in": "body",
|
|
285
|
+
"schema": "route-message-request"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
147
288
|
"returns": "route-response"
|
|
148
289
|
},
|
|
149
290
|
{
|
|
150
291
|
"name": "listMessages",
|
|
151
292
|
"summary": "List stored messages.",
|
|
152
|
-
"http": {
|
|
293
|
+
"http": {
|
|
294
|
+
"method": "GET",
|
|
295
|
+
"path": "/api/messages"
|
|
296
|
+
},
|
|
153
297
|
"args": [],
|
|
154
298
|
"returns": "any"
|
|
155
299
|
},
|
|
156
300
|
{
|
|
157
301
|
"name": "getMessage",
|
|
158
302
|
"summary": "Get a message with deliveries + attachments.",
|
|
159
|
-
"http": {
|
|
160
|
-
|
|
303
|
+
"http": {
|
|
304
|
+
"method": "GET",
|
|
305
|
+
"path": "/api/messages/{id}"
|
|
306
|
+
},
|
|
307
|
+
"args": [
|
|
308
|
+
{
|
|
309
|
+
"name": "id",
|
|
310
|
+
"in": "path"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
161
313
|
"returns": "any"
|
|
162
314
|
},
|
|
163
315
|
{
|
|
164
316
|
"name": "retryDelivery",
|
|
165
317
|
"summary": "Re-deliver a stored message to its webhook.",
|
|
166
|
-
"http": {
|
|
167
|
-
|
|
318
|
+
"http": {
|
|
319
|
+
"method": "POST",
|
|
320
|
+
"path": "/api/deliveries/{id}/retry"
|
|
321
|
+
},
|
|
322
|
+
"args": [
|
|
323
|
+
{
|
|
324
|
+
"name": "id",
|
|
325
|
+
"in": "path"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
168
328
|
"returns": "any"
|
|
169
329
|
},
|
|
170
330
|
{
|
|
171
331
|
"name": "verifyWebhook",
|
|
172
332
|
"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
333
|
"local": true,
|
|
174
|
-
"args": [
|
|
334
|
+
"args": [
|
|
335
|
+
{
|
|
336
|
+
"name": "body",
|
|
337
|
+
"in": "body",
|
|
338
|
+
"schema": "verify-webhook-request"
|
|
339
|
+
}
|
|
340
|
+
],
|
|
175
341
|
"returns": "boolean"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "replyOk",
|
|
345
|
+
"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.",
|
|
346
|
+
"local": true,
|
|
347
|
+
"args": [],
|
|
348
|
+
"returns": "string",
|
|
349
|
+
"sdkOnly": true
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "encrypt",
|
|
353
|
+
"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.",
|
|
354
|
+
"local": true,
|
|
355
|
+
"args": [
|
|
356
|
+
{
|
|
357
|
+
"name": "body",
|
|
358
|
+
"in": "body",
|
|
359
|
+
"schema": "encrypt-request"
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
"returns": "string",
|
|
363
|
+
"sdkOnly": true
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"name": "decrypt",
|
|
367
|
+
"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.",
|
|
368
|
+
"local": true,
|
|
369
|
+
"args": [
|
|
370
|
+
{
|
|
371
|
+
"name": "body",
|
|
372
|
+
"in": "body",
|
|
373
|
+
"schema": "decrypt-request"
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
"returns": "string",
|
|
377
|
+
"sdkOnly": true
|
|
176
378
|
}
|
|
177
379
|
]
|
|
178
380
|
}
|