Skip to main content
Glama
badchars

osint-mcp-server

by badchars

st_whois

Perform WHOIS lookups to retrieve domain registration details including registrant, admin, and technical contact information using SecurityTrails data.

Instructions

Enhanced WHOIS lookup via SecurityTrails with registrant/admin/technical contacts. Requires ST_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to look up

Implementation Reference

  • The actual implementation of the stWhois logic that calls the SecurityTrails API.
    export async function stWhois(domain: string, apiKey: string): Promise<StWhoisResult> {
      const data = await stFetch(`/domain/${encodeURIComponent(domain)}/whois`, apiKey);
      const w = data ?? {};
    
      const contacts: StWhoisResult["contacts"] = [];
      for (const type of ["registrant", "admin", "technical"]) {
        const c = w[type];
        if (c) {
          contacts.push({
            type,
            name: c.name,
            organization: c.organization,
            email: c.email,
            country: c.country,
          });
        }
      }
    
      return {
        domain,
        registrar: w.registrar?.name,
        createdDate: w.created_date,
        updatedDate: w.updated_date,
        expiresDate: w.expires_date,
        nameservers: w.nameservers ?? [],
        contacts,
      };
    }
  • The registration and tool definition for st_whois, which wraps the implementation in a MCP tool.
    const stWhoisTool: ToolDef = {
      name: "st_whois",
      description: "Enhanced WHOIS lookup via SecurityTrails with registrant/admin/technical contacts. Requires ST_API_KEY.",
      schema: {
        domain: z.string().describe("Domain to look up"),
      },
      execute: async (args, ctx) => {
        const key = requireApiKey(ctx.config.stApiKey, "SecurityTrails", "ST_API_KEY");
        return json(await stWhois(args.domain as string, key));
      },
    };
  • Type definition for the result returned by the st_whois tool.
    interface StWhoisResult {
      domain: string;
      registrar?: string;
      createdDate?: string;
      updatedDate?: string;
      expiresDate?: string;
      nameservers: string[];
      contacts: { type: string; name?: string; organization?: string; email?: string; country?: string }[];
    }

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

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