Skip to main content
Glama
ofershap

mcp-server-dns

by ofershap

check_nameservers

Retrieve nameserver (NS) records for a domain to verify DNS configuration and identify hosting providers.

Instructions

Get the nameserver (NS) records for a domain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name (e.g. example.com)

Implementation Reference

  • The actual implementation of checkNameservers function that queries DNS for NS records and returns them as a newline-separated string
    export async function checkNameservers(domain: string): Promise<string> {
      const nameservers = await dns.resolveNs(domain);
      return nameservers.length > 0
        ? nameservers.join("\n")
        : "No nameserver records found.";
    }
  • src/index.ts:60-70 (registration)
    Tool registration for 'check_nameservers' with schema definition (domain string) and handler that calls the checkNameservers function
    server.tool(
      "check_nameservers",
      "Get the nameserver (NS) records for a domain.",
      {
        domain: z.string().describe("Domain name (e.g. example.com)"),
      },
      async ({ domain }) => {
        const result = await checkNameservers(domain);
        return { content: [{ type: "text" as const, text: result }] };
      },
    );

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/ofershap/mcp-server-dns'

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