gadgethumans-mcp 1.2.1 → 1.2.2

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/index.js +6 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -26,7 +26,7 @@ const REST_BASE = process.env.GADGETHUMANS_REST || "https://api.gadgethumans.com
26
26
 
27
27
  // A 402 is the moment a caller decides whether we are real. Give it a ready-to-run
28
28
  // proof call instead of a pricing lecture: most tool names are the REST route's own
29
- // slug, so the same tool can be answered free (3/day per IP) with ?trial=1.
29
+ // slug, so the same tool can be answered free (25/day per IP) with ?trial=1.
30
30
  function trialUrl(name, args) {
31
31
  if (!/^[a-z0-9][a-z0-9._-]{0,60}$/i.test(name || "")) return "";
32
32
  const qs = new URLSearchParams();
@@ -35,11 +35,14 @@ function trialUrl(name, args) {
35
35
  qs.set(k, String(v));
36
36
  }
37
37
  qs.set("trial", "1");
38
- return `${REST_BASE}/${name}?${qs.toString()}`;
38
+ // MCP tool names use underscores; the paid routes are hyphenated. Without this the "free
39
+ // proof call" we hand a caller at the 402 moment answers 404 Unknown endpoint.
40
+ const slug = name.replace(/_/g, "-");
41
+ return `${REST_BASE}/${slug}?${qs.toString()}`;
39
42
  }
40
43
 
41
44
  const server = new Server(
42
- { name: "gadgethumans-mcp", version: "1.2.0" },
45
+ { name: "gadgethumans-mcp", version: "1.2.2" },
43
46
  { capabilities: { tools: {} } }
44
47
  );
45
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gadgethumans-mcp",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "MCP server for the GadgetHumans API: 226 tools in one install (ocr, ens, token safety, translate, sentiment, whois, hash, geocode, dns, weather, vat, timezone, ip, search, and a free x402 catalogue search ranked by measured 30-day call volume). Prepaid credits key or x402 USDC on Base.",
5
5
  "mcpName": "com.gadgethumans/gadgethumans-mcp",
6
6
  "type": "module",