groundmail-mcp 0.25.2 → 0.27.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 +184 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -803,6 +803,76 @@ 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
+ watch_only: boolean("Every check runs and is recorded, and verify always answers success"),
815
+ last_check_at: nullableString("When this site last had a check (ISO 8601)"),
816
+ created_at: string("Created at (ISO 8601)")
817
+ };
818
+ var burrowGuardSiteRequired = ["id", "name", "site_key", "allowed_hostnames"];
819
+ var burrowGuardSitesOutput = object(
820
+ { data: arrayOf(object(burrowGuardSiteProperties, burrowGuardSiteRequired), "Every BurrowGuard site") },
821
+ ["data"]
822
+ );
823
+ var burrowGuardSiteOutput = object(burrowGuardSiteProperties, burrowGuardSiteRequired);
824
+ var burrowGuardSiteCreatedOutput = object(
825
+ {
826
+ ...burrowGuardSiteProperties,
827
+ secret: string("Site secret (gm_bg_\u2026), returned once. Put it in the app environment as GROUNDMAIL_BURROWGUARD_SECRET")
828
+ },
829
+ [...burrowGuardSiteRequired, "secret"]
830
+ );
831
+ var burrowGuardChecksOutput = object(
832
+ {
833
+ data: arrayOf(
834
+ object(
835
+ {
836
+ id: string("Check id"),
837
+ site_id: string("Site id"),
838
+ created_at: string("When (ISO 8601)"),
839
+ email_domain: nullableString("The address domain. The address itself is never stored"),
840
+ result: string("passed, blocked or no_token"),
841
+ reason: nullableString("Why it did not pass"),
842
+ reason_label: nullableString("The reason in words"),
843
+ ip: nullableString("The visitor IP when the challenge was issued"),
844
+ user_agent: nullableString("The visitor user agent when the challenge was issued"),
845
+ watch_only: boolean("The site was on watch only: result is what would have happened, and nobody was turned away")
846
+ },
847
+ ["id", "site_id", "created_at", "result"]
848
+ ),
849
+ "Recent checks, newest first"
850
+ ),
851
+ has_more: boolean("More checks after this page"),
852
+ next_cursor: nullableString("Cursor for the next page"),
853
+ stats: described(object(
854
+ {
855
+ checked: number("Checks in the range"),
856
+ passed: number("Passed"),
857
+ blocked: number("Blocked"),
858
+ would_block: number("Would have been blocked on a watch-only site. Not in blocked"),
859
+ no_token: number("No token: the script did not run and the email checks passed"),
860
+ top_reason: nullableString("The most common block reason")
861
+ },
862
+ ["checked", "passed", "blocked"]
863
+ ), "Totals for the range"),
864
+ usage: described(object(
865
+ {
866
+ month: string("Month, YYYY-MM"),
867
+ used: number("Checks this month"),
868
+ limit: number("Free checks a month"),
869
+ limited: boolean("Over the limit: sign-ups pass unchecked until next month")
870
+ },
871
+ ["month", "used", "limit", "limited"]
872
+ ), "Free checks used this month")
873
+ },
874
+ ["data"]
875
+ );
806
876
 
807
877
  // src/tools.ts
808
878
  var DNS_PROVIDERS = ["cloudflare", "godaddy", "vercel", "netlify", "digitalocean", "dnsimple"];
@@ -1054,6 +1124,41 @@ async function callMcpTool(client, name, args) {
1054
1124
  })
1055
1125
  );
1056
1126
  }
