Claude cannot read your inbox on its own. To let it find the invoice a supplier sent in March, summarize a long thread, or pull the dates out of a contract attachment, you connect it to your mailbox through an MCP server. MCP (the Model Context Protocol) is the open standard Claude uses to talk to outside tools.
If you use Gmail or Microsoft 365, you probably do not need this guide. Those services have official connectors, and they are the better choice. This guide is for everyone else: people on Fastmail, Zoho Mail, iCloud, Yahoo, or a mailbox at their own domain, where there is no official Claude connector to install. Automata is a free, open-source MCP server that connects any IMAP mailbox to Claude, and lets you decide which folders Claude can see.
Should you use this or an official connector?
Use the official one when there is one. It is maintained by the provider or by Anthropic, and it signs in with OAuth instead of a stored password. Automata fills the gap for mailboxes that have no official connector.
| Your mail provider | Best option |
|---|---|
| Gmail or Google Workspace | The official Google connector in Claude. Automata can also connect Gmail with an app password, but the official route is simpler and more capable. |
| Microsoft 365 or Outlook.com | The official Microsoft connector in Claude. Automata cannot connect these: Microsoft no longer accepts passwords over IMAP and requires OAuth, which Automata does not support. |
| Fastmail, Zoho Mail, iCloud, Yahoo | Automata. These all have presets and issue app passwords for exactly this purpose. |
| A mailbox at your own domain (hosting provider, self-hosted mail server) | Automata, as long as the server offers IMAP over TLS or STARTTLS and accepts a password login. |
Availability of official connectors changes, so check Claude's connector directory for your provider before you set anything up.
What you need
- A mailbox on a provider that offers IMAP and app passwords (or an ordinary password login). Fastmail, iCloud, Zoho, and Yahoo all do.
- A Claude account on a plan that supports custom connectors. Anthropic changes plan availability over time, so check their current details.
- Somewhere to run Automata. The easiest option is the hosted version at mcp.getautomata.app, which needs no server and has a free tier for one connection. To self-host instead, use the one-click Railway template or Docker.
- About ten minutes.
What Claude can do with your mailbox
An Automata email connection gives Claude read access to one mailbox. It can:
- List your folders, with unread counts.
- List emails, newest first, filtered by date, unread, flagged, or has-attachment.
- Search by sender, recipient, subject, or body text.
- Read an email's text and see its list of attachments.
- Fetch an attachment: images as images, text files as text, and PDFs and other files as embedded files, up to 10 MB each by default.
- Optionally save an unsent draft in your Drafts folder, for example a reply you can review and send yourself.
Claude cannot send, delete, move, or mark mail. Even the draft tool only saves a draft, and a new email token starts with it switched off.
Under the hood these are seven tools: get-mailbox-status, list-mail-folders, list-emails, search-emails, read-email, get-email-attachment, and create-email-draft. Every one is limited to the folders on the token.
How the connection works
Three pieces are involved, and only the middle one is new:
- Claude is the MCP client. It sends requests to a URL.
- Automata is the MCP server. It checks the connector token on every request, enforces which folders and tools are allowed, and talks to your mail server.
- Your mail server stays the source of truth. Automata logs in over IMAP with the app password you give it.
Automata keeps a small index of your mail so listings are fast: sender, recipients, subject, date, read and flagged state, and attachment names and sizes, about 1 KB per email. Email bodies and attachment contents are not stored. They are fetched live from your mail server when Claude asks for one, and reading an email this way does not mark it as read in your mail client.
Because the permission check happens in Automata and not in the prompt, Claude cannot talk its way into a folder you did not allow. Read more about how Automata enforces permissions.
Step 1: Create an app password
Do not give Automata your main password. Create an app password in your provider's security settings instead. Fastmail, iCloud, Zoho, and Yahoo all issue passwords meant for this, and so does Gmail once 2-Step Verification is on. An app password can be revoked on its own without changing your real password, which is exactly what you want if you ever stop using the connection.
Some providers also have IMAP access switched off until you enable it, so check your mail settings for an IMAP option. Your provider's help pages list the IMAP server and port if you need them in the next step.
Automata signs in over IMAP with a username and password. That is what makes it work with providers that have no OAuth integration, and it is also why Microsoft 365 and Outlook.com are not supported. Use a dedicated app password so you can revoke it independently.
Step 2: Add the mailbox to Automata
Sign up at mcp.getautomata.app, or open your own instance, and create a connection. Choose Email (IMAP) and fill in:
| Field | What to enter |
|---|---|
| Server | Your provider's IMAP host. The presets fill this in for Gmail, iCloud, Fastmail, Zoho, and Yahoo. |
| Port and security | TLS (usually port 993) or STARTTLS (usually 143). There is no unencrypted option. |
| Username | Usually your full email address. |
| Password | The app password from step 1. |
Automata logs in to check the credentials before it saves anything, so a wrong password fails right away instead of leaving a connection that never syncs. TLS certificates are verified against the host name, and a STARTTLS server that does not upgrade the connection is refused rather than sent your password in clear.
After the connection is created, Automata starts syncing headers immediately and then every two minutes. By default it syncs every folder except All Mail, Junk, and Trash, and backfills the last 365 days, newest first. Large mailboxes take a few runs to catch up, and the dashboard shows how far each folder has got.
Step 3: Choose the folders
On the connection's dashboard, create a connector token. This is where Automata differs from handing Claude a whole mailbox: each token has its own settings.
| Setting | What it controls |
|---|---|
| Name and expiry | A label for you, and when the token stops working: 30 days, 90 days (the default), 1 year, or never. |
| Folders | Which folders the token can see: all folders, or only the ones you pick. |
| Actions | Which tools it can call. A new email token starts read-only, with the read tools ticked and create-email-draft not. |
A good first token is narrow: choose one or two folders, such as Clients or Invoices, and keep the read-only actions. An email that is filed in several folders (as Gmail labels do) is reachable only through a copy in an allowed folder, and a request for a folder outside the token is refused by name. If you later want Claude to save drafts, tick create-email-draft and include your Drafts folder in the list.
Automata shows the token once and stores only its hash. Scope changes take effect on the next request without reissuing the token.
Step 4: Add it to Claude
Copy the connector URL from the dashboard. The endpoint looks like this:
https://mcp.getautomata.app/mcp/<connector-token>
Claude.ai and Claude Desktop
- Open Settings → Customize → Connectors.
- Click Add and choose Add custom connector.
- Enter a name such as
Fastmailand paste the connector URL. - Click Continue, then enable the connector in a new chat.
Claude Code
Run one command, replacing the URL with your own:
claude mcp add --transport http mail \
https://mcp.getautomata.app/mcp/<connector-token>
If you connect more than one mailbox, give each connector a distinct name such as work-mail and personal-mail. Each token is bound to exactly one connection, so Claude can never address the wrong mailbox. If your client supports custom headers, you can use the plain /mcp endpoint with an Authorization: Bearer header instead, which keeps the token out of URLs. The MCP clients docs cover both formats.
Step 5: Test it
Start with the safest request and confirm the connection works before asking for anything real. In a new chat with the connector enabled, ask:
Check the mailbox status.
Claude calls get-mailbox-status and should report which mailbox it is connected to, when the last sync ran, and whether any folders are still backfilling. Then try prompts that match the folders you allowed:
- Find the invoice from the Acme account manager in the last two months and tell me the total.
- Summarize every unread email in Clients since Monday and list what each person is waiting on.
- What did the landlord say about the deposit? Quote the relevant lines.
- Read the contract PDF attached to the latest email from legal and list the key dates.
- Draft a reply to the supplier confirming the new delivery date. Save it, do not send it.
Ask about a folder you did not allow and Claude will not find it, and a direct request is refused by name. That is the permission layer working as intended.
Keep it safe
Email is different from a chat app in one important way: anyone on the internet can put text in front of Claude just by sending you a message. An email can contain instructions aimed at the model, a trick known as prompt injection. No prompt reliably prevents it, so the controls that matter are the ones that still hold when the model is fooled.
- Keep the token read-only unless you need drafts. A read-only token cannot change anything, and even the draft tool cannot send. Claude can still read and quote what is in the folders you allow, so be deliberate about which folders those are.
- Scope to folders, not the whole mailbox. Leave out folders with password resets, banking, and legal mail unless you need them.
- Use an app password and revoke it from your provider if the connector is ever compromised. Automata stores connection credentials, including the mailbox password, in its database in clear text, as it does for every connection, so this is the main reason to use a revocable app password and to run your own instance if your threat model needs it.
- Treat the connector URL like a password. Anyone with the token can read the folders it allows. If it leaks, revoke that one token and create a new one; your other tokens keep working.
- Prefer an expiry such as 30 or 90 days over a token that never expires.
- Remember where the text goes. Whatever Claude reads is sent to Anthropic as part of the conversation, so apply the same judgment you would to pasting those emails in yourself.
Troubleshooting
| Symptom | Likely cause and fix |
|---|---|
| Creating the connection fails | Automata logs in before saving, so the server, port, security mode, username, or password is wrong. Check that IMAP is enabled at your provider and that you used an app password. |
| The connection works, but the sync stops | A refused password pauses the sync on purpose, because retrying a bad login every two minutes is how providers lock accounts. Use Change credentials, or fix the password and press Sync now. |
| A recent email is missing | New mail arrives within about two minutes. Check the sync status on the dashboard. Listings also say when the sync is behind. |
| A folder is missing or empty | All Mail, Junk, and Trash are not synced (they still appear in list-mail-folders with synced: false). Otherwise, the token's folder list may not include it. |
| Old mail is not found | By default the header sync reaches back 365 days, newest first. A folder that stopped at a limit says so, and Claude is told that the end of a listing then means the oldest synced email. |
| Body text search misses an email | Body search is passed to your mail server's own search. Most servers match substrings, while Gmail matches whole words. Searching sender, recipient, or subject uses the synced headers and is more predictable. |
| An attachment is refused | Attachments over 10 MB by default are refused before anything is downloaded. |
| The mail server address is refused | Automata blocks private and loopback addresses for outbound connections. Self-hosters can allow them on purpose, but hosted Automata cannot reach a server on your private network. |
Claude shows a 401 error | The token is missing, invalid, expired, or revoked. Create a new connector token and update the URL. |
| Fewer tools than expected | The token's Actions setting allows only some tools. Edit the token and add the ones you need, then reconnect the connector in Claude. |
More fixes are in the troubleshooting guide, and the full behavior is documented in the email (IMAP) docs.
Frequently asked questions
Can Claude send email through Automata?
No. The email connection cannot send, delete, move, or mark mail. The optional draft tool saves an unsent plain-text draft in your Drafts folder, so you review it and press send yourself.
Does it work with Gmail or Outlook?
Gmail works with an app password, but the official Google connector is the better route. Microsoft 365 and Outlook.com cannot be connected, because Microsoft requires OAuth for IMAP. Use Claude's official Microsoft connector for those.
Will Claude mark my emails as read?
No. Automata opens folders read-only and fetches bodies without setting the read flag, so reading through Claude does not change the state of your inbox in your mail client.
Does Automata store my emails?
It stores a small header index (sender, recipients, subject, date, read and flagged state, and attachment names and sizes) and deletes it when you delete the connection. Email bodies and attachment contents stay on your mail server and are fetched live when Claude asks.
Is it free?
Yes. Automata is MIT licensed and free to self-host. The hosted version at mcp.getautomata.app has a free tier that covers one connection. You still need a Claude plan that supports custom connectors.
Can I connect more than one mailbox?
Yes. Create one connection per mailbox, each with its own token, and add each to Claude as a separate connector.
Next steps
- Read the email (IMAP) documentation for sync behavior, limits, and every setting.
- Add your chats to the same assistant: connect WhatsApp to Claude, or build a free AI chief of staff that reads WhatsApp and mail together.
- Give Claude safe database access too with read-only Postgres.
- See every endpoint format in the MCP clients guide.
- Lock things down further with the permissions docs.
Comments
Questions, corrections, or your own setup? Join in below. Pick any name to post.