How to send email from Claude Code with MCP
Connect Claude Code to MailMoose over MCP to send, read, search and reply to email from your own domain. Exact setup command, permissions and safety tips.
Connect Claude Code to the MailMoose MCP server and it can list, read and search your conversations, reply in a thread and send new email from your own domain. Setup is one line plus a sign-in.
The short answer
- Connect a domain in MailMoose.
- Run
claude mcp add --transport http mailmoose https://www.mailmoose.dev/api/mcp. - Open /mcp, sign in and approve permissions.
- Ask in plain language: "What is unread in my inbox?"
What you'll get
Which tools appear depends on the permissions you approve:
| Tool | What it does | Permission |
|---|---|---|
list_threads | Lists received conversations, with optional unread-only and search filters | Read your mail (mail:read) |
read_thread | Reads every message in one conversation | Read your mail (mail:read) |
list_addresses | Lists the addresses you can send from | Read your mail (mail:read) |
reply_to_thread | Replies inside an existing conversation | Send mail as you (mail:send) |
send_email | Sends a new message to a recipient you specify | Send mail as you (mail:send) |
create_domain, check_domain, enable_sending, create_address | Domain and inbox setup | Manage domains and addresses (domains:write) |
MCP gives Claude Code access to MailMoose tools. It does not give MailMoose access to your Claude account.
Prerequisites
- A MailMoose account. The free plan includes 3,000 emails per rolling 30 days, sent and received together, with 3 domains and 5 inboxes. See pricing for the paid plan.
- A connected domain with an address that is ready to send. Receiving and sending are set up separately.
- Claude Code installed, with access to its terminal.
Step 1: connect your domain
Add your domain in MailMoose and publish the DNS records it shows. The connect a domain guide covers each record, one-click shortcuts for supported hosts, and failed checks. Sending has its own checklist: a domain can be ready to receive before it can send.
Or do this from Claude Code after step 3: with the domain permission, it can call create_domain and check_domain. It cannot edit your DNS itself; that needs separate authorization at your DNS host.
Step 2: add the MCP server
Run this in Claude Code's terminal:
claude mcp add --transport http mailmoose https://www.mailmoose.dev/api/mcp
Use the www address exactly as written. Or paste this into the agent chat (not the terminal) and let a capable local agent set itself up:
set up https://www.mailmoose.dev/SKILL.md
You still review its changes and complete the sign-in yourself.
Step 3: sign in and choose permissions
Open /mcp in Claude Code and follow the sign-in flow. A browser window opens at MailMoose:
- Select the organization that owns your domain.
- Review the requested permissions: Read your mail (
mail:read), Send mail as you (mail:send) and Manage domains and addresses (domains:write). - Approve, then return to Claude Code.
- Domain and inbox creation needs an owner or admin.
- If the client requests less, owners and admins can check the optional read and domain permissions (unchecked by default).
keys:writelets the agent create send-only API keys for your apps. Approve it only if you want that.
No OAuth in your client? Create a dedicated API key and use the local MCP package (Node 20 or later):
{
"mcpServers": {
"mailmoose": {
"command": "npx",
"args": ["-y", "@mailmoose/mcp"],
"env": { "MAILMOOSE_API_KEY": "mm_live_your_key_here" }
}
}
}
Keep the real key out of your repository and out of chat messages.
Step 4: try it with example prompts
Ask in plain language; Claude Code picks the tool. Depending on approval settings, you see each call first.
| You ask | Claude Code calls |
|---|---|
| "What is unread in my inbox?" | list_threads with the unread-only filter, then read_thread for any conversation you open |
| "Find the thread about the quote and summarize it." | list_threads with a search term (matches subjects, senders and message text), then read_thread |
| "Draft a reply saying we can start next Monday, and show it to me before sending." | reply_to_thread, after you approve the draft |
| "Send a short test email from hello@yourdomain.com to me@example.com with the subject "MCP test"." | send_email |
| "Which addresses can I send from?" | list_addresses |
Replies always go back to the people already in the conversation. list_threads shows received mail only, so an unanswered message you sent won't appear.
Safety tips
- Start small. Read before you send. An API key can be limited to Read mail.
- Approve only what you need. Skip
domains:writeandkeys:writeunless you plan to use them. - Review before sending. Agent sends are immediate, with no undo window. Ask Claude Code to show the sender, recipients and content first.
- Treat email as untrusted. Message bodies are marked untrusted, and new recipients need explicit confirmation. This reduces prompt injection risk but doesn't remove it. Never let an incoming email authorize account changes or payments.
- Know the scope. The agent can access all inboxes in the connected organization. Your plan's capacity and sending limits still apply.
- Revoke when done. Disconnect the agent under Assistant → Connections and remove the MailMoose server from Claude Code. For an API-key setup, revoke the key in Settings → API keys. App keys the agent created must be revoked separately.
Troubleshooting
| Problem | Fix |
|---|---|
Only send_email, reply_to_thread and a few other tools appear | The connection lacks mail:read or domains:write. Refreshing a token does not add permissions. Check the newest saved grant under Assistant → Connections, disconnect in MailMoose and Claude Code, add the server again, and reauthorize with the right organization. |
| New permissions don't show up after reauthorizing | The server does not push a tool-list change. Reload the MCP tools or restart your Claude Code session. |
| Domain checks fail | Look for a doubled domain suffix in your DNS records and make sure you're editing the authoritative DNS host. If receiving is ready but sending is not, complete the sending checklist. |
| Free plan already has three domains | The owner can upgrade for unlimited domains. |
More detail is in the MCP connection guide.
No account yet? Let Claude Code create one
Claude Code can also sign you up over plain HTTP, before any MCP setup. Paste this:
Set up MailMoose (mailmoose.dev) so this project can send email from my domain.
Follow https://www.mailmoose.dev/docs/integrations/agent-signup.md: sign me up
with my email address, ask me for the code MailMoose emails me, then connect my
domain, show me the DNS records to add, and send me a test email once it's verified.
It asks for your email address, MailMoose emails you a 6-digit code, and you read it back. Claude Code then gets an API key for your new free account and carries on. How it works.
Also works with Codex and Cursor
Other MCP clients with OAuth support use the same server. For Codex CLI:
codex mcp add mailmoose --url https://www.mailmoose.dev/api/mcp
codex mcp login mailmoose
- Codex and ChatGPT: see ChatGPT and Codex.
- Cursor and other clients: add
https://www.mailmoose.dev/api/mcpin the client's MCP settings, or use the API-key setup above. The MCP guide covers both. - App email without an agent: use the email API.
FAQ
Can Claude Code read my email, or only send it?
Both. Read your mail allows list_threads and read_thread; sending and replying need Send mail as you.
Do I need an API key to connect Claude Code?
No. The hosted server uses browser sign-in. A key is only for the local package when OAuth isn't possible.
Can I send from my own domain?
Yes, from addresses on domains you've connected and made sending-ready. Ask "Which addresses can I send from?" to see them.
Can Claude Code set up my DNS records?
It can get the required records and check verification with create_domain and check_domain. Changing records needs separate authorization at your DNS host, such as an already-authorized provider CLI.
Is it free?
The free plan covers 3,000 emails per rolling 30 days, sent and received together, across 3 domains and 5 inboxes. The paid plan is on the pricing page.
How do I disconnect Claude Code?
Disconnect the agent in MailMoose under Assistant → Connections, then remove the MailMoose server from Claude Code.