1127
+ case "list_burrowguard_sites": {
1128
+ return textResult(await client.burrowguard.sites.list());
1129
+ }
1130
+ case "create_burrowguard_site": {
1131
+ const siteName = optString(args, "name");
1132
+ const hostnames = Array.isArray(args.allowed_hostnames) ? args.allowed_hostnames.filter((host) => typeof host === "string") : [];
1133
+ if (!siteName) return textResult("Missing required argument: name", true);
1134
+ const emailOnly = args.email_checks_only === true;
1135
+ if (hostnames.length === 0 && !emailOnly) return textResult("Missing required argument: allowed_hostnames", true);
1136
+ return textResult(
1137
+ await client.burrowguard.sites.create({
1138
+ name: siteName,
1139
+ ...hostnames.length > 0 ? { allowed_hostnames: hostnames } : {},
1140
+ ...emailOnly ? { email_checks_only: true } : {},
1141
+ ...typeof args.block_free_webmail === "boolean" ? { block_free_webmail: args.block_free_webmail } : {},
1142
+ ...typeof args.allow_data_center_ips === "boolean" ? { allow_data_center_ips: args.allow_data_center_ips } : {},
1143
+ ...typeof args.watch_only === "boolean" ? { watch_only: args.watch_only } : {}
1144
+ })
1145
+ );
1146
+ }
1147
+ case "update_burrowguard_site": {
1148
+ const siteId = optString(args, "id");
1149
+ if (!siteId) return textResult("Missing required argument: id", true);
1150
+ if (typeof args.watch_only !== "boolean") return textResult("Missing required argument: watch_only", true);
1151
+ return textResult(await client.burrowguard.sites.update(siteId, { watch_only: args.watch_only }));
1152
+ }
1153
+ case "list_burrowguard_checks": {
1154
+ const checkResult = optString(args, "result");
1155
+ return textResult(
1156
+ await client.burrowguard.checks.list({
1157
+ ...optString(args, "site") ? { site: optString(args, "site") } : {},
1158
+ ...checkResult ? { result: checkResult } : {}
1159
+ })
1160
+ );
1161
+ }
1057
1162
  case "validate_email": {
1058
1163
  const email = optString(args, "email");
1059
1164
  if (!email) return textResult("Missing required argument: email", true);
@@ -1757,6 +1862,84 @@ var MCP_TOOLS = [
1757
1862
  outputSchema: pagedOutput("data", suppressionItem, "Suppressed addresses on this page"),
1758
1863
  annotations: readOnly("List suppressions")
1759
1864
  },
1865
+ {
1866
+ name: "list_burrowguard_sites",
1867
+ 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.",
1868
+ inputSchema: { type: "object", properties: {} },
1869
+ outputSchema: burrowGuardSitesOutput,
1870
+ annotations: readOnly("List BurrowGuard sites")
1871
+ },
1872
+ {
1873
+ name: "create_burrowguard_site",
1874
+ 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`,
1875
+ inputSchema: {
1876
+ type: "object",
1877
+ properties: {
1878
+ name: { type: "string", description: 'A label for this form, for example "Sign-up form"' },
1879
+ allowed_hostnames: {
1880
+ type: "array",
1881
+ items: { type: "string" },
1882
+ description: "Hostnames the form runs on. Include localhost while building. Required unless email_checks_only is true."
1883
+ },
1884
+ block_free_webmail: { type: "boolean", description: "For B2B forms: turn away Gmail, Outlook and other personal addresses" },
1885
+ allow_data_center_ips: { type: "boolean", description: "Let through visitors on hosting and cloud networks" },
1886
+ email_checks_only: {
1887
+ type: "boolean",
1888
+ 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"
1889
+ },
1890
+ watch_only: {
1891
+ type: "boolean",
1892
+ description: "Run every check and show what would be blocked, without blocking anyone: verify always answers success. Good for the first week on a live form"
1893
+ }
1894
+ },
1895
+ required: ["name"]
1896
+ },
1897
+ outputSchema: burrowGuardSiteCreatedOutput,
1898
+ annotations: {
1899
+ title: "Create BurrowGuard site",
1900
+ readOnlyHint: false,
1901
+ destructiveHint: false,
1902
+ idempotentHint: false,
1903
+ openWorldHint: false
1904
+ }
1905
+ },
1906
+ {
1907
+ name: "update_burrowguard_site",
1908
+ description: "Turn watch only on or off for a BurrowGuard site. On, every check runs and shows what would be blocked, and nobody is turned away. Off, the site starts blocking.",
1909
+ inputSchema: {
1910
+ type: "object",
1911
+ properties: {
1912
+ id: { type: "string", description: "The site's id" },
1913
+ watch_only: { type: "boolean", description: "True to only watch, false to start blocking" }
1914
+ },
1915
+ required: ["id", "watch_only"]
1916
+ },
1917
+ outputSchema: burrowGuardSiteOutput,
1918
+ annotations: {
1919
+ title: "Update BurrowGuard site",
1920
+ readOnlyHint: false,
1921
+ destructiveHint: false,
1922
+ idempotentHint: true,
1923
+ openWorldHint: false
1924
+ }
1925
+ },
1926
+ {
1927
+ name: "list_burrowguard_checks",
1928
+ description: "Recent BurrowGuard checks with totals and this month's usage: time, email domain, result and reason. With watch_only true, result is what would have happened and nobody was turned away. The address itself is never stored.",
1929
+ inputSchema: {
1930
+ type: "object",
1931
+ properties: {
1932
+ site: { type: "string", description: "Only this site (its id)" },
1933
+ result: {
1934
+ type: "string",
1935
+ enum: ["passed", "blocked", "would_block", "no_token"],
1936
+ description: "Only this result. blocked is real blocks; would_block is the same on a watch-only site"
1937
+ }
1938
+ }
1939
+ },
1940
+ outputSchema: burrowGuardChecksOutput,
1941
+ annotations: readOnly("List BurrowGuard checks")
1942
+ },
1760
1943
  {
1761
1944
  name: "validate_email",
1762
1945
  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.",
@@ -2301,7 +2484,7 @@ function resolveApiKey() {
2301
2484
  }
2302
2485
 
2303
2486
  // src/server.ts
2304
- var MCP_SERVER_VERSION = "0.25.0";
2487
+ var MCP_SERVER_VERSION = "0.27.0";
2305
2488
  var MCP_SERVER_INSTRUCTIONS = [
2306
2489
  "Groundmail sends transactional email from domains the user has verified.",
2307
2490
  '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.25.2",
3
+ "version": "0.27.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.42.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "tsup": "^8.5.0",