How to give Claude Code an email address on your domain
Checked November 9, 2026
To give Claude Code an email address, connect it to an email MCP server that hosts a real mailbox on your domain, then ask it to set up an address like agent@yourdomain.com. With Plainmail that is one claude mcp add command; Claude Code then writes the DNS records, creates the mailbox, and can read, send and reply to mail, while you read the same inbox in any mail app.
Step by step with Plainmail
- Create a Plainmail account. Adding and verifying a domain is free; mailboxes need the $5 a month plan.
- Add the MCP server to Claude Code:
claude mcp add --transport http plainmail https://app.plainmail.dev/api/mcp/mcp - Run
/mcp, pick plainmail and sign in in the browser. Choose what Claude Code may do: read mail, send and organize mail, or manage domains and mailboxes. - Ask: Set up agent@yourdomain.com on Plainmail. Claude Code adds the domain and writes the MX, SPF, DKIM and DMARC records on Cloudflare, Vercel or Porkbun. On other DNS hosts it gives you the exact records to paste.
- When the DNS checks pass, it creates the mailbox. You get a link that shows the password once, for your own mail app.
Running Claude Code where it can't open a browser? Create an API key in Settings and add it as a header: --header "Authorization: Bearer <key>". Full details are in the docs.
What Claude Code can do with the address
- Read new mail and summarize it: What came into agent@yourdomain.com today?
- Send and reply from the address, signed with DKIM for your domain.
- Flag, mark read and move messages, and download attachments.
- Add aliases like support@ or billing@ that deliver to the same mailbox, and set the sender name.
- Check a domain's DNS and say what's missing.
Your options compared
| Email MCP server on your domain (Plainmail) | Agent inbox API (AgentMail) | Your own Gmail or Workspace | Sending API (Resend, Postmark, SES) | |
|---|---|---|---|---|
| Address on your domain | Yes, up to 50 domains | Yes, 1 free, 10 on Developer | Yes, on Workspace | Sending only |
| Can receive and read mail | Yes | Yes | Yes | Not a mailbox |
| Works in Claude Code with no code | Yes, remote MCP with OAuth | Yes, MCP server | Through a Gmail connector or MCP server | You write the code |
| You read it in a normal mail app | Yes, IMAP/SMTP and web inbox | IMAP/SMTP with an API key | Yes | No |
| DNS written for you | Cloudflare, Vercel, Porkbun | Not listed on its pricing page | Guided; you add the records | You add records |
| Price | $5 a month flat | Free for 3 inboxes; $20 a month for 10 | $7 to $8.40 per user a month | By sending volume |
AgentMail and Workspace prices are from their own pricing pages, checked November 8, 2026. Details: Plainmail vs AgentMail, Plainmail vs Google Workspace.
When another option is better
- Your product creates inboxes for its own users or agents through an API: AgentMail is built for that, and starts free.
- You only need to send app mail from code, like receipts and password resets: a sending API such as Resend, Postmark or Amazon SES.
- You want Claude Code to work in the inbox you already have, and your team lives in Docs and Drive: a Gmail or Workspace connector.
- The agent needs to send more than 200 messages a day from one mailbox, or send bulk or cold mail: Plainmail doesn't allow that.
Keeping it safe
Email is untrusted input: a message can contain text that tries to give the agent orders. Plainmail labels email content as untrusted in every tool result and tells the agent never to follow instructions found inside an email. You choose the permissions when you connect, sending is capped at 200 messages per mailbox a day, and you can revoke access in Settings at any time.
Questions
Can Claude Code send email from my own domain?
Yes. Connect an email MCP server that hosts a mailbox on your domain. With Plainmail, Claude Code sends from that address through Amazon SES, signed with DKIM for your domain, so it passes SPF, DKIM and DMARC checks.
Does the agent need its own domain?
No. You can add agent@yourdomain.com next to your own address on the domain you already use, or put the agent on a spare domain to keep its mail apart.
Can I read the agent's mail myself?
Yes. Plainmail mailboxes are normal IMAP/SMTP accounts, so you can open the same inbox in Apple Mail, the Gmail app, Outlook or the web inbox and see everything the agent sent and received.
Does Claude Code ever see the mailbox password?
No. The agent signs in with OAuth or an API key. A new mailbox comes with a link that shows its password once, to you.
What does it cost?
Adding and verifying a domain is free. Mailboxes need the $5 a month plan, which covers up to 50 domains and 100 mailboxes.
Related
- Email MCP server for your own domains
- Best email for AI agents
- Plainmail vs AgentMail
- Set up email on your domain, by DNS host
Get started$5 a month for up to 50 domains and 100 mailboxes