name: domain-email-setup description: Set up email authentication (MX, SPF, DKIM, DMARC) for a domain. Use when configuring Google Workspace, Resend, SendGrid, Mailgun, SES, Postmark, or ProtonMail. Requires domain-suite-mcp.
Configure email DNS records for $ARGUMENTS using the domain-suite-mcp server.
Steps
-
Call
list_providersto find the DNS provider. Calllist_dns_recordsfor the domain to see what email records already exist. -
Identify the mail provider if not already specified. Supported templates:
google(Google Workspace / Gmail)resendsendgridmailgunses(Amazon SES)postmarkprotonmail(MX only)custom(user provides their own values)
-
Set up records in this order (order matters for testing):
Step 1 — MX records (call
setup_mx):- Uses template for the mail provider
- Idempotent: skips exchanges already present
- For custom, ask for exchange hostnames and priorities
Step 2 — SPF record (call
setup_spf):- Uses template for the mail provider
- Idempotent: updates existing SPF record in place (prevents duplicate SPF per RFC 7208)
- For custom, ask for the full SPF policy string (must start with
v=spf1)
Step 3 — DKIM record (call
setup_dkim):- Ask the user for: selector name (e.g.
google,mail,s1) and the public key (base64) - PEM headers are stripped automatically
- Supports
keyType: rsa(default) ored25519 - Idempotent: updates existing record, returns previous value
- Skip if the user doesn't have their DKIM key yet (they may need to get it from their mail provider dashboard)
Step 4 — DMARC record (call
setup_dmarc):- Recommend starting with
policy: nonefor monitoring (won't reject mail) - Ask if the user wants a report email address for aggregate reports
- Idempotent: updates existing record in place
- After confirming deliverability, the user can escalate to
quarantinethenreject
-
Summarize all records created/updated. Remind the user:
- DNS propagation takes time
- DKIM requires publishing the key in their mail provider dashboard first
- After propagation, use their mail provider's tools to verify DMARC pass
Notes
- All four tools (setup_mx, setup_spf, setup_dkim, setup_dmarc) are idempotent — safe to run multiple times
- They return a
previousfield when overwriting an existing record so the user can see what changed - For Resend: selector is typically
resend, key is provided in Resend dashboard under Domains - For Google Workspace: selector is
google, key is in Admin Console → Apps → Gmail → Authenticate email