App password ยท about 3 min

Connect iCloud Mail to your AI agents

Apple has no mail API and no third-party sign-in, so Claude, ChatGPT and most tools simply skip iCloud. Emailgents speaks IMAP to Apple directly and needs one app-specific password.

Covers
  • @icloud.com, @me.com and @mac.com addresses
  • iCloud+ custom email domains
  • Hide My Email aliases, which land in the same inbox
host
imap.mail.me.com
port
993 (TLS)
auth
app password
create at
account.apple.com/account/manage

There is no iCloud Mail REST API and no OAuth flow a connector could use. The only sanctioned door is IMAP with an app-specific password, which is exactly why neither Claude nor ChatGPT ships an iCloud connector and why most agent platforms list every provider except Apple.

Emailgents was built around that door. Our IMAP engine talks to imap.mail.me.com over TLS, indexes your folders incrementally, and exposes iCloud to every agent through the same MCP server as your Gmail or Outlook. The app-specific password is encrypted at rest and can be revoked at Apple any time.

How to connect iCloud

Nothing is stored until the connection test passes.

  1. 01
    Open your Apple accountGo to account.apple.com, sign in, and open Sign-In and Security. Two-factor authentication must be on; Apple requires it for app-specific passwords.
  2. 02
    Create an app-specific passwordChoose App-Specific Passwords, generate one and name it Emailgents. Apple shows the 16-character password (xxxx-xxxx-xxxx-xxxx) once; copy it.
  3. 03
    Paste it into EmailgentsIn Mailboxes choose iCloud Mail, enter your full iCloud address and the password. Emailgents tests the connection immediately and starts indexing the last 90 days.
  4. 04
    Add the connector to your agentPaste https://emailgents.com/mcp into Claude, ChatGPT, Cursor or any MCP client and sign in once. iCloud appears in list_accounts like any other mailbox.
MCP server URL for any agent
https://emailgents.com/mcp

What agents get

  • Every iCloud folder, including the ones you created in Mail.app, plus Sent, Archive, Junk and Trash.
  • Incremental sync keyed on IMAP UIDs, so new mail appears within minutes without rescanning the mailbox.
  • Mail sent to Hide My Email aliases and to iCloud+ custom domain addresses, because it all lands in the same account.
  • The same tools as every other provider: search_messages, get_message, get_thread, get_attachment and set_flags.

Limits and prerequisites

  • Apple requires two-factor authentication before it will issue an app-specific password.
  • Apple Mail features that live on your device, such as rules, VIPs and Mail Privacy Protection, are not visible over IMAP.
  • Apple limits how many app-specific passwords an account can hold; if you hit the cap, revoke an old one at account.apple.com.

Use it from your agent

Once iCloud is connected, add Emailgents to the agent you use.

iCloud questions

Does Apple have an iCloud Mail API?

No. There is no public REST API and no OAuth for iCloud Mail. IMAP with an app-specific password is the only supported way for any third-party software, including desktop mail clients, to read iCloud mail.

Can Claude or ChatGPT connect to iCloud Mail directly?

Not today. Neither offers an iCloud connector. With Emailgents added as a connector, both can search and read your iCloud mail, and you can connect several Apple IDs if you have more than one.

What can someone do with the app-specific password?

It only works for the Mail protocols, not for iCloud Drive, Photos or your Apple ID itself, and Emailgents stores it encrypted with keys that never leave the server. Revoking it at account.apple.com cuts access instantly.

Is it safe to give an AI agent access to my iCloud mail?

Emailgents only exposes read tools (search, open, thread, attachment) plus one flag tool for read/unread and starred. There is no send, reply, forward, move or delete, so a prompt hidden in an email cannot make your agent act on your behalf. Credentials are encrypted at rest, every agent call is written to your Activity page, and you can revoke a mailbox or a key in one click.

Do iCloud+ custom domains work?

Yes. Enter the custom-domain address as your username; the mail still lives in your iCloud account at imap.mail.me.com.

What exactly does Emailgents store from iCloud?

A structured index of recent mail: sender, recipients, subject, date, folder, flags, thread references, attachment names and a short cleaned snippet. The default window is 90 days per mailbox and you can change it. Full bodies are fetched from iCloud on demand and only cached, encrypted, if you turn body caching on for that mailbox.

Which agents can read my iCloud inbox through Emailgents?

Any MCP client: Claude, ChatGPT, Claude Code, Cursor, Codex, Gemini CLI, Windsurf, VS Code and any other MCP client, or your own scripts over REST. You add one URL, https://emailgents.com/mcp, sign in once, and every mailbox you have connected appears to that agent.

Other providers

Your agents can read mail in five minutes.

One account, as many mailboxes as you need, every agent you run.