Skip to main content
Glama
CloudWaddie

OSINT MCP Server

whois_lookup

Retrieve domain registration details including owner, contact information, and expiration dates to investigate website ownership and history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to lookup WHOIS information

Implementation Reference

  • The getWhois method in RdapApiClient fetches and parses WHOIS/RDAP data for a domain.
    async getWhois(domain: string): Promise<WhoisResult> {
      try {
        const data = await this.fetch<any>(domain, {
          method: "GET",
        });
    
        // RDAP response format varies significantly between registrars
        // This is a basic mapping, focusing on common fields
        const registrar = data.entities?.find((e: any) => e.roles?.includes("registrar"))?.vcardArray?.[1]?.find((v: any) => v[0] === "fn")?.[3];
        
        const events = data.events || [];
        const registrationDate = events.find((e: any) => e.eventAction === "registration")?.eventDate;
        const expirationDate = events.find((e: any) => e.eventAction === "expiration")?.eventDate;
        
        const nameServers = data.nameservers?.map((ns: any) => ns.ldhName) || [];
    
        return WhoisResultSchema.parse({
          domain,
          registrar: registrar || "Unknown",
          registrationDate,
          expirationDate,
          nameServers,
          status: data.status,
          raw: data,
        });
      } catch (error) {
        if (error instanceof McpError) throw error;
        throw new McpError(
          ErrorCode.InternalError,
          `RDAP WHOIS error: ${(error as Error).message}`
        );
      }
    }
  • src/index.ts:111-120 (registration)
    Registration of the 'whois_lookup' MCP tool in index.ts, which calls the getWhois method of the whoisClient.
    server.tool(
      "whois_lookup",
      { domain: z.string().describe("Domain name to lookup WHOIS information") },
      async ({ domain }) => {
        const result = await whoisClient.getWhois(domain);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
        };
      }
    );

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/CloudWaddie/osint-mcp'

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