Skip to main content
Glama

dynadot_domain_settings

Configure domain settings including nameservers, WHOIS privacy, auto-renewal, URL forwarding, and parking pages for domains managed through Dynadot.

Instructions

Configure domain settings: nameservers, privacy, renewal, forwarding, parking, WHOIS

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: set_ns: Set nameservers | get_ns: Get current nameservers | set_renew_option: Set auto-renewal option | set_privacy: Set WHOIS privacy | set_whois: Set WHOIS contact | set_forwarding: Set URL forwarding | set_stealth: Set stealth/masked forwarding | set_parking: Enable parking page | set_hosting: Set hosting settings | set_email_forward: Set email forwarding | set_folder: Move domain to folder | set_note: Set domain note | clear_settings: Clear all custom settings
domainNoDomain name (e.g., example.com)
nameserversNoList of nameservers
renewOptionNoRenewal option
domainsNoList of domain names
optionNoPrivacy level
registrantContactNoContact ID
adminContactNoContact ID
techContactNoContact ID
billingContactNoContact ID
forwardUrlNoURL
forwardTypeNo
stealthUrlNoURL
stealthTitleNoPage title
optionsNoHosting options
forwardToNoEmail address
usernameNoEmail username (default: *)
folderIdNoFolder ID
noteNoNote text

