whois_domain
Retrieve WHOIS details for any domain to check ownership, registration status, and availability directly from the MCP server. Streamline domain information queries with precise, actionable data.
Instructions
Looksup whois information about the domain
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes |
Implementation Reference
- src/index.ts:15-27 (handler)The handler function for the 'whois_domain' tool. It invokes whoisDomain(domain) from the 'whoiser' library, stringifies the result, and returns it as text content, or handles errors appropriately.async ({ domain }) => { try { const result = await whoisDomain(domain); return { content: [{ type: 'text', text: `Domain whois lookup for: \n${JSON.stringify(result)}` }], }; } catch (err: unknown) { const error = err as Error; return { content: [{ type: 'text', text: `Error: ${error.message}` }], isError: true }; }
- src/index.ts:14-14 (schema)Input schema defined using Zod, requiring a 'domain' parameter that is a non-empty string.{ domain: z.string().min(1) },
- src/index.ts:12-29 (registration)Registration of the 'whois_domain' tool on the MCP server, specifying name, description, input schema, and handler function.'whois_domain', 'Looksup whois information about the domain', { domain: z.string().min(1) }, async ({ domain }) => { try { const result = await whoisDomain(domain); return { content: [{ type: 'text', text: `Domain whois lookup for: \n${JSON.stringify(result)}` }], }; } catch (err: unknown) { const error = err as Error; return { content: [{ type: 'text', text: `Error: ${error.message}` }], isError: true }; } } );
- src/index.ts:6-6 (helper)Import statement for the 'whoisDomain' function from the external 'whoiser' library, which provides the core WHOIS lookup functionality used in the handler.import { whoisAsn, whoisDomain, whoisTld, whoisIp } from 'whoiser';