Email over IMAP and SMTP: search and read messages and attachments; draft and send when switched on
Connect Runs on your machine
claude mcp add emperor-mail -e MAIL_USER=<MAIL_USER> -e MAIL_PASSWORD=<MAIL_PASSWORD> -e MAIL_OAUTH_TOKEN=<MAIL_OAUTH_TOKEN> -e MAIL_FROM=<MAIL_FROM> -e IMAP_HOST=<IMAP_HOST> -e IMAP_PORT=<IMAP_PORT> -e IMAP_SECURITY=<IMAP_SECURITY> -e SMTP_HOST=<SMTP_HOST> -e SMTP_PORT=<SMTP_PORT> -e SMTP_SECURITY=<SMTP_SECURITY> -e MAIL_WRITABLE=<MAIL_WRITABLE> -e MAIL_ALLOW_SEND=<MAIL_ALLOW_SEND> -e MAIL_SEND_ALLOW=<MAIL_SEND_ALLOW> -e MAIL_FROM_ALLOW=<MAIL_FROM_ALLOW> -- emperor-mail
{
"mcpServers": {
"emperor-mail": {
"command": "emperor-mail",
"args": [],
"env": {
"MAIL_USER": "<MAIL_USER>",
"MAIL_PASSWORD": "<MAIL_PASSWORD>",
"MAIL_OAUTH_TOKEN": "<MAIL_OAUTH_TOKEN>",
"MAIL_FROM": "<MAIL_FROM>",
"IMAP_HOST": "<IMAP_HOST>",
"IMAP_PORT": "<IMAP_PORT>",
"IMAP_SECURITY": "<IMAP_SECURITY>",
"SMTP_HOST": "<SMTP_HOST>",
"SMTP_PORT": "<SMTP_PORT>",
"SMTP_SECURITY": "<SMTP_SECURITY>",
"MAIL_WRITABLE": "<MAIL_WRITABLE>",
"MAIL_ALLOW_SEND": "<MAIL_ALLOW_SEND>",
"MAIL_SEND_ALLOW": "<MAIL_SEND_ALLOW>",
"MAIL_FROM_ALLOW": "<MAIL_FROM_ALLOW>"
}
}
}
}
{
"mcpServers": {
"emperor-mail": {
"command": "emperor-mail",
"args": [],
"env": {
"MAIL_USER": "<MAIL_USER>",
"MAIL_PASSWORD": "<MAIL_PASSWORD>",
"MAIL_OAUTH_TOKEN": "<MAIL_OAUTH_TOKEN>",
"MAIL_FROM": "<MAIL_FROM>",
"IMAP_HOST": "<IMAP_HOST>",
"IMAP_PORT": "<IMAP_PORT>",
"IMAP_SECURITY": "<IMAP_SECURITY>",
"SMTP_HOST": "<SMTP_HOST>",
"SMTP_PORT": "<SMTP_PORT>",
"SMTP_SECURITY": "<SMTP_SECURITY>",
"MAIL_WRITABLE": "<MAIL_WRITABLE>",
"MAIL_ALLOW_SEND": "<MAIL_ALLOW_SEND>",
"MAIL_SEND_ALLOW": "<MAIL_SEND_ALLOW>",
"MAIL_FROM_ALLOW": "<MAIL_FROM_ALLOW>"
}
}
}
}
{
"servers": {
"emperor-mail": {
"type": "stdio",
"command": "emperor-mail",
"args": [],
"env": {
"MAIL_USER": "<MAIL_USER>",
"MAIL_PASSWORD": "<MAIL_PASSWORD>",
"MAIL_OAUTH_TOKEN": "<MAIL_OAUTH_TOKEN>",
"MAIL_FROM": "<MAIL_FROM>",
"IMAP_HOST": "<IMAP_HOST>",
"IMAP_PORT": "<IMAP_PORT>",
"IMAP_SECURITY": "<IMAP_SECURITY>",
"SMTP_HOST": "<SMTP_HOST>",
"SMTP_PORT": "<SMTP_PORT>",
"SMTP_SECURITY": "<SMTP_SECURITY>",
"MAIL_WRITABLE": "<MAIL_WRITABLE>",
"MAIL_ALLOW_SEND": "<MAIL_ALLOW_SEND>",
"MAIL_SEND_ALLOW": "<MAIL_SEND_ALLOW>",
"MAIL_FROM_ALLOW": "<MAIL_FROM_ALLOW>"
}
}
}
}
Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.
Tools
This server runs locally, so its tools are listed by your MCP client once it starts.
Environment variables
| Name | Description |
|---|---|
MAIL_USERRequired | Login name for IMAP and SMTP |
MAIL_PASSWORDOptional, secret | Password or app password (set this or MAIL_OAUTH_TOKEN) |
MAIL_OAUTH_TOKENOptional, secret | OAuth 2.0 access token for XOAUTH2, instead of a password (Gmail, Microsoft 365) |
MAIL_FROMOptional | From address when the login name is not an address (default: the login name) |
IMAP_HOSTRequired | IMAP server host name |
IMAP_PORTOptional | IMAP port (default 993, or 143 with starttls) |
IMAP_SECURITYOptional | IMAP connection security; plain only for a loopback host (default tls, starttls on port 143) |
SMTP_HOSTOptional | SMTP server host name, needed only for send |
SMTP_PORTOptional | SMTP port (default 465, or 587 with starttls) |
SMTP_SECURITYOptional | SMTP connection security; plain only for a loopback host (default tls, starttls on ports 587 and 25) |
MAIL_WRITABLEOptional | true offers the draft tool; unset, empty, false, 0, no or off keep the server read-only |
MAIL_ALLOW_SENDOptional | true offers the send tool and draft; unset, empty, false, 0, no or off keep send out of the tool list |
MAIL_SEND_ALLOWOptional | Comma-separated recipients send may write to: addresses ([email protected]) or domains (@example.org). With sending on and none set, every recipient is refused |
MAIL_FROM_ALLOWOptional | Comma-separated From addresses send and draft may use: addresses or domains (@example.org). Unset: any |
Details
| Package | [email protected] (CARGO, stdio) |
| First published | 2 Nov 2026 |
| Last updated | 2 Nov 2026 |
| Registry name | io.github.yarenty/emperor-mail |
More communication servers See all
Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.