Implementation Reference

  • Schema definition for the 'dynadot_domain_settings' tool. Defines description, input validation schemas for each action (e.g., set_ns, set_privacy), API commands, and transform functions to prepare API parameters.
    { name: 'dynadot_domain_settings', description: 'Configure domain settings: nameservers, privacy, renewal, forwarding, parking, WHOIS', actions: { set_ns: { command: 'set_ns', description: 'Set nameservers', params: z.object({ domain: p.domain, nameservers: p.nameservers }), transform: (_, input) => tx.nameservers(input), }, get_ns: { command: 'get_ns', description: 'Get current nameservers', params: z.object({ domain: p.domain }), }, set_renew_option: { command: 'set_renew_option', description: 'Set auto-renewal option', params: z.object({ domain: p.domain, renewOption: p.renewOption }), transform: (_, input) => ({ domain: input.domain as string, renew_option: input.renewOption as string, }), }, set_privacy: { command: 'set_privacy', description: 'Set WHOIS privacy', params: z.object({ domains: p.domains, option: p.privacyOption }), transform: (_, input) => { const params: ApiParams = { option: input.option as string }; const domains = input.domains as string[] | undefined; if (!domains?.length) throw new Error('domains array is required for set_privacy action'); domains.forEach((d, i) => { params[`domain${i}`] = d; }); return params; }, }, set_whois: { command: 'set_whois', description: 'Set WHOIS contact', params: z.object({ domain: p.domain, registrantContact: p.contactId, adminContact: p.contactId.optional(), techContact: p.contactId.optional(), billingContact: p.contactId.optional(), }), transform: (_, input) => ({ domain: input.domain as string, registrant_contact: input.registrantContact as string, admin_contact: input.adminContact as string | undefined, tech_contact: input.techContact as string | undefined, billing_contact: input.billingContact as string | undefined, }), }, set_forwarding: { command: 'set_forwarding', description: 'Set URL forwarding', params: z.object({ domain: p.domain, forwardUrl: p.url, forwardType: z.enum(['temporary', 'permanent']).optional(), }), transform: (_, input) => ({ domain: input.domain as string, forward_url: input.forwardUrl as string, forward_type: input.forwardType as string | undefined, }), }, set_stealth: { command: 'set_stealth', description: 'Set stealth/masked forwarding', params: z.object({ domain: p.domain, stealthUrl: p.url, stealthTitle: z.string().optional().describe('Page title'), }), transform: (_, input) => ({ domain: input.domain as string, stealth_url: input.stealthUrl as string, stealth_title: input.stealthTitle as string | undefined, }), }, set_parking: { command: 'set_parking', description: 'Enable parking page', params: z.object({ domain: p.domain }), }, set_hosting: { command: 'set_hosting', description: 'Set hosting settings', params: z.object({ domain: p.domain, options: z.record(z.string(), z.string()).describe('Hosting options'), }), transform: (_, input) => { const params: ApiParams = { domain: input.domain as string }; for (const [k, v] of Object.entries(input.options as Record<string, string>)) { params[k] = v; } return params; }, }, set_email_forward: { command: 'set_email_forward', description: 'Set email forwarding', params: z.object({ domain: p.domain, forwardTo: p.email, username: z.string().optional().describe('Email username (default: *)'), }), transform: (_, input) => ({ domain: input.domain as string, forward_to: input.forwardTo as string, username: (input.username as string) || '*', }), }, set_folder: { command: 'set_folder', description: 'Move domain to folder', params: z.object({ domain: p.domain, folderId: p.folderId }), transform: (_, input) => ({ domain: input.domain as string, folder_id: input.folderId as string, }), }, set_note: { command: 'set_note', description: 'Set domain note', params: z.object({ domain: p.domain, note: p.note }), }, clear_settings: { command: 'set_clear_domain_setting', description: 'Clear all custom settings', params: z.object({ domain: p.domain }), }, }, },
  • src/register.ts:6-65 (registration)
    Registers all composite tools, including 'dynadot_domain_settings', with the MCP server. Dynamically generates inputSchema from tool.actions and provides a generic handler that routes to specific Dynadot API commands based on the 'action' input.
    export function registerAllTools(server: McpServer): void { for (const tool of compositeTools) { // Build action enum from keys const actionKeys = Object.keys(tool.actions) as [string, ...string[]]; // Build combined input schema with action + all possible params const actionDescriptions = actionKeys .map((k) => { const actionDef = tool.actions[k]; return actionDef ? `${k}: ${actionDef.description}` : k; }) .join(' | '); const inputSchema: Record<string, z.ZodTypeAny> = { action: z.enum(actionKeys).describe(`Action to perform: ${actionDescriptions}`), }; // Collect all unique params across actions for (const action of Object.values(tool.actions)) { if (action?.params) { const shape = action.params.shape; for (const [key, schema] of Object.entries(shape)) { if (!inputSchema[key]) { // Make optional since not all actions need all params inputSchema[key] = (schema as z.ZodTypeAny).optional(); } } } } server.registerTool( tool.name, { description: tool.description, inputSchema, }, async (input) => { const action = input.action as string; const actionDef = tool.actions[action]; if (!actionDef) { throw new Error(`Unknown action: ${action}. Valid actions: ${actionKeys.join(', ')}`); } const client = getClient(); const params = actionDef.transform ? actionDef.transform(action, input as Record<string, unknown>) : (input as ApiParams); // Remove 'action' from params sent to API delete params.action; const result = await client.execute(actionDef.command, params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); } }
  • The tool handler function (shared across composite tools). Extracts 'action' from input, looks up action definition from schema, applies transform if defined, executes the corresponding Dynadot API command, and returns JSON response.
    async (input) => { const action = input.action as string; const actionDef = tool.actions[action]; if (!actionDef) { throw new Error(`Unknown action: ${action}. Valid actions: ${actionKeys.join(', ')}`); } const client = getClient(); const params = actionDef.transform ? actionDef.transform(action, input as Record<string, unknown>) : (input as ApiParams); // Remove 'action' from params sent to API delete params.action; const result = await client.execute(actionDef.command, params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }
  • Core API execution helper used by the handler. Constructs API request to Dynadot with API key and params, handles response parsing and errors.
    async execute(command: string, params: ApiParams = {}): Promise<ApiResponse> { const searchParams = new URLSearchParams(); searchParams.set('key', this.apiKey); searchParams.set('command', command); for (const [key, value] of Object.entries(params)) { if (value !== undefined) { searchParams.set(key, String(value)); } } const response = await this.client.get('api3.json', { searchParams }).json<ApiResponse>(); if (response.Status === 'error') { throw new Error(`Dynadot API error: ${response.Error || 'Unknown error'}`); } return response; }

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/joachimBrindeau/domain-mcp'

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