Connect any IMAP mailbox to your AI agents
Company mail on your own server, a mailbox from your web host, mailbox.org or Posteo: if it speaks IMAP over TLS, it connects.
- Self-hosted Dovecot, Courier or Exchange with IMAP enabled
- Mailboxes from hosting providers (cPanel, Plesk and similar)
- Privacy providers such as mailbox.org, Posteo and Migadu
Integration platforms offer a handful of named providers. Everything else, which is where a lot of business and self-hosted mail lives, is left out.
Emailgents ships its own IMAP engine, so any server that offers IMAP over TLS on port 993 works: enter host, username and password and the mailbox is indexed like every other one.
How to connect IMAP
Nothing is stored until the connection test passes.
- 01Find your IMAP settingsYour provider lists an IMAP host and port, usually port 993 with TLS. Use the full email address as username unless the provider says otherwise.
- 02Use an app password if you have two-factorMost providers with two-factor authentication issue separate app passwords for mail clients. Create one named Emailgents.
- 03Add the mailbox in EmailgentsIn Mailboxes choose Other IMAP server, enter host, port, username and password. The connection is tested before anything is saved.
- 04Add the connector to your agentPaste https://emailgents.com/mcp into your agent and sign in once.
https://emailgents.com/mcpWhat agents get
- All folders the server exposes.
- Incremental sync using UIDs, with CONDSTORE where available.
- The same read-only tools and access log as every other provider.
Limits and prerequisites
- The server must offer IMAP over TLS (port 993) reachable from the public internet. Plain-text IMAP and local-only servers are not supported.
- Proton Mail requires Proton Bridge running on your own computer, so it cannot be reached by a hosted service like Emailgents.
- Self-signed certificates are rejected; use a certificate from a public authority.
Use it from your agent
Once IMAP is connected, add Emailgents to the agent you use.
- ClaudeClaude's built-in Gmail connector handles one Google account. Add Emailgents once and Claude reads all of your mailboxes, iCloud and IMAP included.2 min
- Claude CodeOne command in the terminal. Claude Code can then pull the bug report from your work mail, the invoice from iCloud and the Stripe receipt from Gmail without leaving the session.1 min
- ChatGPTChatGPT's built-in apps cover Gmail and Outlook. With Emailgents as a connector it also reads iCloud, Yahoo, Fastmail and your second Gmail, through one sign-in.3 min
- CursorBug reports, customer threads and vendor receipts live in email. Add one entry to mcp.json and Cursor's agent can read them without you copying and pasting.2 min
- CodexCodex CLI, the IDE extension and the ChatGPT desktop app share one MCP configuration. Add Emailgents once and all of them can read your mail.2 min
- Gemini CLIGemini in Gmail reads one Google account. Gemini CLI with Emailgents reads every inbox you own, from the terminal.2 min
IMAP questions
Which servers have you tested?
The engine is exercised against iCloud, Gmail, Yahoo, Fastmail, AOL, Zoho and GMX daily, and follows the IMAP4rev1 standard with UIDPLUS and CONDSTORE extensions where present. Standard Dovecot and hosting-provider setups work out of the box.
Is it safe to give an AI agent access to my IMAP 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.
How do I revoke access?
Remove the mailbox in Emailgents, or change the password or app password on your server.
What exactly does Emailgents store from your IMAP?
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 your IMAP on demand and only cached, encrypted, if you turn body caching on for that mailbox.
Which agents can read my IMAP 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.