How to connect Claude Code to your business email with MCP
Quick answer: Create a key in Domailo under Settings › AI integrations and run: claude mcp add --transport http domailo https://domailo.app/mcp --header "Authorization: Bearer YOUR_KEY". In your next Claude Code session, Domailo's tools show up as mcp__domailo__listar_emails, mcp__domailo__enviar_email and the rest.
- Read only
- Checked on October 17, 2026
Who it is for
For people who live in the terminal: the technical founder who also answers support@, the developer who gets bug reports by email, the small product team that does not want another tab open to see what the customer wrote.
With Domailo in Claude Code, the same assistant that reads your code reads the customer's email, opens the attached log and drafts the reply. The key acts as you, with the mailboxes you already open.
What it looks like
Request: List my Domailo mailboxes and tell me which ones can send email.
listar_caixas2 mailboxes · 1 domain
Both mailboxes on the example.com domain can send:
- contact@example.comcan send
- sales@example.comcan send
How to connect
- In Domailo, open Settings › AI integrations and click New key. Give it a name (for example, "Claude Code on my laptop") and pick the access: "Read only" to explore, "Read and write" to also send and organize. Copy the key: it is shown only once.
- In the terminal, run: claude mcp add --transport http domailo https://domailo.app/mcp --header "Authorization: Bearer YOUR_KEY". The default scope (local) applies only to the current project; add --scope user to use Domailo in every project.
- Open Claude Code and type /mcp to check that the domailo server shows as connected.
- Ask for something simple to test, such as "List my Domailo mailboxes". Claude Code asks permission before each tool; approve the read tools and keep manual approval for sending.
- If you would rather not use a key, run the command without --header and authenticate the server through /mcp, which opens the Domailo sign-in in your browser.
- To revoke, delete the key under Settings › AI integrations. It stops working immediately; also remove the server with claude mcp remove domailo.
Ready-to-copy prompts
Swap the addresses and names for yours. The more specific the request (mailbox, time period, what the reply must say), the better the result.
- List the conversations in the Pending folder of support@example.com and summarize each in one line.
- Read the latest email mentioning "error" in support@example.com and tell me the steps to reproduce the problem.
- Open the .txt attachment in the latest conversation with Camila Rocha and find the error message.
- In contact@example.com, draft a reply to Pedro Lima saying the fix ships in the next release. Don't send it.
Depending on your setup
- Read only
- To explore safely, create a "Read only" key: Claude Code gets only listar_caixas, listar_emails, ler_email and ler_anexo, and there is no way to send or delete anything.
- Project shared with the team
- With --scope project, the server goes into the repository's .mcp.json file. Do not put the key in a versioned file: each person uses their own key, through an environment variable, or signs in through /mcp.
- Non-interactive runs (claude -p)
- In scripts, allow only the tools you need with --allowedTools (for example, mcp__domailo__listar_emails). Everything else stays blocked.
Permissions needed
- "Read only" access is enough. Tools used:
listar_caixas. - Admins, and people an admin allowed to use AI assistants. Each person sees only the mailboxes they already open in the webmail.
- Included in the Startup, Essential and Team plans and during the trial.
Caveats and limits
- We tested the key path: Claude Code listed the mailboxes through Domailo's server. Signing in through /mcp uses the same OAuth as claude.ai.
- The key gives access to email as if it were you. Do not paste it into repositories, issues or chats; if it leaks, revoke it under Settings › AI integrations.
- Through MCP, Domailo sends plain text to one recipient per message: no attachments and no CC/BCC.
- Each person can have up to 20 active keys. MCP is included in the Startup, Essential and Team plans and during the trial; the legacy Free plan does not include MCP.
Frequently asked questions
Should I use a key or sign-in to connect Claude Code?
Both work. The key is the most direct path: one command and you are done. Sign-in (OAuth) through /mcp avoids storing a key on your computer and renews access on its own. Both act as you and can be revoked under Settings › AI integrations.
Where does Claude Code store the configuration?
In the local and user scopes, in ~/.claude.json on your computer. In the project scope, in the .mcp.json file at the repository root, which is usually versioned; that is why the key should not go in that file.
Can I use it in automations and CI?
Yes, with claude -p and a key stored as an environment secret. Prefer a "Read only" key and allow only the tools you need with --allowedTools. One key per automation makes it easy to revoke without affecting anything else.
Does it work with Cursor and other editors?
Clients that accept a remote HTTP MCP server with an authorization header use the same key and the JSON configuration shown under Settings › AI integrations. So far we have tested Claude and Claude Code.