Email MCP Server
The most complete multi-backend email MCP server. 24 tools across 5 send backends and 3 read backends — send via SMTP, AWS SES, or SendGrid while reading from any IMAP server. File attachments, OAuth with auto-refresh, single Rust binary with enterprise governance.
Architecture
Key Principles
- Multi-backend — 5 send + 3 read backends, mix and match freely
- IMAP-first reading — works with any email provider, no OAuth required
- SMTP-first sending — universal, works with any relay
- Full email lifecycle — send, read, reply, forward, draft, organize, batch, delete
- No credential exposure — tokens stay in env vars, never reach LLM context
- Single binary — no Node.js, no Python, no runtime dependencies
Comparison with Other Email MCP Servers
Tools (24)
Sending & Composing (5)
Reading & Searching (6)
Organization (7)
Management (3)
Batch Operations (3)
Backend Status
Send Backends (5)
Priority: SMTP → SendGrid → SES → Gmail → Microsoft
Read Backends (3)
Priority: IMAP → Gmail → Microsoft
Common IMAP Hosts
Installation
cargo install mcp-email
Or build from source:
git clone https://github.com/zavora-ai/mcp-email
cd mcp-email
cargo build --release
Configuration Examples
SMTP + IMAP (universal — works with any provider)
export SMTP_HOST="smtp.gmail.com"
export SMTP_PORT="587"
export SMTP_USERNAME="[email protected]"
export SMTP_PASSWORD="app-password"
export SMTP_FROM="[email protected]"
export IMAP_HOST="imap.gmail.com"
export IMAP_PORT="993"
export IMAP_USERNAME="[email protected]"
export IMAP_PASSWORD="app-password"
SendGrid (send) + Gmail API (read)
export SENDGRID_API_KEY="SG.xxxx"
export SENDGRID_FROM="[email protected]"
export GMAIL_ACCESS_TOKEN="ya29.xxxx"
AWS SES (send) + IMAP (read)
export AWS_ACCESS_KEY_ID="AKIA..."
export AWS_SECRET_ACCESS_KEY="..."
export AWS_REGION="us-east-1"
export SES_FROM="[email protected]"
export IMAP_HOST="imap.gmail.com"
export IMAP_PORT="993"
export IMAP_USERNAME="[email protected]"
export IMAP_PASSWORD="app-password"
Client Configuration
Claude Desktop
{
"mcpServers": {
"email": {
"command": "mcp-email",
"args": [],
"env": {
"SMTP_HOST": "smtp.gmail.com",
"SMTP_PORT": "587",
"SMTP_USERNAME": "[email protected]",
"SMTP_PASSWORD": "app-password",
"SMTP_FROM": "[email protected]",
"IMAP_HOST": "imap.gmail.com",
"IMAP_PORT": "993",
"IMAP_USERNAME": "[email protected]",
"IMAP_PASSWORD": "app-password"
}
}
}
}
Kiro
Add to .kiro/settings/mcp.json:
{
"mcpServers": {
"email": {
"command": "mcp-email",
"args": [],
"env": {
"SENDGRID_API_KEY": "SG.xxxx",
"SENDGRID_FROM": "[email protected]",
"IMAP_HOST": "imap.gmail.com",
"IMAP_PORT": "993",
"IMAP_USERNAME": "[email protected]",
"IMAP_PASSWORD": "app-password"
}
}
}
}
Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"email": {
"command": "mcp-email",
"args": [],
"env": {
"SMTP_HOST": "smtp.gmail.com",
"SMTP_PORT": "587",
"SMTP_USERNAME": "[email protected]",
"SMTP_PASSWORD": "app-password",
"SMTP_FROM": "[email protected]"
}
}
}
}
Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"email": {
"command": "mcp-email",
"args": [],
"env": {
"SENDGRID_API_KEY": "SG.xxxx",
"SENDGRID_FROM": "[email protected]"
}
}
}
}
Usage Examples
Send an email with CC
"Send an email to [email protected], CC [email protected], about the deployment being ready"
→ calls send_email with to, cc, subject, body
Forward an email
"Forward the latest email from the client to the legal team"
→ calls search_emails → forward_email
Draft and review before sending
"Draft a reply to Bob's email but don't send it yet"
→ calls create_draft
"OK send that draft"
→ calls send_draft
Batch organize
"Move all emails from [email protected] to the Archive folder"
→ calls search_emails → batch_move
Read a thread
"Show me the full conversation thread about the budget proposal"
→ calls search_emails → get_thread
Download attachment
"Download the PDF attachment from Sarah's last email"
→ calls search_emails → get_attachments → download_attachment
MCP Server Manifest
server_id = "mcp_email"
display_name = "Email"
version = "1.7.0"
domain = "collaboration"
risk_level = "medium"
writes_allowed = "gated"
transports = ["stdio"]
credentials = ["vault://email-credentials"]
governance_gates = []
environments = ["development", "staging", "production"]
OAuth Setup (one-time)
# Gmail — opens browser for Google consent
mcp-email auth gmail
# Microsoft — opens browser for Microsoft consent
mcp-email auth microsoft
Tokens are saved to ~/.mcp-email/ and auto-refresh before expiry. No manual token management after first auth.
Roadmap
- Email filters (create/list/delete rules)
- Multi-account support
- Webhook for incoming email (SendGrid Inbound Parse)
- Email templates (Handlebars/Tera)
Documentation
Registry Compliance
This server implements the ADK MCP SDK contract:
- HealthCheck — async health probe for registry monitoring
- mcp-server.toml — manifest declaring tools, risk classes, and credentials
- Structured tracing —
RUST_LOGenv-filter for observability
Contributors
License
Apache-2.0 — see LICENSE for details.
Part of the ADK-Rust Enterprise MCP server ecosystem.
Built with ❤️ by Zavora AI
rmcp and MCP compatibility
This server is built with rmcp 3.1.2 and requires Rust 1.94.1 or newer. The rmcp 3 rollout retains legacy MCP initialization compatibility and targets MCP protocol revisions 2025-11-25 and 2026-07-28.
MCP 2026-07-28 rollout (P0 security)
This server uses rmcp 3.1.2 and adk-mcp-sdk 0.2 with a minimum supported
Rust version of 1.94.1. It accepts stateless MCP 2026 requests with
per-request protocol, client identity, and capability metadata while retaining
the legacy MCP 2025-11-25 initialize flow for ordinary tools.
- Tasks:
download_attachment,batch_delete,batch_move,batch_mark - MRTR approvals:
send_email,reply_to_email,move_to_folder,mark_read,create_draft,send_draft,delete_email,mark_unread,create_label,delete_label,batch_delete,batch_move - Discovery and routing: rmcp serves on-demand discovery and validates the
per-request protocol envelope; HTTP deployments can route with
Mcp-MethodandMcp-Name. The packaged binary currently uses stdio. - Caching:
tools/listreturns a publicttlMsof 60,000 for MCP 2026; rmcp omits the cache fields for legacy clients. - Deprecated extensions: this server does not add new Roots, Sampling, or dynamic client-registration dependencies.
Protected tools require MCP_REQUEST_STATE_KEY with at least 32 high-entropy
bytes. All replicas must share that key so sealed approval state can resume on
another instance. Approval state is bound to the client identity, tool, and
arguments and expires after two minutes. Missing identity, invalid state,
rejection, or legacy protocol use fails closed. Task records are process-local
for the current stdio runtime; use a durable task store before deploying the
server behind scale-to-zero HTTP infrastructure.
Security hardening
Send, mutation, and destructive mailbox tools require sealed MRTR approval.
OAuth configuration files that may contain client secrets are created with
owner-only 0600 permissions on Unix, flushed before use, and covered by a
permission regression test.