Skip to main content
Glama

set_auth_code

Set the transfer authorization (EPP) code for a domain to enable domain transfers between registrars using the Dynadot domain registrar API.

Instructions

Set the transfer authorization (EPP) code for a domain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain name
auth_codeYesAuthorization/EPP code to set

Implementation Reference

  • The handler function that executes the set_auth_code tool logic by calling client.setTransferAuthCode.
    async ({ domain, auth_code }) => {
      try {
        const result = await client.setTransferAuthCode(domain, auth_code);
        return {
          content: [
            { type: "text" as const, text: JSON.stringify(result, null, 2) },
          ],
        };
      } catch (error) {
        const msg = error instanceof Error ? error.message : String(error);
        return {
          content: [
            { type: "text" as const, text: `Failed to set auth code: ${msg}` },
          ],
          isError: true,
        };
      }
    }
  • Registration of the set_auth_code tool in the MCP server.
    server.tool(
      "set_auth_code",
      "Set the transfer authorization (EPP) code for a domain.",
      {
        domain: z.string().describe("Domain name"),
        auth_code: z.string().describe("Authorization/EPP code to set"),
      },
      async ({ domain, auth_code }) => {
        try {
          const result = await client.setTransferAuthCode(domain, auth_code);
          return {
            content: [
              { type: "text" as const, text: JSON.stringify(result, null, 2) },
            ],
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return {
            content: [
              { type: "text" as const, text: `Failed to set auth code: ${msg}` },
            ],
            isError: true,
          };
        }
      }
    );
  • Input schema definition for the set_auth_code tool.
    {
      domain: z.string().describe("Domain name"),
      auth_code: z.string().describe("Authorization/EPP code to set"),
    },

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/mikusnuz/dynadot-mcp'

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