Skip to content

Mail MCP

Secure IMAP/SMTP/EWS/Graph API MCP server in Rust — Microsoft 365, Hotmail, Gmail, Zoho, OAuth2, multi-account

Install

$git clone https://github.com/tecnologicachile/mail-mcp

Install command taken from the project's README or registry entry. Always review code before running it.

mail-mcp

<strong>Production-ready email MCP server for AI agents</strong>
IMAP + SMTP + EWS + Microsoft Graph API — built in Rust

Most email MCP servers only do IMAP reads. This one does everything: read, search, send, reply, forward, bulk operations, Microsoft Graph API, and Exchange Web Services — with real OAuth2, multi-account, and multi-provider support. Written in Rust for speed and safety.

What's New in v0.5.0

  • New: draft tools (draft_create, draft_update, draft_send, draft_delete, draft_list) closing #3 and #17. An agent can save a message in the account's own Drafts folder, revise it, and send it later, so a person can review it in their mail client first. The same five tools work on every backend: IMAP + SMTP, Exchange Web Services and Microsoft Graph, picked per account (EWS config, else Graph config, else IMAP). list_all_accounts reports the backend as drafts_with.
  • Separate gate: MAIL_DRAFTS_ENABLED (default false). It is independent of MAIL_IMAP_WRITE_ENABLED: every operation on an existing draft_id first checks that the target really is a draft (IMAP Drafts folder, EWS IsDraft, Graph isDraft), so enabling drafts never grants move or delete on other mail. draft_send also requires MAIL_SMTP_WRITE_ENABLED.
  • Graph accounts need the Mail.ReadWrite scope for drafts; see account setup. The EWS attachment flow (CreateItem with SaveOnly, then CreateAttachment) follows the approach proposed by @verdelyi in #14.
  • Fix: SMTP messages now carry a Message-ID on the sender's domain (#7). Before, lettre sent no Message-ID of its own, so the id returned by the send tools was empty and the Sent copy had none.
  • Verified live on IMAP (Zoho) and Microsoft Graph; the EWS draft path is covered by unit tests.

What's New in v0.4.17

  • New: imap_search_all_mailboxes by @tdabasinskas in #35. Runs one search in every selectable mailbox of an account and returns the newest matches, each labelled with its mailbox. Built for providers without an "All Mail" folder (iCloud), where one conversation is spread over INBOX, Sent Messages and project folders. The work is spread over MAIL_IMAP_SEARCH_CONCURRENCY connections (default 4, clamped to 1..=8); a mailbox that fails is reported and does not abort the search. Scope it with include_mailboxes / exclude_mailboxes.
  • Thread search by Message-ID by @tdabasinskas in #34. imap_search_messages takes a new thread_message_id criterion that matches a message and every message whose In-Reply-To or References carries it, so an agent can pull a whole conversation in one search.

What's New in v0.4.16

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io