@cyanheads/whois-mcp-server 0.1.5 → 0.2.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 (52) hide show
  1. package/AGENTS.md +27 -14
  2. package/CLAUDE.md +27 -14
  3. package/Dockerfile +48 -34
  4. package/README.md +30 -35
  5. package/changelog/0.1.x/0.1.6.md +41 -0
  6. package/changelog/0.2.x/0.2.0.md +40 -0
  7. package/dist/app.d.ts +67 -26
  8. package/dist/app.d.ts.map +1 -1
  9. package/dist/app.js +7 -5
  10. package/dist/app.js.map +1 -1
  11. package/dist/mcp-server/tools/definitions/_fqdn.d.ts +9 -3
  12. package/dist/mcp-server/tools/definitions/_fqdn.d.ts.map +1 -1
  13. package/dist/mcp-server/tools/definitions/_fqdn.js +10 -14
  14. package/dist/mcp-server/tools/definitions/_fqdn.js.map +1 -1
  15. package/dist/mcp-server/tools/definitions/whois-check-availability.tool.d.ts +11 -5
  16. package/dist/mcp-server/tools/definitions/whois-check-availability.tool.d.ts.map +1 -1
  17. package/dist/mcp-server/tools/definitions/whois-check-availability.tool.js +25 -40
  18. package/dist/mcp-server/tools/definitions/whois-check-availability.tool.js.map +1 -1
  19. package/dist/mcp-server/tools/definitions/whois-get-dns.tool.d.ts +23 -4
  20. package/dist/mcp-server/tools/definitions/whois-get-dns.tool.d.ts.map +1 -1
  21. package/dist/mcp-server/tools/definitions/whois-get-dns.tool.js +44 -28
  22. package/dist/mcp-server/tools/definitions/whois-get-dns.tool.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/whois-get-dossier.tool.d.ts +0 -5
  24. package/dist/mcp-server/tools/definitions/whois-get-dossier.tool.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/whois-get-dossier.tool.js +58 -53
  26. package/dist/mcp-server/tools/definitions/whois-get-dossier.tool.js.map +1 -1
  27. package/dist/mcp-server/tools/definitions/whois-lookup-asn.tool.d.ts +2 -2
  28. package/dist/mcp-server/tools/definitions/whois-lookup-asn.tool.d.ts.map +1 -1
  29. package/dist/mcp-server/tools/definitions/whois-lookup-asn.tool.js +9 -5
  30. package/dist/mcp-server/tools/definitions/whois-lookup-asn.tool.js.map +1 -1
  31. package/dist/mcp-server/tools/definitions/whois-lookup-domain.tool.d.ts +16 -9
  32. package/dist/mcp-server/tools/definitions/whois-lookup-domain.tool.d.ts.map +1 -1
  33. package/dist/mcp-server/tools/definitions/whois-lookup-domain.tool.js +60 -24
  34. package/dist/mcp-server/tools/definitions/whois-lookup-domain.tool.js.map +1 -1
  35. package/dist/mcp-server/tools/definitions/whois-lookup-ip.tool.d.ts +16 -2
  36. package/dist/mcp-server/tools/definitions/whois-lookup-ip.tool.d.ts.map +1 -1
  37. package/dist/mcp-server/tools/definitions/whois-lookup-ip.tool.js +44 -17
  38. package/dist/mcp-server/tools/definitions/whois-lookup-ip.tool.js.map +1 -1
  39. package/dist/services/doh/doh-service.d.ts +3 -3
  40. package/dist/services/doh/doh-service.d.ts.map +1 -1
  41. package/dist/services/doh/doh-service.js +71 -24
  42. package/dist/services/doh/doh-service.js.map +1 -1
  43. package/dist/services/doh/types.d.ts +16 -0
  44. package/dist/services/doh/types.d.ts.map +1 -1
  45. package/dist/services/rdap/rdap-service.d.ts +20 -8
  46. package/dist/services/rdap/rdap-service.d.ts.map +1 -1
  47. package/dist/services/rdap/rdap-service.js +200 -145
  48. package/dist/services/rdap/rdap-service.js.map +1 -1
  49. package/dist/services/rdap/types.d.ts +32 -2
  50. package/dist/services/rdap/types.d.ts.map +1 -1
  51. package/package.json +14 -12
  52. package/server.json +11 -25
