groundmail-mcp 0.18.0 → 0.19.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 +46 -17
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -477,7 +477,7 @@ var migrationOutput = object(
|
|
|
477
477
|
object(
|
|
478
478
|
{
|
|
479
479
|
id: string("Import id"),
|
|
480
|
-
provider: string("sendgrid, postmark or
|
|
480
|
+
provider: string("sendgrid, postmark, mailgun, resend or ses"),
|
|
481
481
|
dry_run: boolean("True for a preview: nothing was written"),
|
|
482
482
|
status: string("completed, partial (some items failed, each listed), failed, or in_progress"),
|
|
483
483
|
started_at: string("When the import started (ISO 8601)"),
|
|
@@ -1071,23 +1071,48 @@ async function callMcpTool(client, name, args) {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
case "import_from_provider": {
|
|
1073
1073
|
const provider = optString(args, "provider");
|
|
1074
|
-
if (provider !== "sendgrid" && provider !== "postmark" && provider !== "mailgun") {
|
|
1075
|
-
return textResult("Missing or unknown provider: use sendgrid, postmark or
|
|
1074
|
+
if (provider !== "sendgrid" && provider !== "postmark" && provider !== "mailgun" && provider !== "resend" && provider !== "ses") {
|
|
1075
|
+
return textResult("Missing or unknown provider: use sendgrid, postmark, mailgun, resend or ses", true);
|
|
1076
1076
|
}
|
|
1077
|
-
const apiKey = optString(args, "api_key");
|
|
1078
|
-
if (!apiKey) return textResult("Missing required argument: api_key (the key of the account to import from)", true);
|
|
1079
|
-
const region = optString(args, "region");
|
|
1080
1077
|
const resources = optStringArray(args, "resources");
|
|
1081
1078
|
const cursor = optString(args, "cursor");
|
|
1082
|
-
const
|
|
1083
|
-
provider,
|
|
1084
|
-
api_key: apiKey,
|
|
1085
|
-
...optString(args, "account_api_key") ? { account_api_key: optString(args, "account_api_key") } : {},
|
|
1086
|
-
...region === "us" || region === "eu" ? { region } : {},
|
|
1079
|
+
const common = {
|
|
1087
1080
|
...resources?.length ? { resources } : {},
|
|
1088
1081
|
...optBoolean(args, "dry_run") ? { dry_run: true } : {},
|
|
1089
1082
|
...cursor ? { cursor } : {}
|
|
1090
1083
|
};
|
|
1084
|
+
let params;
|
|
1085
|
+
if (provider === "ses") {
|
|
1086
|
+
const accessKeyId = optString(args, "aws_access_key_id");
|
|
1087
|
+
const secret = optString(args, "aws_secret_access_key");
|
|
1088
|
+
const awsRegion = optString(args, "aws_region");
|
|
1089
|
+
if (!accessKeyId || !secret || !awsRegion) {
|
|
1090
|
+
return textResult(
|
|
1091
|
+
"Amazon SES needs aws_access_key_id, aws_secret_access_key and aws_region (one region per import), from an IAM user or role with the read-only import policy: https://docs.groundmail.dev/migrations#amazon-ses-iam-policy",
|
|
1092
|
+
true
|
|
1093
|
+
);
|
|
1094
|
+
}
|
|
1095
|
+
const sessionToken = optString(args, "aws_session_token");
|
|
1096
|
+
params = {
|
|
1097
|
+
provider,
|
|
1098
|
+
aws_access_key_id: accessKeyId,
|
|
1099
|
+
aws_secret_access_key: secret,
|
|
1100
|
+
...sessionToken ? { aws_session_token: sessionToken } : {},
|
|
1101
|
+
aws_region: awsRegion,
|
|
1102
|
+
...common
|
|
1103
|
+
};
|
|
1104
|
+
} else {
|
|
1105
|
+
const apiKey = optString(args, "api_key");
|
|
1106
|
+
if (!apiKey) return textResult("Missing required argument: api_key (the key of the account to import from)", true);
|
|
1107
|
+
const region = optString(args, "region");
|
|
1108
|
+
params = {
|
|
1109
|
+
provider,
|
|
1110
|
+
api_key: apiKey,
|
|
1111
|
+
...optString(args, "account_api_key") ? { account_api_key: optString(args, "account_api_key") } : {},
|
|
1112
|
+
...region === "us" || region === "eu" ? { region } : {},
|
|
1113
|
+
...common
|
|
1114
|
+
};
|
|
1115
|
+
}
|
|
1091
1116
|
return textResult({ migration: await client.migrations.run(params) });
|
|
1092
1117
|
}
|
|
1093
1118
|
case "get_import_report": {
|
|
@@ -1799,17 +1824,21 @@ var MCP_TOOLS = [
|
|
|
1799
1824
|
},
|
|
1800
1825
|
{
|
|
1801
1826
|
name: "import_from_provider",
|
|
1802
|
-
description: "Beta. Import templates, suppressions (bounces, complaints, unsubscribes), sending domains and webhooks from SendGrid, Postmark or
|
|
1827
|
+
description: "Beta. Import templates, suppressions (bounces, complaints, unsubscribes), sending domains and webhooks from SendGrid, Postmark, Mailgun, Resend or Amazon SES into Groundmail. Ask the user for their provider API key (Resend: a Full access key; Amazon SES: an access key with the read-only import policy, and the region); it is used for this import only and never stored, so do not write it to a file. Run with dry_run first to show the user what will be imported. Imported webhooks start disabled; Amazon SES has no webhooks, so its configuration sets are reported in the notes instead. Templates that use logic Groundmail does not convert are imported as drafts. The result includes what needs attention, the code change, and a prompt for making it.",
|
|
1803
1828
|
inputSchema: {
|
|
1804
1829
|
type: "object",
|
|
1805
1830
|
properties: {
|
|
1806
|
-
provider: { type: "string", enum: ["sendgrid", "postmark", "mailgun"], description: "Provider to import from" },
|
|
1831
|
+
provider: { type: "string", enum: ["sendgrid", "postmark", "mailgun", "resend", "ses"], description: "Provider to import from (ses = Amazon SES)" },
|
|
1807
1832
|
api_key: {
|
|
1808
1833
|
type: "string",
|
|
1809
|
-
description: "SendGrid API key, Postmark server API token,
|
|
1834
|
+
description: "Not for ses. SendGrid API key, Postmark server API token, Mailgun private API key (read access is enough), or a Resend API key with Full access"
|
|
1810
1835
|
},
|
|
1811
1836
|
account_api_key: { type: "string", description: "Postmark only: account API token, needed to import sending domains" },
|
|
1812
1837
|
region: { type: "string", enum: ["us", "eu"], description: "SendGrid and Mailgun: eu for EU-region accounts (default us)" },
|
|
1838
|
+
aws_access_key_id: { type: "string", description: "Amazon SES only: access key ID of an IAM user or role with the read-only import policy" },
|
|
1839
|
+
aws_secret_access_key: { type: "string", description: "Amazon SES only: the secret access key" },
|
|
1840
|
+
aws_session_token: { type: "string", description: "Amazon SES only, temporary credentials: the session token" },
|
|
1841
|
+
aws_region: { type: "string", description: "Amazon SES only: the region to import, such as us-east-1. One region per import" },
|
|
1813
1842
|
resources: {
|
|
1814
1843
|
type: "array",
|
|
1815
1844
|
items: { type: "string", enum: ["domains", "webhooks", "templates", "suppressions"] },
|
|
@@ -1818,7 +1847,7 @@ var MCP_TOOLS = [
|
|
|
1818
1847
|
dry_run: { type: "boolean", description: "Preview without writing anything" },
|
|
1819
1848
|
cursor: { type: "string", description: "next_cursor from an import that stopped early, to continue it" }
|
|
1820
1849
|
},
|
|
1821
|
-
required: ["provider"
|
|
1850
|
+
required: ["provider"]
|
|
1822
1851
|
},
|
|
1823
1852
|
outputSchema: migrationOutput,
|
|
1824
1853
|
// Re-running skips what already exists, so it is safe to repeat.
|
|
@@ -1832,7 +1861,7 @@ var MCP_TOOLS = [
|
|
|
1832
1861
|
},
|
|
1833
1862
|
{
|
|
1834
1863
|
name: "get_import_report",
|
|
1835
|
-
description: "Beta. The stored report of an import from SendGrid, Postmark or
|
|
1864
|
+
description: "Beta. The stored report of an import from SendGrid, Postmark, Mailgun, Resend or Amazon SES: what was imported, skipped and failed, the DNS changes per domain, what still needs doing, the code change and a prompt for it. Pass the import id, or omit it for the latest import. Previews are not stored.",
|
|
1836
1865
|
inputSchema: {
|
|
1837
1866
|
type: "object",
|
|
1838
1867
|
properties: {
|
|
@@ -1902,7 +1931,7 @@ function resolveApiKey() {
|
|
|
1902
1931
|
}
|
|
1903
1932
|
|
|
1904
1933
|
// src/server.ts
|
|
1905
|
-
var MCP_SERVER_VERSION = "0.
|
|
1934
|
+
var MCP_SERVER_VERSION = "0.19.0";
|
|
1906
1935
|
var MCP_SERVER_INSTRUCTIONS = [
|
|
1907
1936
|
"Groundmail sends transactional email from domains the user has verified.",
|
|
1908
1937
|
'To test before a domain is verified, call send_email with from "noreply@mail.groundmail.dev" and to set to the Groundmail account email; sandbox sends to any other address are rejected.',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groundmail-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.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.32.1",
|
|
44
|
-
"groundmail": "0.
|
|
44
|
+
"groundmail": "0.31.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"tsup": "^8.5.0",
|