transfer_domain
Transfer a domain to Dynadot by providing the domain name and authorization code (EPP code) from the current registrar.
Instructions
Initiate a domain transfer into your Dynadot account. Requires the domain name and the authorization/EPP code from the current registrar.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Domain name to transfer (e.g., 'example.com') | |
| auth_code | Yes | Authorization/EPP code from the current registrar | |
| registrant_contact | No | Contact ID to use as registrant | |
| coupon | No | Coupon code for discount |
Implementation Reference
- src/tools/transfer.ts:22-56 (handler)The MCP tool handler for 'transfer_domain'. Registers the tool with a Zod schema for domain, auth_code, registrant_contact (optional), and coupon (optional). The handler calls client.transfer() with the parameters and returns the JSON result or an error message.
server.tool( "transfer_domain", "Initiate a domain transfer into your Dynadot account. Requires the " + "domain name and the authorization/EPP code from the current registrar.", { domain: z.string().describe("Domain name to transfer (e.g., 'example.com')"), auth_code: z.string().describe("Authorization/EPP code from the current registrar"), registrant_contact: z .string() .optional() .describe("Contact ID to use as registrant"), coupon: z.string().optional().describe("Coupon code for discount"), }, async ({ domain, auth_code, registrant_contact, coupon }) => { try { const result = await client.transfer(domain, auth_code, { registrantContact: registrant_contact, coupon, }); 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: `Domain transfer failed: ${msg}` }, ], isError: true, }; } } ); - src/tools/transfer.ts:26-34 (schema)Zod input schema for the transfer_domain tool: required 'domain' (string), required 'auth_code' (string), optional 'registrant_contact' (string), optional 'coupon' (string).
{ domain: z.string().describe("Domain name to transfer (e.g., 'example.com')"), auth_code: z.string().describe("Authorization/EPP code from the current registrar"), registrant_contact: z .string() .optional() .describe("Contact ID to use as registrant"), coupon: z.string().optional().describe("Coupon code for discount"), }, - src/tools/transfer.ts:22-56 (registration)The tool is registered on the MCP server via server.tool() with the name 'transfer_domain' inside registerTransferTools(), which is called from src/index.ts (line 53) and createSandboxServer() (line 201).
server.tool( "transfer_domain", "Initiate a domain transfer into your Dynadot account. Requires the " + "domain name and the authorization/EPP code from the current registrar.", { domain: z.string().describe("Domain name to transfer (e.g., 'example.com')"), auth_code: z.string().describe("Authorization/EPP code from the current registrar"), registrant_contact: z .string() .optional() .describe("Contact ID to use as registrant"), coupon: z.string().optional().describe("Coupon code for discount"), }, async ({ domain, auth_code, registrant_contact, coupon }) => { try { const result = await client.transfer(domain, auth_code, { registrantContact: registrant_contact, coupon, }); 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: `Domain transfer failed: ${msg}` }, ], isError: true, }; } } ); - src/index.ts:53-53 (registration)Registration call that triggers the transfer_domain tool registration in the main server.
registerTransferTools(server, client); - The DynadotClient.transfer() helper method that builds the API parameters and calls the Dynadot API with the 'transfer' command.
async transfer(domain: string, authCode: string, options?: { registrantContact?: string; coupon?: string; }): Promise<DynadotResponse> { const params: Record<string, string> = { domain, auth: authCode }; if (options?.registrantContact) params.registrant_contact = options.registrantContact; if (options?.coupon) params.coupon = options.coupon; return this.call("transfer", params); }