Skip to main content
Glama
CloudWaddie

OSINT MCP Server

dns_lookup_direct

Query DNS records for domains to retrieve A, AAAA, MX, TXT, NS, CNAME, or SOA records for security research and data gathering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to lookup
typeYesRecord type

Implementation Reference

  • The handler function for the "dns_lookup_direct" tool in src/index.ts.
    async ({ domain, type }) => {
      const result = await directDnsClient.lookup(domain, type);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • src/index.ts:145-157 (registration)
    Registration of the "dns_lookup_direct" tool.
    server.tool(
      "dns_lookup_direct",
      {
        domain: z.string().describe("Domain name to lookup"),
        type: z.enum(["A", "AAAA", "MX", "TXT", "NS", "CNAME", "SOA"]).describe("Record type"),
      },
      async ({ domain, type }) => {
        const result = await directDnsClient.lookup(domain, type);
        return {
          content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
        };
      }
    );
  • The lookup implementation inside the DirectDnsClient class, called by the tool handler.
    async lookup(domain: string, type: "A" | "AAAA" | "MX" | "TXT" | "NS" | "CNAME" | "SOA" | "PTR"): Promise<any> {
      try {
        switch (type) {
          case "A": return await dns.resolve4(domain);
          case "AAAA": return await dns.resolve6(domain);
          case "MX": return await dns.resolveMx(domain);
          case "TXT": return await dns.resolveTxt(domain);
          case "NS": return await dns.resolveNs(domain);
          case "CNAME": return await dns.resolveCname(domain);
          case "SOA": return await dns.resolveSoa(domain);
          default: throw new Error(`Unsupported record type: ${type}`);
        }
      } catch (error) {
        throw new McpError(ErrorCode.InternalError, `DNS Lookup failed: ${(error as Error).message}`);
      }
    }

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