Skip to main content
Glama

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
NameRequiredDescriptionDefault
domainYes

Implementation Reference

  • 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 }; }
  • 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 }; } } );
  • 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';

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bharathvaj-ganesan/whois-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server