groundmail-mcp 0.12.1 → 0.13.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.js +26 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -162,7 +162,8 @@ var emailItem = object(
|
|
|
162
162
|
bounced_at: nullableString("When the email bounced (ISO 8601)"),
|
|
163
163
|
opened_at: nullableString("First open (ISO 8601); needs open tracking on the sending domain"),
|
|
164
164
|
clicked_at: nullableString("First tracked-link click (ISO 8601); needs click tracking on the sending domain"),
|
|
165
|
-
tenant: nullableString("External id of the tenant the email was sent as. Present only when it was sent as a tenant")
|
|
165
|
+
tenant: nullableString("External id of the tenant the email was sent as. Present only when it was sent as a tenant"),
|
|
166
|
+
stream: string("Mail stream it went out on: transactional, product or newsletter (each sends from its own IPs)")
|
|
166
167
|
},
|
|
167
168
|
["id", "from", "to", "subject", "status"]
|
|
168
169
|
);
|
|
@@ -628,6 +629,11 @@ async function callMcpTool(client, name, args) {
|
|
|
628
629
|
if (!templateId && !subject) {
|
|
629
630
|
return textResult("Provide subject, or template_id / template_alias", true);
|
|
630
631
|
}
|
|
632
|
+
const categoryRaw = optString(args, "category");
|
|
633
|
+
if (categoryRaw && categoryRaw !== "transactional" && categoryRaw !== "product" && categoryRaw !== "newsletter") {
|
|
634
|
+
return textResult("category must be transactional, product or newsletter", true);
|
|
635
|
+
}
|
|
636
|
+
const category = categoryRaw;
|
|
631
637
|
const variables = args.variables && typeof args.variables === "object" && !Array.isArray(args.variables) ? args.variables : void 0;
|
|
632
638
|
const result = await client.emails.send({
|
|
633
639
|
from,
|
|
@@ -636,17 +642,24 @@ async function callMcpTool(client, name, args) {
|
|
|
636
642
|
html: optString(args, "html"),
|
|
637
643
|
text: optString(args, "text"),
|
|
638
644
|
reply_to: optString(args, "reply_to"),
|
|
645
|
+
...category ? { category } : {},
|
|
639
646
|
...optString(args, "tenant") ? { tenant: optString(args, "tenant") } : {},
|
|
640
647
|
...templateId ? { template: { id: templateId, ...variables ? { variables } : {} } } : {}
|
|
641
648
|
});
|
|
642
649
|
return textResult(result);
|
|
643
650
|
}
|
|
644
651
|
case "list_emails": {
|
|
652
|
+
const streamRaw = optString(args, "stream");
|
|
653
|
+
if (streamRaw && streamRaw !== "transactional" && streamRaw !== "product" && streamRaw !== "newsletter") {
|
|
654
|
+
return textResult("stream must be transactional, product or newsletter", true);
|
|
655
|
+
}
|
|
656
|
+
const stream = streamRaw;
|
|
645
657
|
const result = await client.emails.list({
|
|
646
658
|
limit: optNumber(args, "limit"),
|
|
647
659
|
cursor: optString(args, "cursor"),
|
|
648
660
|
...typeof args.test === "boolean" ? { test: args.test } : {},
|
|
649
|
-
...optString(args, "tenant") ? { tenant: optString(args, "tenant") } : {}
|
|
661
|
+
...optString(args, "tenant") ? { tenant: optString(args, "tenant") } : {},
|
|
662
|
+
...stream ? { stream } : {}
|
|
650
663
|
});
|
|
651
664
|
return textResult(result);
|
|
652
665
|
}
|
|
@@ -1007,6 +1020,11 @@ var MCP_TOOLS = [
|
|
|
1007
1020
|
description: "Template variables when using template_id or template_alias",
|
|
1008
1021
|
additionalProperties: true
|
|
1009
1022
|
},
|
|
1023
|
+
category: {
|
|
1024
|
+
type: "string",
|
|
1025
|
+
enum: ["transactional", "product", "newsletter"],
|
|
1026
|
+
description: "transactional (default): sign-in codes, receipts, alerts. product: onboarding, lifecycle and notification email, with one-click unsubscribe. newsletter: opt-in newsletters, for approved accounts only (otherwise the send fails with newsletter_not_enabled), sent from separate IPs with one-click unsubscribe"
|
|
1027
|
+
},
|
|
1010
1028
|
tenant: tenantProp(
|
|
1011
1029
|
"Send as this tenant: the send uses its domains, suppression list, pause switch and daily limit. Omit to send from the account as a whole"
|
|
1012
1030
|
)
|
|
@@ -1030,7 +1048,12 @@ var MCP_TOOLS = [
|
|
|
1030
1048
|
properties: {
|
|
1031
1049
|
...paginationProps,
|
|
1032
1050
|
test: { type: "boolean", description: "true: only test emails; false: only live ones. Omit for both" },
|
|
1033
|
-
tenant: tenantProp("Only emails sent as this tenant")
|
|
1051
|
+
tenant: tenantProp("Only emails sent as this tenant"),
|
|
1052
|
+
stream: {
|
|
1053
|
+
type: "string",
|
|
1054
|
+
enum: ["transactional", "product", "newsletter"],
|
|
1055
|
+
description: "Only emails sent on this mail stream"
|
|
1056
|
+
}
|
|
1034
1057
|
}
|
|
1035
1058
|
},
|
|
1036
1059
|
outputSchema: pagedOutput("emails", emailItem, "Emails on this page, newest first"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groundmail-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"mcpName": "io.github.Groundmail/groundmail",
|
|
5
5
|
"description": "Groundmail MCP server: send transactional email, manage domains, templates, webhooks and suppressions from Claude, Cursor, ChatGPT and other MCP clients",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
44
|
-
"groundmail": "0.
|
|
44
|
+
"groundmail": "0.22.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"tsup": "^8.5.0",
|