groundmail-mcp 0.25.2 → 0.26.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.
Files changed (2) hide show
  1. package/dist/index.js +144 -0
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -803,6 +803,72 @@ var receivedEmailItem = object(
803
803
  },
804
804
  ["id", "from", "subject"]
805
805
  );
806
+ var burrowGuardSiteProperties = {
807
+ id: string("Site id"),
808
+ name: string("Label for this form"),
809
+ site_key: string("Public site key (gm_site_\u2026): goes in the page"),
810
+ allowed_hostnames: stringArray("Hostnames the form runs on"),
811
+ block_free_webmail: boolean("Turns away personal addresses such as Gmail and Outlook"),
812
+ allow_data_center_ips: boolean("Lets through visitors on hosting and cloud networks"),
813
+ email_checks_only: boolean("No script or token: verify takes the email and runs the address checks only"),
814
+ last_check_at: nullableString("When this site last had a check (ISO 8601)"),
815
+ created_at: string("Created at (ISO 8601)")
816
+ };
817
+ var burrowGuardSiteRequired = ["id", "name", "site_key", "allowed_hostnames"];
818
+ var burrowGuardSitesOutput = object(
819
+ { data: arrayOf(object(burrowGuardSiteProperties, burrowGuardSiteRequired), "Every BurrowGuard site") },
820
+ ["data"]
821
+ );
822
+ var burrowGuardSiteCreatedOutput = object(
823
+ {
824
+ ...burrowGuardSiteProperties,
825
+ secret: string("Site secret (gm_bg_\u2026), returned once. Put it in the app environment as GROUNDMAIL_BURROWGUARD_SECRET")
826
+ },
827
+ [...burrowGuardSiteRequired, "secret"]
828
+ );
829
+ var burrowGuardChecksOutput = object(
830
+ {
831
+ data: arrayOf(
832
+ object(
833
+ {
834
+ id: string("Check id"),
835
+ site_id: string("Site id"),
836
+ created_at: string("When (ISO 8601)"),
837
+ email_domain: nullableString("The address domain. The address itself is never stored"),
838
+ result: string("passed, blocked or no_token"),
839
+ reason: nullableString("Why it did not pass"),
840
+ reason_label: nullableString("The reason in words"),
841
+ ip: nullableString("The visitor IP when the challenge was issued"),
842
+ user_agent: nullableString("The visitor user agent when the challenge was issued")
843
+ },
844
+ ["id", "site_id", "created_at", "result"]
845
+ ),
846
+ "Recent checks, newest first"
847
+ ),
848
+ has_more: boolean("More checks after this page"),
849
+ next_cursor: nullableString("Cursor for the next page"),
850
+ stats: described(object(
851
+ {
852
+ checked: number("Checks in the range"),
853
+ passed: number("Passed"),
854
+ blocked: number("Blocked"),
855
+ no_token: number("No token: the script did not run and the email checks passed"),
856
+ top_reason: nullableString("The most common block reason")
857
+ },
858
+ ["checked", "passed", "blocked"]
859
+ ), "Totals for the range"),
860
+ usage: described(object(
861
+ {
862
+ month: string("Month, YYYY-MM"),
863
+ used: number("Checks this month"),
864
+ limit: number("Free checks a month"),
865
+ limited: boolean("Over the limit: sign-ups pass unchecked until next month")
866
+ },
867
+ ["month", "used", "limit", "limited"]
868
+ ), "Free checks used this month")
869
+ },
870
+ ["data"]
871
+ );
806
872
 
807
873
  // src/tools.ts
808
874
  var DNS_PROVIDERS = ["cloudflare", "godaddy", "vercel", "netlify", "digitalocean", "dnsimple"];
@@ -1054,6 +1120,34 @@ async function callMcpTool(client, name, args) {
1054
1120
  })
1055
1121
  );
1056
1122
  }
