email-mcp-proBLOCK
通用邮箱 MCP 服务器 - 基于 imapflow 重写 IMAP 实现,支持 IMAP ID 命令(RFC 2971),完美兼容网易邮箱
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
通用邮箱 MCP 服务器 — 基于 imapflow 重写 IMAP 实现,支持 IMAP ID 命令 (RFC 2971),完美兼容网易邮箱系列。
✨ 核心改进:原版email-mcp使用老的node-imap库,不支持 IMAP ID 命令,导致网易邮箱 (163/126/yeah) 读取邮件内容时报EXAMINE Unsafe Login错误。本版本改用imapflow,在连接时自动发送 ID 命令声明客户端身份,彻底解决该问题。
✨ 功能特性
- 📤 邮件发送:支持 HTML 和纯文本邮件、多收件人、抄送、密送、附件
- 📥 邮件列表:获取最近 N 天的邮件列表(IMAP / POP3 双协议)
- 📖 邮件内容:读取指定邮件的完整内容(文本、HTML、附件信息)
- 🔧 动态配置:支持运行时配置邮箱服务器,自动识别邮箱类型
- 🔍 连接测试:内置 SMTP / IMAP 服务器连接测试
- 🛡️ IMAP ID 命令:自动发送 RFC 2971 ID 命令,兼容网易邮箱安全策略
- ⚡ 现代 IMAP 库:基于 imapflow,Promise/async 风格 API,更稳定可靠
📦 支持的邮箱服务商
🚀 快速开始
方式一:npx 直接运行(推荐)
无需安装,直接通过 npx 运行:
npx email-mcp-pro
在 MCP 客户端配置中使用:
{
"mcpServers": {
"email": {
"command": "npx",
"args": ["-y", "email-mcp-pro"],
"env": {
"EMAIL_USER": "[email protected]",
"EMAIL_PASSWORD": "your-auth-code",
"EMAIL_TYPE": "auto"
}
}
}
}方式二:全局安装
npm install -g email-mcp-pro email-mcp-pro
方式三:从源码运行
git clone https://github.com/batsama/email-mcp-pro.git cd email-mcp-pro npm install [email protected] EMAIL_PASSWORD=your-auth-code node index.js
🔧 配置说明
环境变量
也可以通过 MCP 工具 setup_email_account 在运行时动态配置。
网易邮箱配置指南
- 登录 163 邮箱
- 进入「设置」→「POP3/SMTP/IMAP」
- 开启「IMAP/SMTP服务」和「POP3/SMTP服务」
- 生成客户端授权密码(注意:不是登录密码)
- 使用授权
e93b6a454939OBSERVED · 2026-10-11Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add email-mcp-pro --env EMAIL_PASSWORD=${EMAIL_PASSWORD} --env WECHAT_EMAIL_PASSWORD=${WECHAT_EMAIL_PASSWORD} -- npx -y [email protected]{
"mcpServers": {
"email-mcp-pro": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"EMAIL_PASSWORD": "${EMAIL_PASSWORD}",
"WECHAT_EMAIL_PASSWORD": "${WECHAT_EMAIL_PASSWORD}"
}
}
}
}Exposed tools (7)
6 read · 1 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
configure_email_server | read | 手动配置邮箱服务器设置(高级用户使用) |
get_email_content | read | 获取指定邮件的详细内容 |
get_recent_emails | read | 获取最近三天的邮件列表 |
list_supported_providers | read | 列出支持的邮箱提供商 |
send_email | write | 发送邮件 |
setup_email_account | read | 设置邮箱账号(自动识别邮箱类型并配置服务器) |
test_email_connection | read | 测试邮箱服务器连接 |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (2 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (4)
rejectUnauthorized: false
rejectUnauthorized: false
password: 'your-enterprise-auth-code', // 需要实际的企业邮箱授权码
@modelcontextprotocol/sdk, dotenv, imapflow, mailparser, nodemailer, poplib, @types/node, @types/nodemailer
Gates applied: no_behavioural_pass.
e93b6a454939full audit observations/trust-audit/mcp-server/batsama__email-mcp-pro.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-11 | e93b6a454939 | BLOCK | D | 69 | first audit |
Questions
What is the email-mcp-pro MCP server?
通用邮箱 MCP 服务器 - 基于 imapflow 重写 IMAP 实现,支持 IMAP ID 命令(RFC 2971),完美兼容网易邮箱
What tools does email-mcp-pro expose?
7 in total: 6 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is email-mcp-pro safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does email-mcp-pro need?
It reads EMAIL_PASSWORD and WECHAT_EMAIL_PASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does email-mcp-pro run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as email-mcp-pro at 1.0.1.
How current is this page?
The grade is for one exact copy of the source (e93b6a454939), read on 2026-10-11. The repository is watched and re-audited when it changes.