IMAP/SMTP email for AI agents, read, send, organize, and manage attachments across accounts.
At a glance
Not tested yet- GitHub stars
- 38
- Weekly downloads
- 1,630
- Last commit
- 2026-11-21
- Licence
- Apache-2.0
- Transport
- stdio
- Auth
- api-key
npx -y @n24q02m/email
What it does
Email is an MCP server that gives AI agents IMAP/SMTP email access. Agents can read, send, reply, forward, organize and manage attachments across several accounts. It is for people who want their agent to work with existing mailboxes such as Gmail, Outlook, Yahoo, iCloud, Zoho, ProtonMail or a custom IMAP host.
Tools it gives your agent
messages: search, read, mark read or unread, flag, unflag, move, archive, trash, send new mail, reply and forward.folders: list folders and show folder status.attachments: list and download attachments.config: report credential status, run setup steps, set values and clear the cache.help: on-demand help for a tool.
Quick start
- Add the server to your MCP client config with
EMAIL_CREDENTIALSset touser@gmail.com:app-password. - For several accounts, separate entries with commas, or list them in an accounts file.
- Most providers use an App Password. Outlook, Hotmail and Live use a bundled OAuth device-code flow.
- IMAP and SMTP host and port settings are auto-discovered from the email domain.
npx @n24q02m/email auth user@outlook.com
Add this to .mcp.json in your project root (Claude Code) or .cursor/mcp.json (Cursor):
{
"mcpServers": {
"email": {
"command": "npx",
"args": [
"-y",
"@n24q02m/email"
],
"env": {
"EMAIL_CREDENTIALS": "YOUR_EMAIL_CREDENTIALS"
}
}
}
}Replace each YOUR_ value with your own, and delete the variables you do not use.
Environment variables
EMAIL_CREDENTIALS: account credentials in the formuser@gmail.com:app-password. Multiple accounts are comma-separated.
Example prompts
- Search my inbox for unread mail from my boss and show the five most recent.
- Read message 4211 and give me a short preview.
- Reply to that message and keep it in the same thread.
- List my folders and download the invoice.pdf attachment from message 42.
What to watch out for
- The server exits when no credentials are set through the accounts file,
EMAIL_CREDENTIALS, orEMAIL_USERplusEMAIL_APP_PASSWORD. - Most providers need an App Password. Outlook, Hotmail and Live need the OAuth device-code sign-in.
- HTTP mode is opt-in and uses a shared bearer token or a
users.tomltoken table for several users. - The README does not state costs or rate limits.
Not tested by tools4agents yet. Read the source repository before you install it.
Similar tools
Atomic Mail
Programmable email inbox for AI agents, JMAP, PoW auth, stdio MCP server.
Smitline: AI Phone Calls & Meetings
Let AI agents make phone calls and join Zoom, Teams and Google Meet meetings. Hosted or self-hosted.
Slack
Read channels, search message history, and post updates, so an agent can pull context from where decisions actually happened.
OpenDocKit
Read local PDF, Office, HWP, OpenDocument, RTF, EPUB, HTML and email files as Markdown. Offline.