groundmail-mcp 0.14.3 → 0.14.4
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 +10 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -699,11 +699,7 @@ async function callMcpTool(client, name, args) {
|
|
|
699
699
|
true
|
|
700
700
|
);
|
|
701
701
|
}
|
|
702
|
-
const
|
|
703
|
-
const result = await client.domains.apply(domain, {
|
|
704
|
-
provider: providerRaw,
|
|
705
|
-
...credentials ? { credentials } : {}
|
|
706
|
-
});
|
|
702
|
+
const result = await client.domains.apply(domain, { provider: providerRaw });
|
|
707
703
|
return textResult(result);
|
|
708
704
|
}
|
|
709
705
|
case "verify_domain": {
|
|
@@ -1049,6 +1045,8 @@ var readOnly = (title) => ({
|
|
|
1049
1045
|
idempotentHint: true,
|
|
1050
1046
|
openWorldHint: false
|
|
1051
1047
|
});
|
|
1048
|
+
var HTTP_EXCLUDED_TOOLS = /* @__PURE__ */ new Set(["import_from_provider"]);
|
|
1049
|
+
var HTTP_EXCLUDED_TOOL_MESSAGE = "import_from_provider is not available on the hosted Groundmail MCP server, because it needs your other provider's API key. Import from the dashboard at https://app.groundmail.dev/import, or run the local server (npx -y groundmail-mcp) where the key stays on your machine.";
|
|
1052
1050
|
var MCP_TOOLS = [
|
|
1053
1051
|
{
|
|
1054
1052
|
name: "send_email",
|
|
@@ -1157,7 +1155,7 @@ var MCP_TOOLS = [
|
|
|
1157
1155
|
},
|
|
1158
1156
|
{
|
|
1159
1157
|
name: "apply_domain_dns",
|
|
1160
|
-
description: "Apply Groundmail DNS records for a domain through Cloudflare, Vercel or GoDaddy
|
|
1158
|
+
description: "Apply Groundmail DNS records for a domain through Cloudflare, Vercel or GoDaddy, using the provider account connected in the dashboard. If none is connected, ask the user to connect it at https://app.groundmail.dev/integrations (never ask for the provider token in chat), or have them publish the records from create_domain by hand.",
|
|
1161
1159
|
inputSchema: {
|
|
1162
1160
|
type: "object",
|
|
1163
1161
|
properties: {
|
|
@@ -1166,10 +1164,6 @@ var MCP_TOOLS = [
|
|
|
1166
1164
|
type: "string",
|
|
1167
1165
|
enum: ["cloudflare", "godaddy", "vercel"],
|
|
1168
1166
|
description: "DNS provider that hosts the domain"
|
|
1169
|
-
},
|
|
1170
|
-
credentials: {
|
|
1171
|
-
type: "object",
|
|
1172
|
-
description: "Optional one-time credentials: Cloudflare apiToken (and zoneId), Vercel apiToken (and teamId), or GoDaddy apiKey and apiSecret"
|
|
1173
1167
|
}
|
|
1174
1168
|
},
|
|
1175
1169
|
required: ["domain", "provider"]
|
|
@@ -1698,7 +1692,7 @@ function resolveApiKey() {
|
|
|
1698
1692
|
}
|
|
1699
1693
|
|
|
1700
1694
|
// src/server.ts
|
|
1701
|
-
var MCP_SERVER_VERSION = "0.
|
|
1695
|
+
var MCP_SERVER_VERSION = "0.14.4";
|
|
1702
1696
|
var MCP_SERVER_INSTRUCTIONS = [
|
|
1703
1697
|
"Groundmail sends transactional email from domains the user has verified.",
|
|
1704
1698
|
'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.',
|
|
@@ -1706,14 +1700,15 @@ var MCP_SERVER_INSTRUCTIONS = [
|
|
|
1706
1700
|
"Confirm with the user before sending email to anyone other than themselves.",
|
|
1707
1701
|
"Errors include a stable code and a link to https://docs.groundmail.dev/errors#<code> that says how to fix them."
|
|
1708
1702
|
].join(" ");
|
|
1709
|
-
function createMcpServer(apiKey, baseUrl) {
|
|
1703
|
+
function createMcpServer(apiKey, baseUrl, options = {}) {
|
|
1704
|
+
const excluded = options.http ? HTTP_EXCLUDED_TOOLS : /* @__PURE__ */ new Set();
|
|
1710
1705
|
const client = new Groundmail(apiKey, baseUrl ? { baseUrl } : {});
|
|
1711
1706
|
const server = new Server(
|
|
1712
1707
|
{ name: "groundmail-mcp", title: "Groundmail", version: MCP_SERVER_VERSION },
|
|
1713
1708
|
{ capabilities: { tools: {} }, instructions: MCP_SERVER_INSTRUCTIONS }
|
|
1714
1709
|
);
|
|
1715
1710
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
1716
|
-
tools: MCP_TOOLS.map((tool) => ({
|
|
1711
|
+
tools: MCP_TOOLS.filter((tool) => !excluded.has(tool.name)).map((tool) => ({
|
|
1717
1712
|
name: tool.name,
|
|
1718
1713
|
description: tool.description,
|
|
1719
1714
|
title: tool.annotations.title,
|
|
@@ -1723,6 +1718,7 @@ function createMcpServer(apiKey, baseUrl) {
|
|
|
1723
1718
|
}))
|
|
1724
1719
|
}));
|
|
1725
1720
|
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
1721
|
+
if (excluded.has(request.params.name)) return textResult(HTTP_EXCLUDED_TOOL_MESSAGE, true);
|
|
1726
1722
|
const result = await callMcpTool(client, request.params.name, request.params.arguments ?? {});
|
|
1727
1723
|
return result;
|
|
1728
1724
|
});
|
|
@@ -1885,7 +1881,7 @@ async function handleHttpRequest(req, res, options = {}) {
|
|
|
1885
1881
|
);
|
|
1886
1882
|
return;
|
|
1887
1883
|
}
|
|
1888
|
-
const server = createMcpServer(apiKey, options.baseUrl);
|
|
1884
|
+
const server = createMcpServer(apiKey, options.baseUrl, { http: true });
|
|
1889
1885
|
const transport = new StreamableHTTPServerTransport({
|
|
1890
1886
|
sessionIdGenerator: void 0
|
|
1891
1887
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groundmail-mcp",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.4",
|
|
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",
|