Basic information

Runtime
Rust
Version
1.0.0
Category
License
MIT
Transports
stdio
Author
tecnologicachile
Submitted by
Community
Quality
30
Stars
41

About mail-mcp Server

Rust-based email MCP server with IMAP/SMTP/EWS/Graph API support, OAuth2, multi-account for Microsoft 365, Gmail, Zoho - read, send, search emails

mail-mcp is a MCP server in the Communication category listed in the AddMCP.net directory, published by tecnologicachile. It exposes 20 tools, including list_all_accounts, imap_list_accounts, imap_verify_account, imap_list_mailboxes and more. Supported transport: stdio. Runtime: Rust. License: MIT. The repository has 41 GitHub stars. Source code is hosted on github.com. Related topics: communication, community.

Setup

{
    "mcpServers": {
        "mail": {
            "command": "./target/release/mail-mcp",
            "env": {
                "MAIL_IMAP_DEFAULT_HOST": "imap.gmail.com",
                "MAIL_IMAP_DEFAULT_USER": "<YOUR_EMAIL>",
                "MAIL_IMAP_DEFAULT_PASS": "<YOUR_APP_PASSWORD>",
                "MAIL_SMTP_DEFAULT_HOST": "smtp.gmail.com",
                "MAIL_SMTP_DEFAULT_PORT": "587",
                "MAIL_SMTP_DEFAULT_USER": "<YOUR_EMAIL>",
                "MAIL_SMTP_DEFAULT_PASS": "<YOUR_APP_PASSWORD>",
                "MAIL_SMTP_DEFAULT_SECURE": "starttls",
                "MAIL_IMAP_WRITE_ENABLED": "true",
                "MAIL_SMTP_WRITE_ENABLED": "true"
            }
        }
    }
}

mail-mcp config

Add this server to your MCP-compatible client using the configuration below.

{
    "mcpServers": {
        "mail": {
            "command": "./target/release/mail-mcp",
            "env": {
                "MAIL_IMAP_DEFAULT_HOST": "imap.gmail.com",
                "MAIL_IMAP_DEFAULT_USER": "<YOUR_EMAIL>",
                "MAIL_IMAP_DEFAULT_PASS": "<YOUR_APP_PASSWORD>",
                "MAIL_SMTP_DEFAULT_HOST": "smtp.gmail.com",
                "MAIL_SMTP_DEFAULT_PORT": "587",
                "MAIL_SMTP_DEFAULT_USER": "<YOUR_EMAIL>",
                "MAIL_SMTP_DEFAULT_PASS": "<YOUR_APP_PASSWORD>",
                "MAIL_SMTP_DEFAULT_SECURE": "starttls",
                "MAIL_IMAP_WRITE_ENABLED": "true",
                "MAIL_SMTP_WRITE_ENABLED": "true"
            }
        }
    }
}

mail-mcp tools

  • list_all_accounts — List all accounts with capabilities (IMAP, SMTP, Graph, EWS)
  • imap_list_accounts — List IMAP accounts
  • imap_verify_account — Test connectivity and auth
  • imap_list_mailboxes — List folders
  • imap_mailbox_status — Message counts
  • imap_search_messages — Search with cursor pagination
  • imap_get_message — Parsed message (text, HTML, attachments)
  • imap_get_message_raw — RFC822 source
  • imap_update_message_flags — Add/remove flags
  • imap_copy_message — Copy (cross-account supported)
  • imap_move_message — Move to folder
  • imap_delete_message — Delete with confirmation
  • imap_create_mailbox — Create folder
  • smtp_send_message — Send email (text/HTML, CC/BCC)
  • smtp_reply_message — Reply with threading headers
  • smtp_forward_message — Forward with original inline
  • graph_send_message — Send via Microsoft Graph API
  • ews_search_messages — Search emails via EWS
  • ews_get_message — Get full email content via EWS
  • ews_send_message — Send email via EWS

Overview

What is mail-mcp?

Production-ready email MCP server for AI agents. It integrates with IMAP, SMTP, Microsoft Graph API, and Exchange Web Services (EWS) to provide read, search, send, reply, forward, and bulk operations. Written in Rust for speed and safety, it supports real OAuth2 and multiple accounts across providers like Microsoft 365, Gmail, Zoho, Fastmail, and any generic IMAP/SMTP server.

How to use mail-mcp?

Key features of mail-mcp

  • 18 IMAP read/write tools (vs. 3–5 typical)
  • SMTP send, reply, forward with multipart support
  • Microsoft Graph API and Exchange Web Services
  • Native OAuth2 for XOAUTH2 authentication
  • Multi-account and multi-provider configuration
  • 64 unit + integration tests, zero release-build warnings

Use cases of mail-mcp

  • AI agent sends and manages emails across enterprise Microsoft 365 accounts
  • Read, search, and organize emails from Gmail, Zoho, or Hotmail
  • Automatic sent-message deduplication per provider (Gmail, Zoho, Office 365)
  • Bulk forward or reply to messages with attachments via Graph API
  • Replace multiple single-account email MCP servers with one unified tool

Videos

Tutorials, guides, and showcases related to mail-mcp. The player loads when you press play.

Videos belong to their creators. Relevance is approximate; check the channel and description before following setup steps.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