accounts_list
List every configured email account and show which account is the default. Use this before other tools when multiple SMTP/IMAP accounts are configured.
无需输入参数。

io.github.samihalawa由 GitHub 账号 samihalawa 发布v2.2.2更新于 Nov 1, 2026
Multi-account SMTP/IMAP email tools: search, read, send, reply, forward, flags and folders.
本地 MCP 服务器,通过 SMTP/IMAP 让助手在多个邮箱账户中搜索、读取、发送、回复、转发和整理邮件。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
[One MCP server connecting multiple email accounts]
One local MCP server for every inbox: search, read, send, reply, forward, and organize email across multiple accounts.
[release] [npm] [downloads] [CI] [OpenSSF Best Practices] [OpenSSF Baseline] [Node.js] [stars] [license]
For third-party notices, licence enquiries and the version 2.2.2 supplement, see the open source licence compliance programme.
account_name.[Search, send, respond, organize, and browse folders across accounts]
.envCopy .env.example to a private location and add as many named accounts as you need:
The server loads .env from its working directory automatically. EMAIL_ENV_FILE lets an MCP client use an .env stored anywhere.
For Claude Desktop, edit:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonUse an absolute path, restart your MCP client, then ask: “List my configured email accounts.”
You can skip the .env file and set EMAIL_ACCOUNTS_JSON plus DEFAULT_EMAIL_ACCOUNT directly in the MCP client’s env object. The JSON must be escaped into a single string.
Use SMTP_HOST, SMTP_PORT, SMTP_SECURE, SMTP_USER, SMTP_PASS, IMAP_HOST, IMAP_PORT, IMAP_SECURE, IMAP_USER, and IMAP_PASS instead of EMAIL_ACCOUNTS_JSON.
SMTP_USERNAME/SMTP_PASSWORD and IMAP_USERNAME/IMAP_PASSWORD are accepted aliases. IMAP credentials default to the SMTP credentials when omitted. Use SENDER_EMAILS as a comma-separated allowlist for optional from_email selection.
See the tool reference for every input, default, response field and error format.
All tools except accounts_list accept an optional account_name. Without it, the server uses DEFAULT_EMAIL_ACCOUNT or the first configured account. There is no application-level account-count limit.
After restarting the MCP client, try these in order:
work account.”personal account.”work account.”Use secure: true for implicit TLS ports such as 465/993. Port 587 normally uses secure: false and upgrades with STARTTLS. Both SMTP and IMAP require TLS 1.2 or newer and a valid server certificate. With secure: false, STARTTLS is mandatory before authentication; servers without STARTTLS are rejected. Plaintext-only relays are not supported.
Run the compiled stdio server with npm start. Build a production container with docker build -t email-smtp-imap-mcp ..
Issues and focused pull requests are welcome. See CONTRIBUTING.md for the development workflow and SECURITY.md for vulnerability reports.
MIT © Sami Halawa
Report vulnerabilities through the private route in SECURITY.md. The security assurance programme and source-bound review describe the controls, evidence and publication boundaries for this project. They do not claim an external ISO certificate or completed OpenChain conformance.
Maintainers can run npm run assurance to build the package, run security checks, archive pinned component inputs and verify an offline recovery. The generated release assets include platform-specific build inputs and are intended for durable release retention.
来源:README.md,提交 dc32584
List every configured email account and show which account is the default. Use this before other tools when multiple SMTP/IMAP accounts are configured.
无需输入参数。
Search for emails in your inbox with flexible filters. Optionally get full email content and attachments. Use this to find specific emails, check for unread messages, or browse your inbox.
limitqueryfiltersaccount_nameinclude_contentinclude_attachmentsChange email states like read/unread, flagged, or move between folders. Use this to organize your inbox, mark emails as read, archive messages, or flag important emails.
flagunflagemail_ids必填mark_readmark_unreadaccount_namemove_to_folderSend a new email with HTML support and file attachments. Use this to send messages, project updates, or any new email conversation.
ccto必填bccbody必填subject必填body_typefrom_emailattachmentsaccount_nameReply to or forward an existing email. Use this to continue email conversations, respond to messages, or forward information to others.
tobody必填email_id必填body_typeaccount_nameresponse_typeinclude_originalinclude_attachmentsadditional_attachmentsList all available email folders/labels in your account. Use this to see your folder structure and organize emails.
account_nameinclude_counts已满足适用检查项的 90%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
EMAIL_ACCOUNTS_JSON='{ "work": { "smtp": { "host": "smtp.gmail.com", "port": 587, "secure": false, "user": "[email protected]", "password": "app-password" }, "imap": { "host": "imap.gmail.com", "port": 993, "secure": true, "user": "[email protected]", "password": "app-password" }, "default_from_name": "Your Name", "sender_emails": ["[email protected]", "[email protected]"] }, "personal": { "smtp": { "host": "smtp.mail.me.com", "port": 587, "secure": false, "user": "[email protected]", "password": "app-password" }, "imap": { "host": "imap.mail.me.com", "port": 993, "secure": true, "user": "[email protected]", "password": "app-password" } }}'
DEFAULT_EMAIL_ACCOUNT="work"{ "mcpServers": { "email": { "command": "npx", "args": ["-y", "email-smtp-imap-mcp"], "env": { "EMAIL_ENV_FILE": "/absolute/path/to/your/.env" } } }}{ "env": { "EMAIL_ACCOUNTS_JSON": "{\"work\":{\"smtp\":{\"host\":\"smtp.gmail.com\",\"port\":587,\"user\":\"[email protected]\",\"password\":\"app-password\"},\"imap\":{\"host\":\"imap.gmail.com\",\"port\":993,\"user\":\"[email protected]\",\"password\":\"app-password\"}}}", "DEFAULT_EMAIL_ACCOUNT": "work" }}git clone https://github.com/samihalawa/email-smtp-imap-mcp.gitcd email-smtp-imap-mcpnpm cinpm test