email-mcp
Allows interacting with Gmail and other IMAP/SMTP email services, providing tools for listing mailboxes, fetching messages, searching, sending, replying, marking as read, and deleting emails.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@email-mcpcheck my unread emails and summarize the important ones"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
email-mcp
一支檔案的 email MCP server:用 IMAP 收信、SMTP 寄信,支援多個帳號。只依賴 Python 標準函式庫和 mcp SDK。
工具
工具 | 用途 |
| 列出已設定的帳號 |
| 列出信箱資料夾 |
| 最新信件列表 |
| 未讀信件 |
| 讀單封信完整內容 |
| 用 IMAP 搜尋語法找信 |
| 信件總數與未讀數 |
| 寄信(純文字或 HTML) |
| 回信(自動帶 |
| 標記已讀 |
| 刪信 |
寄出的信會 APPEND 到 IMAP 的寄件備份匣(依序試 Sent Items、Sent、INBOX.Sent、[Gmail]/Sent Mail),所以在一般郵件軟體裡也看得到。
Related MCP server: Email SMTP/IMAP MCP Server
安裝
需要 Python 3.10 以上。
git clone https://github.com/ChenLiangChong/email-mcp.git
cd email-mcp
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt設定
在 MCP 用戶端的設定檔(Claude Code 是專案的 .mcp.json)加上,路徑請用絕對路徑:
{
"mcpServers": {
"email": {
"command": "/path/to/email-mcp/.venv/bin/python",
"args": ["/path/to/email-mcp/server.py"],
"env": {
"EMAIL_ACCOUNTS": "[{\"name\":\"work\",\"email\":\"you@example.com\",\"password\":\"your-app-password\",\"imap_host\":\"imap.example.com\",\"smtp_host\":\"smtp.example.com\"}]"
}
}
}
}EMAIL_ACCOUNTS 是一個 JSON 陣列,每個帳號的欄位:
欄位 | 必填 | 預設 |
| ✅ | |
| ✅ | |
| email 的 | |
|
| |
|
| |
|
| |
|
|
工具的 account 參數可以填 name 或 email,留空就用第一個帳號。IMAP 和 SMTP 都走 SSL。
注意
密碼不要進版控。 有密碼的
.mcp.json請加進.gitignore,或改成啟動時從系統鑰匙圈讀出來再塞進環境變數。Gmail 這類信箱請用應用程式密碼。uid是 IMAP UID,信件被刪除後不會位移;指到已不存在的信會回錯誤,不會對到別封。只接受單一數字,1:*這類範圍會被擋掉。email_delete用的是 EXPUNGE,會一併清掉同一個資料夾裡其他已被標記\Deleted的信。email_send、email_reply、email_delete會真的寄信和刪信,建議在用戶端把這三個工具設成每次都要確認。
授權
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Read, send, file and search email in any Gmail, Microsoft 365 or IMAP mailbox, plus its calendar.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
- mailOAuthcom.anymailmcp
Read, send, organize, watch email on any IMAP mailbox: Gmail, iCloud, OVH, Zoho, Fastmail + CalDAV.
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables sending and receiving emails through SMTP, IMAP, and POP3 protocols with support for attachments, HTML content, and email validation.MIT
- AlicenseAqualityFmaintenanceEnables email management through SMTP and IMAP protocols with support for sending emails with attachments, searching and filtering messages, replying/forwarding with threading, organizing mailboxes, and managing multiple email accounts.5229 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables email management through IMAP and SMTP protocols, supporting reading, sending, replying to emails with proper threading, and downloading attachments. Supports multiple email accounts with flexible configuration options.1BSD 3-Clause
- FlicenseNot gradedqualityDmaintenanceEnables email management via IMAP/SMTP, supporting list emails, read emails, send emails, and save drafts.-