Skip to main content
Glama
NsLookup-io

nslookup.io MCP Server

by NsLookup-io

dns_lookup

Query DNS records (A, AAAA, NS, MX, TXT, CNAME, SOA) for any domain using specified DNS servers to verify configurations and troubleshoot connectivity.

Instructions

Look up all common DNS records (A, AAAA, NS, MX, TXT, CNAME, SOA) for a domain. Returns results from a specified DNS server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name to look up (e.g. example.com)
serverNoDNS server to query. Default: cloudflare. Use 'authoritative' for the domain's own nameservers.

Implementation Reference

  • The handler logic for dns_lookup, which calls the /v1/records API.
      async ({ domain, server: dnsServer }) => {
        try {
          const params: Record<string, string> = { domain };
          if (dnsServer) params.server = dnsServer;
    
          const result = await apiGet("/v1/records", params);
          return { content: [{ type: "text", text: formatJson(result) }] };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error: ${error instanceof Error ? error.message : String(error)}`,
              },
            ],
            isError: true,
          };
        }
      }
    );
  • src/tools.ts:84-95 (registration)
    Registration of the dns_lookup tool with its schema definition using Zod.
    server.tool(
      "dns_lookup",
      "Look up all common DNS records (A, AAAA, NS, MX, TXT, CNAME, SOA) for a domain. Returns results from a specified DNS server.",
      {
        domain: z.string().describe("Domain name to look up (e.g. example.com)"),
        server: z
          .enum(DNS_SERVERS)
          .optional()
          .describe(
            "DNS server to query. Default: cloudflare. Use 'authoritative' for the domain's own nameservers."
          ),
      },

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/NsLookup-io/nslookup-mcp'

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