1123
+ case "list_burrowguard_sites": {
1124
+ return textResult(await client.burrowguard.sites.list());
1125
+ }
1126
+ case "create_burrowguard_site": {
1127
+ const siteName = optString(args, "name");
1128
+ const hostnames = Array.isArray(args.allowed_hostnames) ? args.allowed_hostnames.filter((host) => typeof host === "string") : [];
1129
+ if (!siteName) return textResult("Missing required argument: name", true);
1130
+ const emailOnly = args.email_checks_only === true;
1131
+ if (hostnames.length === 0 && !emailOnly) return textResult("Missing required argument: allowed_hostnames", true);
1132
+ return textResult(
1133
+ await client.burrowguard.sites.create({
1134
+ name: siteName,
1135
+ ...hostnames.length > 0 ? { allowed_hostnames: hostnames } : {},
1136
+ ...emailOnly ? { email_checks_only: true } : {},
1137
+ ...typeof args.block_free_webmail === "boolean" ? { block_free_webmail: args.block_free_webmail } : {},
1138
+ ...typeof args.allow_data_center_ips === "boolean" ? { allow_data_center_ips: args.allow_data_center_ips } : {}
1139
+ })
1140
+ );
1141
+ }
1142
+ case "list_burrowguard_checks": {
1143
+ const checkResult = optString(args, "result");
1144
+ return textResult(
1145
+ await client.burrowguard.checks.list({
1146
+ ...optString(args, "site") ? { site: optString(args, "site") } : {},
1147
+ ...checkResult ? { result: checkResult } : {}
1148
+ })
1149
+ );
1150
+ }
1057
1151
  case "validate_email": {
1058
1152
  const email = optString(args, "email");
1059
1153
  if (!email) return textResult("Missing required argument: email", true);
@@ -1757,6 +1851,56 @@ var MCP_TOOLS = [
1757
1851
  outputSchema: pagedOutput("data", suppressionItem, "Suppressed addresses on this page"),
1758
1852
  annotations: readOnly("List suppressions")
1759
1853
  },
1854
+ {
1855
+ name: "list_burrowguard_sites",
1856
+ description: "List BurrowGuard sites: the sign-up and contact forms protected against bots and bad addresses. Shows each public site key, allowed hostnames and options. Secrets are never listed.",
1857
+ inputSchema: { type: "object", properties: {} },
1858
+ outputSchema: burrowGuardSitesOutput,
1859
+ annotations: readOnly("List BurrowGuard sites")
1860
+ },
1861
+ {
1862
+ name: "create_burrowguard_site",
1863
+ description: `Create a BurrowGuard site for a form. Free. Returns the public site_key for the page and the secret, once: write the secret straight to the app's environment as GROUNDMAIL_BURROWGUARD_SECRET, never into source code, and do not repeat it in chat. Then add the script and <burrow-guard site-key="..."> beside the email field, and call POST /burrowguard/verify from the server. Install: https://docs.groundmail.dev/burrowguard`,
1864
+ inputSchema: {
1865
+ type: "object",
1866
+ properties: {
1867
+ name: { type: "string", description: 'A label for this form, for example "Sign-up form"' },
1868
+ allowed_hostnames: {
1869
+ type: "array",
1870
+ items: { type: "string" },
1871
+ description: "Hostnames the form runs on. Include localhost while building. Required unless email_checks_only is true."
1872
+ },
1873
+ block_free_webmail: { type: "boolean", description: "For B2B forms: turn away Gmail, Outlook and other personal addresses" },
1874
+ allow_data_center_ips: { type: "boolean", description: "Let through visitors on hosting and cloud networks" },
1875
+ email_checks_only: {
1876
+ type: "boolean",
1877
+ description: "For a form already behind a captcha: no script, tag or box, and verify takes just the email. allowed_hostnames can then be left out"
1878
+ }
1879
+ },
1880
+ required: ["name"]
1881
+ },
1882
+ outputSchema: burrowGuardSiteCreatedOutput,
1883
+ annotations: {
1884
+ title: "Create BurrowGuard site",
1885
+ readOnlyHint: false,
1886
+ destructiveHint: false,
1887
+ idempotentHint: false,
1888
+ openWorldHint: false
1889
+ }
1890
+ },
1891
+ {
1892
+ name: "list_burrowguard_checks",
1893
+ description: "Recent BurrowGuard checks with totals and this month's usage: time, email domain, result and reason. The address itself is never stored.",
1894
+ inputSchema: {
1895
+ type: "object",
1896
+ properties: {
1897
+ site: { type: "string", description: "Only this site (its id)" },
1898
+ result: { type: "string", enum: ["passed", "blocked", "no_token"], description: "Only this result" }
1899
+ }
1900
+ },
1901
+ outputSchema: burrowGuardChecksOutput,
1902
+ annotations: readOnly("List BurrowGuard checks")
1903
+ },
1760
1904
  {
1761
1905
  name: "validate_email",
1762
1906
  description: "Check one email address with Groundmail validation before accepting it (for example at signup): verdict valid | risky | invalid, reasons (including likely_bot_signup, a pattern check that can be wrong), a typo suggestion, and disposable / role flags. Free; sends nothing.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "groundmail-mcp",
3
- "version": "0.25.2",
3
+ "version": "0.26.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.2",
44
- "groundmail": "0.40.0"
44
+ "groundmail": "0.41.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "tsup": "^8.5.0",