MCP directory
E

emperor-mail

by github.com/yarenty · v0.1.3 · updated Nov 2, 2026

Email over IMAP and SMTP: search and read messages and attachments; draft and send when switched on

Cargo

Run it locally

Install the package and point your AI client at it.

Cargo

emperor-mail

Environment variables

  • MAIL_USERrequired

    Login name for IMAP and SMTP

  • MAIL_PASSWORDsecret

    Password or app password (set this or MAIL_OAUTH_TOKEN)

  • MAIL_OAUTH_TOKENsecret

    OAuth 2.0 access token for XOAUTH2, instead of a password (Gmail, Microsoft 365)

  • MAIL_FROM

    From address when the login name is not an address (default: the login name)

  • IMAP_HOSTrequired

    IMAP server host name

  • IMAP_PORT

    IMAP port (default 993, or 143 with starttls)

  • IMAP_SECURITY

    IMAP connection security; plain only for a loopback host (default tls, starttls on port 143)

  • SMTP_HOST

    SMTP server host name, needed only for send

  • SMTP_PORT

    SMTP port (default 465, or 587 with starttls)

  • SMTP_SECURITY

    SMTP connection security; plain only for a loopback host (default tls, starttls on ports 587 and 25)

  • MAIL_WRITABLE

    true offers the draft tool; unset, empty, false, 0, no or off keep the server read-only

  • MAIL_ALLOW_SEND

    true offers the send tool and draft; unset, empty, false, 0, no or off keep send out of the tool list

  • MAIL_SEND_ALLOW

    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_ALLOW

    Comma-separated From addresses send and draft may use: addresses or domains (@example.org). Unset: any

More from github.com/yarenty

More MCP servers