package/dist/app.d.ts CHANGED
@@ -18,15 +18,21 @@ export declare const appOptions: {
18
18
  domain: import("zod").ZodString;
19
19
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
20
20
  domain: import("zod").ZodString;
21
- available: import("zod").ZodNullable<import("zod").ZodBoolean>;
21
+ registration_status: import("zod").ZodEnum<{
22
+ not_found: "not_found";
23
+ registered: "registered";
24
+ unknown: "unknown";
25
+ }>;
26
+ available: import("zod").ZodNullable<import("zod").ZodLiteral<false>>;
22
27
  rdap_coverage: import("zod").ZodBoolean;
23
28
  registrar: import("zod").ZodOptional<import("zod").ZodString>;
24
29
  expiry_date: import("zod").ZodOptional<import("zod").ZodString>;
25
30
  }, import("zod/v4/core").$strip>, readonly [{
26
- readonly reason: "invalid_domain";
31
+ readonly reason: "non_registrable_domain";
27
32
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
28
- readonly when: "Input is not a valid FQDN.";
29
- readonly recovery: "Provide a valid fully-qualified domain name like \"example.com\" or \"sub.example.org\".";
33
+ readonly when: "An ICANN-recognized suffix identifies the query as a subdomain.";
34
+ readonly recovery: "Query the registrable parent named in the error instead; no eligibility is implied.";
35
+ readonly thrownBy: "service";
30
36
  }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
31
37
  domain: import("zod").ZodString;
32
38
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
@@ -51,18 +57,25 @@ export declare const appOptions: {
51
57
  rdap_source_error: import("zod").ZodOptional<import("zod").ZodString>;
52
58
  dns_source_error: import("zod").ZodOptional<import("zod").ZodString>;
53
59
  }, import("zod/v4/core").$strip>, readonly [{
54
- readonly reason: "invalid_domain";
55
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
56
- readonly when: "Input is not a valid FQDN.";
57
- readonly recovery: "Provide a valid fully-qualified domain name like \"example.com\" or \"sub.example.org\".";
58
- }, {
59
60
  readonly reason: "both_legs_failed";
60
61
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
61
62
  readonly when: "Both RDAP and DoH legs failed — no data could be retrieved.";
62
63
  readonly recovery: "Both RDAP and DNS services are unavailable. Retry in a few minutes or check network connectivity.";
63
64
  }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
65
+ include_registrar: import("zod").ZodDefault<import("zod").ZodBoolean>;
64
66
  domain: import("zod").ZodString;
65
67
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
68
+ registrar_detail: import("zod").ZodOptional<import("zod").ZodObject<{
69
+ status: import("zod").ZodEnum<{
70
+ failed: "failed";
71
+ found: "found";
72
+ no_referral: "no_referral";
73
+ }>;
74
+ source: import("zod").ZodOptional<import("zod").ZodString>;
75
+ registrant_org: import("zod").ZodOptional<import("zod").ZodString>;
76
+ registrant_redacted: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBoolean>>;
77
+ source_error: import("zod").ZodOptional<import("zod").ZodString>;
78
+ }, import("zod/v4/core").$strip>>;
66
79
  domain: import("zod").ZodString;
67
80
  rdap_coverage: import("zod").ZodBoolean;
68
81
  handle: import("zod").ZodOptional<import("zod").ZodString>;
@@ -74,15 +87,10 @@ export declare const appOptions: {
74
87
  rdap_last_updated: import("zod").ZodOptional<import("zod").ZodString>;
75
88
  status: import("zod").ZodArray<import("zod").ZodString>;
76
89
  nameservers: import("zod").ZodArray<import("zod").ZodString>;
77
- dnssec_signed: import("zod").ZodBoolean;
90
+ dnssec_signed: import("zod").ZodNullable<import("zod").ZodBoolean>;
78
91
  registrant_org: import("zod").ZodOptional<import("zod").ZodString>;
79
- registrant_redacted: import("zod").ZodBoolean;
92
+ registrant_redacted: import("zod").ZodNullable<import("zod").ZodBoolean>;
80
93
  }, import("zod/v4/core").$strip>, readonly [{
81
- readonly reason: "invalid_domain";
82
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
83
- readonly when: "Input is not a valid FQDN.";
84
- readonly recovery: "Provide a valid fully-qualified domain name like \"example.com\" or \"sub.example.org\".";
85
- }, {
86
94
  readonly reason: "rdap_no_coverage";
87
95
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
88
96
  readonly when: "TLD has no RDAP server in the IANA bootstrap — cannot perform lookup.";
@@ -90,8 +98,8 @@ export declare const appOptions: {
90
98
  }, {
91
99
  readonly reason: "domain_not_found";
92
100
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
93
- readonly when: "RDAP server returned 404 — domain is not registered.";
94
- readonly recovery: "The domain is not registered. Use whois_check_availability to confirm availability for registration.";
101
+ readonly when: "RDAP server returned 404 — no domain record found.";
102
+ readonly recovery: "Use whois_check_availability for record status; a missing record does not establish registration eligibility.";
95
103
  }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
96
104
  domain: import("zod").ZodString;
97
105
  types: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<{
@@ -128,11 +136,30 @@ export declare const appOptions: {
128
136
  cloudflare: "cloudflare";
129
137
  nextdns: "nextdns";
130
138
  }>;
139
+ query_sources: import("zod").ZodArray<import("zod").ZodObject<{
140
+ type: import("zod").ZodEnum<{
141
+ A: "A";
142
+ AAAA: "AAAA";
143
+ CAA: "CAA";
144
+ CNAME: "CNAME";
145
+ MX: "MX";
146
+ NS: "NS";
147
+ PTR: "PTR";
148
+ SOA: "SOA";
149
+ TXT: "TXT";
150
+ }>;
151
+ source: import("zod").ZodEnum<{
152
+ cloudflare: "cloudflare";
153
+ nextdns: "nextdns";
154
+ }>;
155
+ }, import("zod/v4/core").$strip>>;
131
156
  }, import("zod/v4/core").$strip>, readonly [{
132
- readonly reason: "invalid_domain";
133
- readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
134
- readonly when: "Input is not a valid FQDN.";
135
- readonly recovery: "Provide a valid fully-qualified domain name like \"example.com\" or \"sub.example.org\".";
157
+ readonly reason: "dns_response_failed";
158
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable;
159
+ readonly when: "Resolvers return a DNS failure status or truncated response after retry and fallback.";
160
+ readonly recovery: "Retry the DNS query later or choose another record type.";
161
+ readonly thrownBy: "service";
162
+ readonly retryable: true;
136
163
  }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
137
164
  ip: import("zod").ZodString;
138
165
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
@@ -141,6 +168,7 @@ export declare const appOptions: {
141
168
  start_address: import("zod").ZodOptional<import("zod").ZodString>;
142
169
  end_address: import("zod").ZodOptional<import("zod").ZodString>;
143
170
  cidr: import("zod").ZodOptional<import("zod").ZodString>;
171
+ cidrs: import("zod").ZodArray<import("zod").ZodString>;
144
172
  ip_version: import("zod").ZodOptional<import("zod").ZodString>;
145
173
  name: import("zod").ZodOptional<import("zod").ZodString>;
146
174
  type: import("zod").ZodOptional<import("zod").ZodString>;
@@ -148,8 +176,21 @@ export declare const appOptions: {
148
176
  org_name: import("zod").ZodOptional<import("zod").ZodString>;
149
177
  abuse_email: import("zod").ZodOptional<import("zod").ZodString>;
150
178
  ptr: import("zod").ZodNullable<import("zod").ZodString>;
179
+ ptr_status: import("zod").ZodEnum<{
180
+ failed: "failed";
181
+ found: "found";
182
+ not_found: "not_found";
183
+ }>;
184
+ ptr_source_error: import("zod").ZodOptional<import("zod").ZodString>;
151
185
  rdap_source: import("zod").ZodOptional<import("zod").ZodString>;
152
186
  }, import("zod/v4/core").$strip>, readonly [{
187
+ readonly reason: "ip_no_rdap_route";
188
+ readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
189
+ readonly when: "A successfully loaded IANA bootstrap has no covering RIR route.";
190
+ readonly recovery: "Try another address; this range has no RDAP route in the IANA bootstrap.";
191
+ readonly retryable: false;
192
+ readonly thrownBy: "service";
193
+ }, {
153
194
  readonly reason: "invalid_ip";
154
195
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
155
196
  readonly when: "Input is not a valid IPv4, IPv6, or CIDR address.";
@@ -157,8 +198,8 @@ export declare const appOptions: {
157
198
  }, {
158
199
  readonly reason: "private_range";
159
200
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
160
- readonly when: "Input is a private or reserved range — no RIR RDAP record exists for it.";
161
- readonly recovery: "Use a public, globally-routable IP address. RFC 1918, loopback, and link-local addresses have no RIR records.";
201
+ readonly when: "The numeric address falls within the server’s explicit excluded ranges.";
202
+ readonly recovery: "Choose an address outside the excluded ranges listed in this tool’s description.";
162
203
  readonly thrownBy: "service";
163
204
  }, {
164
205
  readonly reason: "ip_not_found";
@@ -181,8 +222,8 @@ export declare const appOptions: {
181
222
  }, import("zod/v4/core").$strip>, readonly [{
182
223
  readonly reason: "invalid_asn";
183
224
  readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
184
- readonly when: "Input does not match AS<number> or bare integer format.";
185
- readonly recovery: "Provide a valid ASN like \"AS15169\" or \"15169\". Numbers must be positive integers.";
225
+ readonly when: "The complete token is not a decimal ASN from 1 to 4294967295.";
226
+ readonly recovery: "Provide a decimal integer from 1 to 4294967295, optionally prefixed with AS and +, such as \"AS15169\" or \"+15169\".";
186
227
  readonly thrownBy: "service";
187
228
  }, {
188
229
  readonly reason: "asn_not_found";
package/dist/app.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,eAAO,MAAM,UAAU;;;IAGrB;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBuB,CAAC"}
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,eAAO,MAAM,UAAU;;;IAGrB;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBuB,CAAC"}
package/dist/app.js CHANGED
@@ -3,6 +3,7 @@
3
3
  * the entry point starts and tests assert against.
4
4
  * @module app
5
5
  */
6
+ import { getServerConfig } from './config/server-config.js';
6
7
  import { whoisCheckAvailability } from './mcp-server/tools/definitions/whois-check-availability.tool.js';
7
8
  import { whoisGetDns } from './mcp-server/tools/definitions/whois-get-dns.tool.js';
8
9
  import { whoisGetDossier } from './mcp-server/tools/definitions/whois-get-dossier.tool.js';
@@ -33,13 +34,14 @@ export const appOptions = {
33
34
  resources: [],
34
35
  prompts: [],
35
36
  instructions: 'whois-mcp-server: domain and IP intelligence via RDAP and DNS-over-HTTPS. No API keys required.\n' +
36
- '- whois_lookup_domain: full registration record (registrar, dates, status, nameservers)\n' +
37
- '- whois_check_availability: is a domain available to register? (RDAP 404 = available)\n' +
38
- '- whois_get_dns: DNS records for any hostname (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA, PTR)\n' +
39
- '- whois_lookup_ip: IP/CIDR netblock, org, abuse contact, and PTR via RIR RDAP\n' +
37
+ '- whois_lookup_domain: registry record; include_registrar opts into separate registrar contact detail\n' +
38
+ '- whois_check_availability: registered/not_found/unknown RDAP record status; absence does not establish registration eligibility\n' +
39
+ '- whois_get_dns: ASCII DNS owner names, including underscores and one root dot (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA, PTR)\n' +
40
+ '- whois_lookup_ip: IP/CIDR netblock CIDRs, org, abuse contact, and found/not_found/failed PTR outcome\n' +
40
41
  '- whois_lookup_asn: ASN to org/RIR resolution\n' +
41
- '- whois_get_dossier: one-call domain triage — registration + DNS in parallel with inferred signals',
42
+ '- whois_get_dossier: domain triage with partial source errors; absent DNSSEC/privacy evidence stays unknown',
42
43
  setup(core) {
44
+ getServerConfig();
43
45
  initRdapService(core.config, core.storage);
44
46
  initDohService(core.config, core.storage);
45
47
  },
package/dist/app.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iEAAiE,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,sDAAsD,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAC3F,OAAO,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,wDAAwD,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,kBAAkB;IACzB;;;;;;OAMG;IACH,WAAW,EAAE,WAAW;IACxB,KAAK,EAAE;QACL,iBAAiB;QACjB,sBAAsB;QACtB,WAAW;QACX,aAAa;QACb,cAAc;QACd,eAAe;KAChB;IACD,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,YAAY,EACV,mGAAmG;QACnG,2FAA2F;QAC3F,yFAAyF;QACzF,8FAA8F;QAC9F,iFAAiF;QACjF,iDAAiD;QACjD,oGAAoG;IACtG,KAAK,CAAC,IAAI;QACR,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC3C,cAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OA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shared FQDN validation used across tool handlers.
2
+ * @fileoverview Serializable identifier grammars shared by lookup schemas.
3
3
  * @module mcp-server/tools/definitions/_fqdn
4
4
  */
5
- /** Simple FQDN validation: labels separated by dots, no consecutive dots, length limits */
6
- export declare function isValidFqdn(domain: string): boolean;
5
+ /** Registration hostname grammar, with exact end-of-input matching. */
6
+ export declare const REGISTRATION_NAME_PATTERN: RegExp;
7
+ /** DNS presentation-name grammar: underscore labels and one optional root dot. */
8
+ export declare const DNS_NAME_PATTERN: RegExp;
9
+ /** Conservative IP/CIDR shape; complete address and prefix validity are semantic. */
10
+ export declare const IP_PATTERN: RegExp;
11
+ /** Accepted ASN spelling, preserving padding, case and surrounding whitespace. */
12
+ export declare const ASN_PATTERN: RegExp;
7
13
  //# sourceMappingURL=_fqdn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"_fqdn.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/_fqdn.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2FAA2F;AAC3F,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAQnD"}
1
+ {"version":3,"file":"_fqdn.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/_fqdn.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,uEAAuE;AACvE,eAAO,MAAM,yBAAyB,QAErC,CAAC;AACF,kFAAkF;AAClF,eAAO,MAAM,gBAAgB,QACwE,CAAC;AACtG,qFAAqF;AACrF,eAAO,MAAM,UAAU,QAA2C,CAAC;AACnE,kFAAkF;AAClF,eAAO,MAAM,WAAW,QAA+C,CAAC"}
@@ -1,18 +1,14 @@
1
1
  /**
2
- * @fileoverview Shared FQDN validation used across tool handlers.
2
+ * @fileoverview Serializable identifier grammars shared by lookup schemas.
3
3
  * @module mcp-server/tools/definitions/_fqdn
4
4
  */
5
- /** Simple FQDN validation: labels separated by dots, no consecutive dots, length limits */
6
- export function isValidFqdn(domain) {
7
- if (!domain || domain.length > 253)
8
- return false;
9
- const labels = domain.split('.');
10
- if (labels.length < 2)
11
- return false;
12
- return labels.every((label) => {
13
- if (!label || label.length > 63)
14
- return false;
15
- return /^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$|^[a-zA-Z0-9]$/.test(label);
16
- });
17
- }
5
+ const HOST_LABEL = '[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?';
6
+ /** Registration hostname grammar, with exact end-of-input matching. */
7
+ export const REGISTRATION_NAME_PATTERN = new RegExp(`^${HOST_LABEL}(?:\\.${HOST_LABEL})+(?![\\s\\S])`);
8
+ /** DNS presentation-name grammar: underscore labels and one optional root dot. */
9
+ export const DNS_NAME_PATTERN = /^(?=[A-Za-z0-9_.-]{1,253}\.?(?![\s\S]))[A-Za-z0-9_-]{1,63}(?:\.[A-Za-z0-9_-]{1,63})+\.?(?![\s\S])/;
10
+ /** Conservative IP/CIDR shape; complete address and prefix validity are semantic. */
11
+ export const IP_PATTERN = /^[0-9A-Fa-f:.]+(?:\/[0-9]+)?(?![\s\S])/;
12
+ /** Accepted ASN spelling, preserving padding, case and surrounding whitespace. */
13
+ export const ASN_PATTERN = /^\s*(?:[Aa][Ss]\s*)?\+?[0-9]+\s*(?![\s\S])/;
18
14
  //# sourceMappingURL=_fqdn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"_fqdn.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/_fqdn.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,2FAA2F;AAC3F,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,GAAG;QAAE,OAAO,KAAK,CAAC;IACjD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACpC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5B,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,EAAE;YAAE,OAAO,KAAK,CAAC;QAC9C,OAAO,wDAAwD,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"_fqdn.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/_fqdn.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,GAAG,+CAA+C,CAAC;AACnE,uEAAuE;AACvE,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,MAAM,CACjD,IAAI,UAAU,SAAS,UAAU,gBAAgB,CAClD,CAAC;AACF,kFAAkF;AAClF,MAAM,CAAC,MAAM,gBAAgB,GAC3B,mGAAmG,CAAC;AACtG,qFAAqF;AACrF,MAAM,CAAC,MAAM,UAAU,GAAG,wCAAwC,CAAC;AACnE,kFAAkF;AAClF,MAAM,CAAC,MAAM,WAAW,GAAG,4CAA4C,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @fileoverview whois_check_availability tool — domain availability check via RDAP 404 semantics.
2
+ * @fileoverview whois_check_availability tool — registry record status without an eligibility guarantee.
3
3
  * @module mcp-server/tools/definitions/whois-check-availability.tool
4
4
  */
5
5
  import { z } from '@cyanheads/mcp-ts-core';
@@ -8,14 +8,20 @@ export declare const whoisCheckAvailability: import("@cyanheads/mcp-ts-core").To
8
8
  domain: z.ZodString;
9
9
  }, z.core.$strip>, z.ZodObject<{
10
10
  domain: z.ZodString;
11
- available: z.ZodNullable<z.ZodBoolean>;
11
+ registration_status: z.ZodEnum<{
12
+ not_found: "not_found";
13
+ registered: "registered";
14
+ unknown: "unknown";
15
+ }>;
16
+ available: z.ZodNullable<z.ZodLiteral<false>>;
12
17
  rdap_coverage: z.ZodBoolean;
13
18
  registrar: z.ZodOptional<z.ZodString>;
14
19
  expiry_date: z.ZodOptional<z.ZodString>;
15
20
  }, z.core.$strip>, readonly [{
16
- readonly reason: "invalid_domain";
21
+ readonly reason: "non_registrable_domain";
17
22
  readonly code: JsonRpcErrorCode.ValidationError;
18
- readonly when: "Input is not a valid FQDN.";
19
- readonly recovery: "Provide a valid fully-qualified domain name like \"example.com\" or \"sub.example.org\".";
23
+ readonly when: "An ICANN-recognized suffix identifies the query as a subdomain.";
24
+ readonly recovery: "Query the registrable parent named in the error instead; no eligibility is implied.";
25
+ readonly thrownBy: "service";
20
26
  }], undefined>;
21
27
  //# sourceMappingURL=whois-check-availability.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"whois-check-availability.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/whois-check-availability.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;cAoGjC,CAAC"}
1
+ {"version":3,"file":"whois-check-availability.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/whois-check-availability.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;cA4FjC,CAAC"}
@@ -1,70 +1,64 @@
1
1
  /**
2
- * @fileoverview whois_check_availability tool — domain availability check via RDAP 404 semantics.
2
+ * @fileoverview whois_check_availability tool — registry record status without an eligibility guarantee.
3
3
  * @module mcp-server/tools/definitions/whois-check-availability.tool
4
4
  */
5
5
  import { tool, z } from '@cyanheads/mcp-ts-core';
6
6
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
7
  import { getRdapService } from '../../../services/rdap/rdap-service.js';
8
- import { isValidFqdn } from './_fqdn.js';
8
+ import { REGISTRATION_NAME_PATTERN } from './_fqdn.js';
9
9
  export const whoisCheckAvailability = tool('whois_check_availability', {
10
- title: 'Domain Availability Check',
11
- description: 'Check whether a domain name is registered or available for registration. Returns available: true when ' +
12
- 'the domain is not registered, available: false with registrar and expiry_date when it is registered, and ' +
13
- 'available: null with rdap_coverage: false when the TLD has no RDAP coverage. ' +
14
- 'Designed for "can I register X" and bulk name sweeps. For the full registration record use whois_lookup_domain.',
10
+ title: 'Domain Registration Status',
11
+ description: 'Check RDAP registry record status: registered, not_found, or unknown when coverage is absent. ' +
12
+ 'available is false for a found record and null otherwise; a registry miss never guarantees registration eligibility. ' +
13
+ 'Known ICANN subdomains are rejected with their registrable parent; private suffixes are not registration boundaries. ' +
14
+ 'For the full record use whois_lookup_domain.',
15
15
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
16
16
  input: z.object({
17
17
  domain: z
18
18
  .string()
19
+ .max(253)
20
+ .regex(REGISTRATION_NAME_PATTERN, 'Provide a dot-separated ASCII hostname such as example.com; labels are 1–63 characters, without underscores, whitespace or a root dot.')
19
21
  .describe('Fully qualified domain name to check (e.g., "myfuturename.com"). ' +
20
22
  'Must be a valid FQDN — labels separated by dots.'),
21
23
  }),
22
24
  output: z.object({
23
25
  domain: z.string().describe('Normalized domain name checked.'),
26
+ registration_status: z
27
+ .enum(['registered', 'not_found', 'unknown'])
28
+ .describe('Registry record present, absent, or RDAP coverage unavailable; never registration eligibility.'),
24
29
  available: z
25
- .boolean()
30
+ .literal(false)
26
31
  .nullable()
27
- .describe('True = available for registration. False = registered. ' +
28
- 'Null = rdap_coverage is false — cannot determine availability for this TLD.'),
32
+ .describe('False when a registration record exists; otherwise null. A registry miss never establishes availability.'),
29
33
  rdap_coverage: z.boolean().describe('True when a RDAP server was found for this TLD.'),
30
34
  registrar: z.string().optional().describe('Registrar name when available: false.'),
31
35
  expiry_date: z.string().optional().describe('Expiry date when available: false.'),
32
36
  }),
33
37
  errors: [
34
38
  {
35
- reason: 'invalid_domain',
39
+ reason: 'non_registrable_domain',
36
40
  code: JsonRpcErrorCode.ValidationError,
37
- when: 'Input is not a valid FQDN.',
38
- recovery: 'Provide a valid fully-qualified domain name like "example.com" or "sub.example.org".',
41
+ when: 'An ICANN-recognized suffix identifies the query as a subdomain.',
42
+ recovery: 'Query the registrable parent named in the error instead; no eligibility is implied.',
43
+ thrownBy: 'service',
39
44
  },
40
45
  ],
41
46
  async handler(input, ctx) {
42
- if (!isValidFqdn(input.domain)) {
43
- throw ctx.fail('invalid_domain', `"${input.domain}" is not a valid FQDN.`, {
44
- ...ctx.recoveryFor('invalid_domain'),
45
- });
46
- }
47
47
  ctx.log.info('RDAP availability check', { domain: input.domain });
48
48
  const result = await getRdapService().checkAvailability(input.domain, ctx);
49
- if (result.available === null) {
50
- // No RDAP coverage — surface as data, not an error
49
+ if (result.registration_status !== 'registered') {
51
50
  return {
52
51
  domain: input.domain.toLowerCase(),
53
52
  available: null,
54
- rdap_coverage: false,
55
- };
56
- }
57
- if (result.available === true) {
58
- return {
59
- domain: input.domain.toLowerCase(),
60
- available: true,
61
- rdap_coverage: true,
53
+ registration_status: result.registration_status,
54
+ rdap_coverage: result.rdap_coverage,
62
55
  };
63
56
  }
64
57
  // Registered
65
58
  return {
66
59
  domain: result.record.domain,
67
60
  available: false,
61
+ registration_status: result.registration_status,
68
62
  rdap_coverage: true,
69
63
  registrar: result.record.registrar,
70
64
  expiry_date: result.record.expiry_date,
@@ -73,18 +67,9 @@ export const whoisCheckAvailability = tool('whois_check_availability', {
73
67
  format: (result) => {
74
68
  const lines = [];
75
69
  lines.push(`# Domain: ${result.domain}`);
76
- if (result.available === null) {
77
- lines.push(`**Available:** Unknown (no RDAP coverage for this TLD)`);
78
- lines.push(`**RDAP Coverage:** No`);
79
- }
80
- else if (result.available === true) {
81
- lines.push(`**Available:** Yes — not currently registered`);
82
- lines.push(`**RDAP Coverage:** Yes`);
83
- }
84
- else {
85
- lines.push(`**Available:** No — registered`);
86
- lines.push(`**RDAP Coverage:** Yes`);
87
- }
70
+ lines.push(`**Registration Status:** ${result.registration_status}`);
71
+ lines.push(`**Available:** ${result.available === false ? 'No — registered' : 'Unknown — RDAP record absence does not establish eligibility'}`);
72
+ lines.push(`**RDAP Coverage:** ${result.rdap_coverage ? 'Yes' : 'No'}`);
88
73
  if (result.registrar)
89
74
  lines.push(`**Registrar:** ${result.registrar}`);
90
75
  if (result.expiry_date)
@@ -1 +1 @@
1
- {"version":3,"file":"whois-check-availability.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/whois-check-availability.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,wGAAwG;QACxG,2GAA2G;QAC3G,+EAA+E;QAC/E,iHAAiH;IACnH,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAE9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,CACP,mEAAmE;YACjE,kDAAkD,CACrD;KACJ,CAAC;IAEF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;QAC9D,SAAS,EAAE,CAAC;aACT,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;QAEzE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"whois-check-availability.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/whois-check-availability.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,gGAAgG;QAChG,uHAAuH;QACvH,uHAAuH;QACvH,8CAA8C;IAChD,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAE9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,CAAC,GAAG,CAAC;aACR,KAAK,CACJ,yBAAyB,EACzB,wIAAwI,CACzI;aACA,QAAQ,CACP,mEAAmE;YACjE,kDAAkD,CACrD;KACJ,CAAC;IAEF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;QAC9D,mBAAmB,EAAE,CAAC;aACnB,IAAI,CAAC,CAAC,YAAY,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;aAC5C,QAAQ,CACP,gGAAgG,CACjG;QACH,SAAS,EAAE,CAAC;aACT,OAAO,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CAAC,SAAS;YAClC,WAAW,EAAE,MAAM,CAAC,MAAM,CAAC,WAAW;SACvC,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACjB,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QAEzC,KAAK,CAAC,IAAI,CAAC,4BAA4B,MAAM,CAAC,mBAAmB,EAAE,CAAC,CAAC;QACrE,KAAK,CAAC,IAAI,CACR,kBAAkB,MAAM,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,8DAA8D,EAAE,CACpI,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,sBAAsB,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAExE,IAAI,MAAM,CAAC,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;QACvE,IAAI,MAAM,CAAC,WAAW;YAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;QAEzE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -40,10 +40,29 @@ export declare const whoisGetDns: import("@cyanheads/mcp-ts-core").ToolDefinitio
40
40
  cloudflare: "cloudflare";
41
41
  nextdns: "nextdns";
42
42
  }>;
43
+ query_sources: z.ZodArray<z.ZodObject<{
44
+ type: z.ZodEnum<{
45
+ A: "A";
46
+ AAAA: "AAAA";
47
+ CAA: "CAA";
48
+ CNAME: "CNAME";
49
+ MX: "MX";
50
+ NS: "NS";
51
+ PTR: "PTR";
52
+ SOA: "SOA";
53
+ TXT: "TXT";
54
+ }>;
55
+ source: z.ZodEnum<{
56
+ cloudflare: "cloudflare";
57
+ nextdns: "nextdns";
58
+ }>;
59
+ }, z.core.$strip>>;
43
60
  }, z.core.$strip>, readonly [{
44
- readonly reason: "invalid_domain";
45
- readonly code: JsonRpcErrorCode.ValidationError;
46
- readonly when: "Input is not a valid FQDN.";
47
- readonly recovery: "Provide a valid fully-qualified domain name like \"example.com\" or \"sub.example.org\".";
61
+ readonly reason: "dns_response_failed";
62
+ readonly code: JsonRpcErrorCode.ServiceUnavailable;
63
+ readonly when: "Resolvers return a DNS failure status or truncated response after retry and fallback.";
64
+ readonly recovery: "Retry the DNS query later or choose another record type.";
65
+ readonly thrownBy: "service";
66
+ readonly retryable: true;
48
67
  }], undefined>;
49
68
  //# sourceMappingURL=whois-get-dns.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"whois-get-dns.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/whois-get-dns.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAOjE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8GtB,CAAC"}
1
+ {"version":3,"file":"whois-get-dns.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/whois-get-dns.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMjE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAmItB,CAAC"}