Universal email MCP server via IMAP/SMTP
## Email IMAP/SMTP MCP Server: Standard Email Protocol The **Email IMAP/SMTP MCP Server** provides direct email access using standard protocols within Google Antigravity. This enables reading, sending, and managing emails through any IMAP/SMTP compatible mail server. ### Why Email IMAP/SMTP MCP? Standard protocols offer flexibility: - **Universal**: Works with any email server - **IMAP**: Full inbox access and search - **SMTP**: Send emails reliably - **No Lock-In**: Use any email provider - **Self-Hosted**: Works with custom servers ### Key Features #### 1. Send Email (SMTP) ```python import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart msg = MIMEMultipart() msg["From"] = "sender@example.com" msg["To"] = "recipient@example.com" msg["Subject"] = "Build Complete" body = "<h1>Build Status</h1><p>All tests passed!</p>" msg.attach(MIMEText(body, "html")) with smtplib.SMTP("smtp.example.com", 587) as server: server.starttls() server.login("user", "password") server.send_message(msg) ``` #### 2. Read Email (IMAP) ```python import imaplib import email with imaplib.IMAP4_SSL("imap.example.com") as imap: imap.login("user", "password") imap.select("INBOX") # Search for unread messages _, messages = imap.search(None, "UNSEEN") for num in messages[0].split(): _, data = imap.fetch(num, "(RFC822)") msg = email.message_from_bytes(data[0][1]) print(f"From: {msg['From']}") print(f"Subject: {msg['Subject']}") ``` #### 3. Folder Management ```python # List folders _, folders = imap.list() # Create folder imap.create("Archive/2024") # Move message imap.copy(msg_id, "Archive/2024") imap.store(msg_id, "+FLAGS", "\\Deleted") imap.expunge() ``` ### Configuration ```json { "mcpServers": { "email-imap-smtp": { "command": "npx", "args": ["-y", "@anthropic/mcp-email"], "env": { "IMAP_HOST": "imap.example.com", "SMTP_HOST": "smtp.example.com", "EMAIL_USER": "user@example.com", "EMAIL_PASSWORD": "your-password" } } } } ``` ### Use Cases **Email Automation**: Process incoming emails. **Custom Mail Server**: Use self-hosted email. **Legacy Integration**: Connect to existing mail systems. The Email IMAP/SMTP MCP Server brings standard email to Antigravity.
{
"mcpServers": {
"email-imap-smtp": {
"mcpServers": {
"email": {
"env": {
"IMAP_HOST": "imap.gmail.com",
"IMAP_PORT": "993",
"SMTP_HOST": "smtp.gmail.com",
"SMTP_PORT": "465",
"EMAIL_PASS": "your-app-password",
"EMAIL_USER": "your@email.com"
},
"args": [
"-y",
"mcp-mail-server"
],
"command": "npx"
}
}
}
}
}