whois_history
Retrieve historical WHOIS records for domains to analyze ownership changes and registration details over time.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name to lookup WHOIS history (Requires WHOISXML_API_KEY) |
Implementation Reference
- src/tools/whoishistory.ts:12-28 (handler)The getHistory function executes the WHOIS history lookup by making a GET request to the WHOISXML API.
async getHistory(domain: string): Promise<any> { const apiKey = process.env.WHOISXML_API_KEY; if (!apiKey) { throw new McpError(ErrorCode.InvalidRequest, "WHOISXML_API_KEY is not configured"); } try { return await this.fetch<any>("", { method: "GET", }, { apiKey: apiKey, domainName: domain, }); } catch (error) { throw new McpError(ErrorCode.InternalError, `WHOIS History error: ${(error as Error).message}`); } } - src/index.ts:122-131 (registration)The 'whois_history' tool is registered on the MCP server in index.ts, calling the getHistory method of WhoisXmlApiClient.
server.tool( "whois_history", { domain: z.string().describe("Domain name to lookup WHOIS history (Requires WHOISXML_API_KEY)") }, async ({ domain }) => { const result = await whoisHistoryClient.getHistory(domain); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; } );