netease-mail-mcp
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., "@netease-mail-mcp搜索我最近 3 天的未读邮件,如果有验证码就告诉我"
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.
netease-mail-mcp
English | 简体中文
让 Claude Code、Codex、Cursor、Claude Desktop 安全地读写你的网易邮箱(163 / 126 / yeah.net / 188):搜索、阅读、起草、发送,写操作先预览、再确认。
30 秒上手
在网页版邮箱 设置 → POP3/SMTP/IMAP 里开启「IMAP/SMTP 服务」,生成一个客户端授权码(不是登录密码)。
在终端运行(需要 uv):
uvx netease-mail-mcp-server setup按提示输入邮箱地址和授权码。授权码存进系统钥匙串,不会写进配置文件。
按下面任一客户端的写法接入。
setup结束时也会打印对应的配置;之后可随时用uvx netease-mail-mcp-server config <claude-code|codex|cursor|claude-desktop>重新生成。自检:
uvx netease-mail-mcp-server doctor(检查登录、IMAP ID、文件夹、SMTP、收取选项)。
Related MCP server: Mail-MCP
接入各个客户端
Claude Code
claude mcp add --scope user netease-mail -- uvx netease-mail-mcp-serverCodex(~/.codex/config.toml)
[mcp_servers.netease-mail]
command = "uvx"
args = ["netease-mail-mcp-server"]Cursor(~/.cursor/mcp.json)
{
"mcpServers": {
"netease-mail": {
"command": "uvx",
"args": ["netease-mail-mcp-server"]
}
}
}Claude Desktop(macOS:~/Library/Application Support/Claude/claude_desktop_config.json;Windows:%APPDATA%\Claude\claude_desktop_config.json)
{
"mcpServers": {
"netease-mail": {
"command": "uvx",
"args": ["netease-mail-mcp-server"]
}
}
}Claude Desktop 等图形客户端启动时可能找不到 uvx,此时把 command 换成 uvx 的绝对路径(config 子命令会自动填好)。要限制权限,加环境变量,例如 "env": { "NETEASE_MAIL_MODE": "draft" }。
工具
共 10 个工具,按权限模式注册:模式不允许的工具根本不会出现在客户端里。
工具 | 作用 | readonly | draft | full |
| 已配置账号、当前模式,可选测试登录 | ✓ | ✓ | ✓ |
| 文件夹(已解码名称、角色、计数) | ✓ | ✓ | ✓ |
| 按日期/已读/星标(服务端)与关键词、发件人、主题(本地)搜索 | ✓ | ✓ | ✓ |
| 读一封邮件(正文、头、附件清单),默认不改已读状态 | ✓ | ✓ | ✓ |
| 取相关会话(收件箱、已发送等) | ✓ | ✓ | ✓ |
| 下载附件到下载目录(或其子目录),不覆盖、不跟随链接 | ✓ | ✓ | ✓ |
| 等一封新邮件并提取验证码 | ✓ | ✓ | ✓ |
| 写草稿(含回复、转发、附件),存入草稿箱 | ✓ | ✓ | |
| 发送邮件,两阶段确认 | ✓ | ||
| 移动 / 删除到垃圾箱(需确认);标记已读、星标 | ✓ |
没有永久删除工具。readonly 下 read_message 也不会改变任何邮件状态。
权限模式与确认机制
用 NETEASE_MAIL_MODE 设置:readonly(只读)、draft(读 + 写草稿,不能发信和移动)、full(全部,默认)。
发送、移动、删除是两阶段操作,确认方式由 NETEASE_MAIL_CONFIRM 决定:
elicit:通过 MCP 的 elicitation 机制,由客户端弹出确认界面,由你本人点击同意后才执行。这是最强的保证。客户端必须支持 elicitation,不支持时该模式会直接报错,不会悄悄降级。token:第一次调用只返回完整预览和一个一次性确认令牌。令牌是 HMAC,绑定刚才预览的确切内容,10 分钟内有效、用过即废;内容有任何改动都会被拒绝。auto(默认):客户端声明支持 elicitation 就走elicit,否则走token。我们没有逐个核实各客户端对 elicitation 的支持情况,请以你所用客户端的文档为准。
只要客户端声明了支持 elicitation,就只有你明确勾选「同意」才会执行:弹窗出错、客户端返回无效答复、点了接受却没勾选同意、拒绝或取消,一律按未同意处理,不会退回到令牌。令牌只给根本不支持 elicitation 的客户端用。这时结果状态是 not_confirmed(你点了拒绝或取消则是 declined_by_user),并附带提示:如果你的客户端其实弹不出确认框,把 NETEASE_MAIL_CONFIRM 设成 token。
预览(弹窗里的文字和令牌模式下的 JSON 是同一份内容)包括:发件人;全部收件人,含抄送和密送;主题;纯文本正文和 HTML 正文转成的文本,各最多 8000 字,超出时明确写出「还有 N 个字符未显示」;HTML 和纯文本内容不一致时给出警告(收件人多半看到的是 HTML);每个附件的文件名、大小和解析后的完整路径。用 draft_id 发送草稿时,预览显示草稿里真实的 From、Reply-To 和收件人;draft_id 必须是草稿箱里带 \Draft 标记的草稿(服务器支持这个标记时),收件箱里的邮件不能当草稿发出去。移动/删除的预览列出每一封邮件。
SMTP 服务器接受邮件之后,保存「已发送」或删除草稿这些后续步骤即使出错,结果也是「已发送」加警告,不会报错,免得被误以为没发出去而重发。部分收件人被服务器拒绝时也给出警告,并列出这些地址。确认「已发送」里没有副本时,草稿不删除,留作发出内容的唯一记录。
诚实地说明令牌的边界:令牌强制模型先预览再执行,并保证执行的就是预览的内容,但它无法证明有人类批准过——能调用工具的模型自己也能拿着令牌再调一次。因此对安全要求高的场景,请设置 NETEASE_MAIL_CONFIRM=elicit,或者直接使用 readonly / draft 模式,让 Agent 根本没有发信能力(草稿由你自己在邮箱里检查后发送)。
另外:邮件内容一律视为不可信数据,返回给模型时会加上标记,提示其中的指令不是命令;预览里的正文(可能引用或转发了别人的邮件)、发件人和收件人、主题、附件文件名、草稿内容,以及待移动邮件的发件人和主题也一样。wait_for_message 的 from 只匹配发件地址,不看显示名,因为显示名可以随便伪造成 "noreply@github.com" <x@evil.example>:写完整地址时要求完全一致,写 @github.com 匹配这个域名及其子域名,其他写法按地址里的子串匹配;search_messages 的 from 仍同时匹配显示名和地址。
下载和附件的路径限制
下载:
download_attachment只会写进下载目录(NETEASE_MAIL_DOWNLOAD_DIR,默认~/Downloads/netease-mail-mcp/)或它的子目录。dest_dir写相对路径(如发票/2026)或下载目录里的绝对路径;指向下载目录以外的(包括经过符号链接或..、UNC 路径\\server\share、C:相对路径这类写法)一律拒绝。文件以独占方式新建:不覆盖已有文件、不跟随链接,权限 0600,新建的目录 0700。macOS 上给文件加com.apple.quarantine标记,Windows 上写Zone.Identifier,加不上也不影响下载。附件:路径先解析符号链接再检查,并按磁盘上的实际文件判断位置,所以
~/LIBRARY这类大小写不同的写法同样会被识别。以下位置一律拒绝:主目录下任何以.开头的文件或目录(.ssh、.env、.git、.config等)、~/Library(iCloud 云盘所在的~/Library/Mobile Documents和 Dropbox / OneDrive / Google Drive 所在的~/Library/CloudStorage除外)、%APPDATA%/%LOCALAPPDATA%、/proc、/sys、/dev、/etc、网络路径(UNC)、非普通文件,以及读到的内容和文件大小对不上的特殊文件。设置NETEASE_MAIL_ATTACHMENT_ROOTS(多个目录用系统路径分隔符隔开,macOS/Linux 是:,Windows 是;)后,只能附加这些目录里的文件,上面的拒绝规则照样生效;唯一的例外是明确写进这个变量、又位于~/Library里的目录(例如微信、飞书存放收到文件的目录),其中的文件可以附加。被拒时,把文件复制到普通目录再附加,或把它所在的目录加进这个变量。
网易邮箱的坑
这些是用真实 163 / yeah.net 账号逐项验证出来的,也是本项目存在的理由。
必须先发 IMAP ID。 登录后若不发
ID命令,LIST/STATUS 能用,但每次 SELECT 都会失败并提示Unsafe Login。Python 的imaplib不认识 ID,本项目自行注册并在每次登录后发送。服务端搜不了关键词。 对 FROM / TO / SUBJECT / TEXT / BODY 的 SEARCH,在 163 上返回空结果;在 yeah.net 上我们实测 30 秒内不返回,之后账号还会慢上几分钟。可靠的只有 SINCE / BEFORE / UNSEEN / SEEN / FLAGGED / UNFLAGGED。所以本项目的做法是:日期和状态条件交给服务端,再批量取回邮件头,在本地对解码后的发件人、收件人、主题做匹配。不搜正文,结果里会明确标
body_searched: false;搜索范围有上限(max_scan),被截断时会如实报告truncated。「收取选项」决定 IMAP 能看到什么。 网页版 设置 → POP3/SMTP/IMAP → 收取选项 默认可能是「最近 30 天」,此时收件箱在 IMAP 里可能只有几十封,而网页上有几千封。不是 bug,把它改成「全部」即可;
doctor会在发现最早的邮件正好是 30 天前时提醒你。授权码可被撤销。 在网页版删除授权码会立刻让对应客户端掉线,并报登录失败。登录失败的错误信息会指向这一点;重新生成授权码、再运行
setup即可。没有 MOVE。 163/yeah.net 不支持 IMAP MOVE。移动和删除用
UID COPY+UID STORE +FLAGS (\Deleted)+UID EXPUNGE <这些 UID>(依赖 UIDPLUS)。只会清除我们刚复制的那几封,不会发无参数的EXPUNGE,不会连带清掉你别处标了删除的邮件。SMTP 用 465(隐式 TLS)。 25 端口 + STARTTLS 可用,587 端口不通(超时)。
发出的信,服务器会自己存进「已发送」。 2026-10-28 实测:经 smtp.163.com:465 发出的一封邮件,163 自动在「已发送」里存了一份,且只有一份。
send_email发送后按 Message-ID 在「已发送」里找(约 5 秒内查 3 次),找到就不再自己保存(结果里sent_copy: "stored_by_server"),找不到才用 APPEND 补存一份("appended"),所以不会出现两份。其他域名尚未实测。IDLE 因域名而异。 yeah.net 支持,163 不支持;
wait_for_message在不支持时自动改为轮询。删除有延迟。 刚 EXPUNGE 的邮件可能在约 2 秒内仍被列出。
性能
测试环境:2026-10-28,家庭宽带,scripts/benchmark.py(只读,不发信不改信)。每项先预热一次,再取 3 次的中位数。
操作 | 163(收件箱 205 封) | yeah.net(收件箱 5680 封) |
登录 + ID | 0.38 s | 0.37 s |
列文件夹 | 0.04 s | 0.05 s |
最新 20 封(仅服务端) | 0.09 s | 0.28 s |
关键词搜索,扫描 500 封(无命中,全量扫描) | 0.25 s | 0.88 s |
关键词搜索,最多扫描 2000 封 | 0.17 s(实际 205 封) | 6.3 s |
读最新一封 | 0.09 s | 0.19 s |
服务端 SEARCH UNSEEN / FLAGGED | 0.05 / 0.04 s | 0.13 / 0.05 s |
说明:数字依赖网络和网易服务器当时的状态,冷启动明显更慢(一次紧接在超时的服务端搜索之后的 500 封扫描耗时 16 s)。批量取头的开销:500 封冷数据下,只取邮件头 0.67 s,只取 BODYSTRUCTURE 1.19 s,两者都取 1.35 s。这是一个本地的无缓存、无后台进程的实现,每次调用都实时访问服务器。
对比
截至 2026-10,仅比较功能,信息来自两个项目当前的 README;它们各有适合的场景,如有出入请提 issue 指正。
netease-mail-mcp | |||
语言 / 分发 | Python,PyPI( | JavaScript,GitHub Release 二进制 | Python,源码安装( |
支持邮箱 | 163 / 126 / yeah.net / 188 | 163 / 126、QQ、Gmail、Outlook、任意 IMAP/SMTP | 163.com |
形态 | MCP 服务器 | CLI 为主,也提供 MCP 服务器(16 个工具)和 Skill | MCP 服务器 + 可选 Codex Skill |
平台 | macOS / Windows / Linux | 预编译二进制:macOS arm64/x64、Linux x64/arm64 | 仅 macOS(凭据用 macOS |
凭据存储 | 系统钥匙串 / 凭据管理器 / Secret Service |
| macOS 钥匙串 |
写操作确认 | MCP elicitation;否则绑定内容的一次性令牌;另有只读/草稿模式 | 删除、标记、移动、发送默认 dry-run,加 | 精确确认令牌 + 完整预览摘要 |
权限模式 | readonly / draft / full | 未在 README 中说明 | 未在 README 中说明 |
后台进程 / 缓存 | 无 | 可选常驻 daemon,本地 SQLite 同步 | 无 |
网易搜索的处理 | 服务端日期/状态 + 本地过滤头信息 | 163 的 | 仅搜邮件头 |
常见问题
授权码是什么?为什么不用我的密码? 授权码是网易为第三方客户端单独生成的凭据,可随时在网页版撤销,不会暴露登录密码,也绕过不了你的登录保护。在 设置 → POP3/SMTP/IMAP 开启 IMAP/SMTP 服务时生成。本项目不接受、也不需要账号密码。
为什么搜不到正文? 网易的 IMAP 服务端不支持有效的关键词/正文搜索(见上文),而本项目不建本地索引或缓存库。需要正文时,先用日期、发件人、主题缩小范围,再用 read_message 读。
搜索结果比网页上少很多? 多半是「收取选项」设成了最近 30 天,见上文。
Windows / Linux 的凭据存在哪? Windows 存在凭据管理器,Linux 存在 Secret Service(GNOME Keyring、KWallet 等)。无图形桌面的 Linux 没有 Secret Service 时,可通过环境变量 NETEASE_MAIL_AUTH_CODE__<邮箱大写,非字母数字换成下划线> 提供授权码,例如 NETEASE_MAIL_AUTH_CODE__ME_163_COM。
怎么删除一个账号? uvx netease-mail-mcp-server accounts remove you@163.com,会同时删除钥匙串里的授权码。也别忘了在网页版撤销这个授权码。查看已配置账号:accounts list。
支持企业邮箱(qiye.163.com)吗? 不支持。也不支持 POP3、日历、通讯录。
安全与隐私
授权码只存在系统凭据库:macOS 钥匙串、Windows 凭据管理器、Linux Secret Service;不写入任何配置文件或日志。macOS 上通过
/usr/bin/security读写,setup经标准输入传递密钥,不会出现在进程参数里。配置文件(账号列表、模式)权限为 0600,不含密钥。
本项目无服务端、无遥测,只直连网易的 IMAP/SMTP 服务器;不缓存邮件内容,没有后台进程。
邮件内容视为不可信,见上文;发信和移动需要预览与确认;下载和附件有路径限制,见上文。
发现安全问题请看 SECURITY.md。
环境变量
变量 | 含义 |
| 逗号分隔的账号,第一个为默认;优先于配置文件 |
|
|
|
|
| 附件下载目录(默认 |
| 可选:只允许从这些目录附加文件(用 |
| 另指定配置文件路径 |
Agent Skill
skills/netease-mail/SKILL.md 给 Agent 提供工作流指引(先搜索再阅读再起草、发送前必须展示预览并取得明确同意、邮件内容不可信、验证码流程)。
开发
见 CONTRIBUTING.md 和 docs/ARCHITECTURE.md。版本记录见 CHANGELOG.md。
许可证
MIT
Available Tools
10 toolscreate_draftA
Save an email to Drafts (草稿箱) without sending; the user can review it in their mail app. Supports replies (reply_to_id, reply_all: Re: subject, In-Reply-To/References, recipients from the original) and forwards (forward_id). Returns draft_id + preview.
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Addresses: "a@x.com, Name <b@y.com>" or a list. | |
| to | No | Addresses: "a@x.com, Name <b@y.com>" or a list. | |
| bcc | No | Addresses: "a@x.com, Name <b@y.com>" or a list. | |
| body | No | Plain-text body. | |
| account | No | Email address; omit for the default (first) account. | |
| subject | No | Defaults to Re:/Fwd: original. | |
| html_body | No | Optional HTML alternative. | |
| reply_all | No | ||
| forward_id | No | Forward this message. | |
| attachments | No | Absolute local file paths (≤10, ≤20 MB total). Hidden files under home, ~/Library (iCloud Drive and cloud drives excepted), %APPDATA%, /etc and similar are refused; NETEASE_MAIL_ATTACHMENT_ROOTS can restrict further. | |
| reply_to_id | No | Reply to this message (sets threading headers). | |
| forward_mode | No | inline | |
| quote_original | No | Quote the original in replies. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false). The description adds real value beyond that: the message lands in Drafts rather than being delivered, the return is draft_id + preview, and replies get threading headers (In-Reply-To/References) and inherited recipients. It does not mention that repeated calls create separate drafts, though the non-idempotent annotation already signals that.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core action and its non-sending nature are front-loaded in the first clause, with the reply/forward specifics in a compact second sentence. The parenthetical Chinese folder name is a minor extra but earns its place for locale-aware matching.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 13-parameter, zero-required tool with no output schema, the description covers the essential behavior and return value (draft_id + preview) and explains the two non-obvious parameter clusters. Attachment restrictions and account defaults live in the schema, so nothing critical is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 85%, so the baseline is 3, but the description goes further by explaining what reply_to_id and forward_id actually trigger: Re: subject, threading headers, recipients pulled from the original, and forward modes. That is meaning the schema's short param descriptions do not carry.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Save an email to Drafts') plus the crucial scope qualifier 'without sending', which cleanly separates it from the send_email sibling. It also enumerates the two composition modes (reply, forward) so the agent knows the tool's full surface.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Clearly indicates the use case — when the user should review before sending — and the reply/forward conditions that select the respective parameters. It never explicitly names send_email as the alternative for immediate delivery, so routing is implied rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
download_attachmentARead-only
Save one attachment into the download dir (NETEASE_MAIL_DOWNLOAD_DIR) or a subdirectory of it: sanitized name, never overwrites or follows links, file mode 0600, marked as downloaded (macOS quarantine / Windows Zone.Identifier), ≤50 MB. Returns path, size, sha256, content_type, and a text excerpt for text/csv/json/md files.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Message id. | |
| index | No | Attachment index from read_message. | |
| dest_dir | No | Subdirectory of the download dir to save into (relative, or an absolute path inside it). Anything outside the download dir is refused. | |
| filename | No | Or the attachment filename. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Goes well beyond the bare readOnlyHint: never overwrites or follows symlinks, sanitized names, mode 0600, macOS quarantine / Windows Zone.Identifier marking, and a hard 50 MB ceiling. The only tension is that a tool which writes a file and sets quarantine attributes does mutate the local environment, so readOnlyHint should be read as 'does not change mailbox state' — worth clarifying rather than contradicting outright.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single dense sentence that front-loads the action and destination, then lists guarantees and the return payload in one more clause. No filler and nothing repeated from the schema verbatim.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description fully documents the return value (path, size, sha256, content_type, text excerpt for text/csv/json/md), which is exactly what an agent needs to chain calls. Remaining gaps are failure semantics: what error a >50 MB attachment produces, and what happens when both index and filename are omitted.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the parameters are already documented; the description still adds value by naming the NETEASE_MAIL_DOWNLOAD_DIR root that dest_dir is resolved against and by implying the 'or' relationship between index and filename. It does not restate the 'anything outside is refused' rule, but the schema covers that.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ('Save one attachment') plus the exact destination root (NETEASE_MAIL_DOWNLOAD_DIR). No sibling tool writes files, and 'attachment' plus the 'index from read_message' hint make its place in the workflow unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied: the schema note that 'index' comes from read_message signals the read_message -> download_attachment flow, but the description itself never says when to use this versus just reading the message body or when not to use it. An agent can infer the sequence but gets no explicit routing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_threadARead-only
Reconstruct the conversation around a message across its folder, INBOX and Sent, using Message-ID/In-Reply-To/References (subject as fallback). Chronological, with snippets.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Any message id in the conversation. | |
| max_messages | No | ≤50 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, and the description adds useful behavioral detail beyond that: it reconstructs across folder/INBOX/Sent, uses Message-ID/In-Reply-To/References with subject fallback, returns chronological results, and includes snippets. It does not discuss limits or output shape beyond snippets, but it adds meaningful context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two compact sentences with the core action and scope front-loaded. Every phrase contributes useful information about scope, threading mechanism, fallback, ordering, and snippet output.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only tool with full schema coverage and no output schema, the description is largely complete: it explains what is reconstructed, how threading is determined, and that results are chronological with snippets. Minor gaps remain around output detail and limits, but the essential call context is present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both parameters are already documented. The description clarifies that the id can be any message in the conversation, but adds no additional parameter syntax or constraints beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb, "Reconstruct," and resource, "the conversation around a message," and clarifies the scope across folder, INBOX, and Sent. It distinguishes itself implicitly from single-message tools like read_message by emphasizing conversation reconstruction, but it does not explicitly name siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage is implied: use this to reconstruct a conversation around a message. However, the description gives no explicit when-to-use guidance, exclusions, or alternatives such as read_message for a single message or search_messages for discovery.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_accountsARead-only
List configured NetEase accounts, the default account, the mode (readonly/draft/full) and whether a 授权码 is stored. check=true also logs in and reports INBOX counts.
| Name | Required | Description | Default |
|---|---|---|---|
| check | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=false, and the description adds real context beyond them: check=true performs a login against the mail service and returns INBOX counts, and the 授权码 value is only reported as a stored/not-stored flag rather than exposed. It doesn't say what a failed login looks like or whether check has side effects on the account, which keeps it below a 5.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences; the base listing and its returned fields come first, and the opt-in flag behavior follows. Every clause carries information and nothing is repeated from the schema or annotations.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description correctly enumerates what is returned, including the conditional INBOX counts with check. It's nearly complete for a single-flag read tool; only ordering/shape of the account list and error behavior are unstated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the sole parameter has no description, so the description must carry it — and it does, explaining exactly what check=true adds over the default and that the default omits login and INBOX counts. Only the cost/behavior on partial failure is left implicit.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb ('List') plus a precise resource ('configured NetEase accounts') and an enumeration of the fields returned: default account, mode (readonly/draft/full), and whether a 授权码 is stored. No sibling tool lists accounts, and the description makes that scope unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly states the condition that selects the expensive behavior: 'check=true also logs in and reports INBOX counts', so an agent knows when to opt in versus take the cheap default. It doesn't name trade-offs or exclusions (e.g. latency/credential-failure behavior) but there is no sibling alternative to route to.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_foldersARead-only
List folders with decoded names (e.g. 草稿箱, 已发送), raw IMAP names and special-use role (inbox/drafts/sent/trash/junk). with_counts=true adds message/unseen counts.
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Email address; omit for the default (first) account. | |
| with_counts | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The readOnlyHint annotation already establishes that this is a safe read operation. The description adds relevant context about what folder data is returned and what with_counts adds, but does not mention permissions, pagination, or other behavioral details.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and front-loaded, starting with 'List folders' and then adding the optional count behavior. Every sentence contributes useful information without repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only tool with two parameters and no output schema, the description explains the main returned fields and the optional count behavior. It is nearly complete, with the only notable gap being no guidance on when to choose this tool over siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema documents the account parameter, while the description fills in the otherwise undocumented with_counts parameter by explaining that it adds message/unseen counts. Together this covers both parameters well, though the description itself does not mention account.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'List folders.' It also clarifies the returned folder representation (decoded names, raw IMAP names, special-use role), making the purpose clear. It does not explicitly differentiate itself from siblings, but the resource type is distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides no explicit guidance on when to use this tool versus alternatives such as list_accounts or search_messages. The only usage-like detail is the parameter behavior for with_counts, not tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
manage_messagesADestructiveIdempotent
Move, trash, mark read/unread or flag/unflag up to 50 messages. mark/flag run immediately (reversible). move/trash are two-phase like send_email: preview + human approval (elicitation or confirmation_token). trash moves to 已删除; nothing is ever permanently deleted.
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | Message ids (≤50). | |
| action | Yes | ||
| target_folder | No | For move: folder name/role. | |
| confirmation_token | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds substantial context beyond the annotations: which actions are immediate and reversible, which require preview plus human approval via elicitation or confirmation_token, and that trash moves messages to 已删除 without permanent deletion. This materially clarifies safety and workflow behavior for a destructiveHint=true tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, front-loaded with the core actions, followed by operational details. Every sentence adds useful information without repetition or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a multi-action mutation tool with no output schema, the description covers the necessary operational context: action set, batch limit, immediate versus two-phase behavior, approval mechanism, and trash semantics. No critical invocation detail appears missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50%, and the description adds useful meaning for ids (≤50), action behavior, and confirmation_token's role in the two-phase flow. target_folder is only implicitly covered via the move action, so it does not fully compensate for every parameter gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names specific verbs (move, trash, mark read/unread, flag/unflag) and the resource (up to 50 messages), making the tool's operation clear. It does not explicitly differentiate itself from siblings such as search_messages or read_message, so it falls just short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly explains that mark/flag actions run immediately while move/trash require a two-phase preview and human approval. This gives useful action-level usage context, though it does not explicitly state when to choose this tool over sibling tools like search_messages or get_thread.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_messageBRead-only
Read one message: headers (incl. Message-ID/In-Reply-To/References), text body (plain preferred, HTML converted to text), attachment list [{index, filename, content_type, size}] and flags. Does not mark the message read unless mark_read=true.
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Message id from search_messages. | |
| mark_read | No | Also mark as read (needs mode draft/full). Default: unchanged. | |
| max_chars | No | Body chars to return (≤100000). | |
| include_html | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description is otherwise informative about return shape and conditional side effects, but it discloses that mark_read=true marks the message read. That optional mutation contradicts the annotation readOnlyHint=true, which declares the tool read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core action and then compactly lists output details and the mark_read condition. It is appropriately sized with no wasted sentences.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description usefully explains the return payload: headers, text body conversion, attachment metadata, and flags. It is nearly complete, but it omits interactions such as max_chars/include_html and the mode prerequisite noted in the schema for mark_read.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 75%, and the schema already documents id, mark_read, and max_chars. The description adds useful meaning about HTML-to-text body handling and the attachment list, but it does not clarify include_html or max_chars interactions beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
It states a specific verb and resource, "Read one message," and enumerates the returned payload: headers, body, attachment list, and flags. It does not explicitly distinguish itself from siblings such as get_thread or search_messages, so it is clear but not fully differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by "Read one message" and the conditional note about mark_read=true. However, it gives no explicit when-to-use guidance or alternatives, such as using get_thread for a conversation or search_messages to locate a message.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_messagesARead-only
Search or list messages newest-first. Returns ids plus date/from/to/subject/flags. Date and unread/flagged filters run on the server; query/from/to/subject match headers locally over at most max_scan candidates (truncated=true means more may exist). Message bodies are never searched.
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Substring of a To/Cc name/address. | |
| from | No | Substring of the sender's display name or address. Display names are set by the sender and can imitate an address; check the address itself. | |
| limit | No | Max results (≤100). | |
| query | No | Words that must all appear in From/To/Cc/Subject (case-insensitive substring). Bodies are not searchable. | |
| since | No | YYYY-MM-DD, inclusive. | |
| before | No | YYYY-MM-DD, exclusive. | |
| folder | No | Folder name/role ("INBOX", "已发送", "sent"), a list, or "all" (every folder except Junk/Trash/病毒文件夹). | INBOX |
| unread | No | true = unread only, false = read only | |
| account | No | Email address; omit for the default (first) account. | |
| flagged | No | true = flagged (starred) only | |
| subject | No | Substring of the subject. | |
| max_scan | No | Max candidates to check client-side (≤5000). | |
| has_attachment | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the readOnlyHint annotation, the description discloses important behavior: returned fields, newest-first ordering, server-side date/unread/flagged filtering, local header matching over max_scan candidates, truncation semantics, and the fact that message bodies are never searched. These details materially affect how an agent should invoke and interpret the tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded: purpose first, then return shape, filtering mechanics, truncation, and the body-search limitation. Every sentence adds useful information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 13 parameters and no output schema, the description is largely complete: it states the return fields and explains the key filtering and truncation behavior. Minor details such as folder defaults and account handling are left to the schema, which is reasonable given the high schema coverage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is high at 92%, so the schema already documents most parameters. The description still adds cross-parameter meaning by explaining which filters run server-side, which run locally over max_scan, and why truncated results may occur.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: "Search or list messages" and specifies newest-first ordering. It is clear what the tool does, but it does not explicitly distinguish itself from siblings such as read_message or list_folders.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by "Search or list messages" and the note that bodies are never searched, but the description does not explicitly say when to use this tool versus alternatives like read_message or get_thread. The server-side versus local filtering distinction helps, but is not framed as usage guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_emailADestructive
Send an email via SMTP (same arguments as create_draft, or draft_id to send a saved draft). Two-phase: the first call returns a full preview and asks the human (MCP elicitation) or returns confirmation_token; call again with the token ONLY after the user explicitly approves. Any change to recipients/subject/body/attachments → rejected.
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | Addresses: "a@x.com, Name <b@y.com>" or a list. | |
| to | No | Addresses: "a@x.com, Name <b@y.com>" or a list. | |
| bcc | No | Addresses: "a@x.com, Name <b@y.com>" or a list. | |
| body | No | ||
| account | No | Email address; omit for the default (first) account. | |
| subject | No | ||
| draft_id | No | Send this draft exactly as saved (other content arguments must be omitted). | |
| html_body | No | ||
| reply_all | No | ||
| forward_id | No | ||
| attachments | No | ||
| reply_to_id | No | ||
| forward_mode | No | inline | |
| quote_original | No | ||
| confirmation_token | No | From the preview response, after the user approved. | |
| delete_draft_after_send | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Adds rich behavior beyond annotations: the elicitation/preview flow, the confirmation_token requirement, and the rule that any change to recipients/subject/body/attachments causes rejection. This tells the agent exactly how the destructive send is gated, which annotations alone do not convey.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tightly packed sentences, front-loaded with purpose then the two-phase protocol. No filler; each clause conveys actionable constraint.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The critical send-safety workflow is complete, but with 16 params, no output schema, and a sparse preview description ("full preview" unexplained), the definition leaves gaps around the reply/forward parameter family and what the preview response contains.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 16 parameters at 38% schema coverage, the description should carry the load, but it only says "same arguments as create_draft." It never clarifies reply_to_id/reply_all, forward_id/forward_mode, quote_original, or delete_draft_after_send, leaving the majority of params undocumented in both schema and description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb+resource ("Send an email via SMTP") and immediately distinguishes the two modes (compose with create_draft's arguments, or draft_id). It also names the sibling create_draft, so an agent can route correctly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly explains the two-phase call protocol: first call returns a preview/elicitation, second call uses confirmation_token only after explicit user approval. It lacks a crisp "use create_draft instead when you only want to save," but the reference to create_draft and the approval flow give strong usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
wait_for_messageARead-only
Wait for a NEW message (arriving after the call starts) matching from/subject/query, e.g. a sign-up verification email. Returns the summary plus codes: likely verification codes from subject/body. Uses IDLE when available, else polling.
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | Sender's email address: a full address matches exactly ('noreply@github.com'), '@github.com' matches that domain and its subdomains, anything else is a substring of the address ('github'). Display names are ignored (they can be forged). | |
| query | No | Words in From/To/Cc/Subject. | |
| folder | No | INBOX | |
| poll_s | No | Polling interval when IDLE is unavailable. | |
| account | No | Email address; omit for the default (first) account. | |
| subject | No | Subject substring. | |
| timeout_s | No | ≤600 | |
| lookback_s | No | Also accept messages that arrived up to this many seconds before the call (0 = only new mail). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations only declare readOnlyHint, so the description carries most of the burden and does well: it discloses the blocking wait, the transport strategy (IDLE when available, else polling), and what the response contains (summary plus extracted `codes`). It stops short of saying what happens when the timeout expires with no match, which matters for a call that can block up to 600s.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, both front-loaded: the scope constraint leads, then the return shape and mechanism. No filler, and the example use case is packed into a clause rather than a paragraph.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With eight parameters and no output schema, the description compensates by naming the return payload (summary plus `codes`), which is exactly the missing structured info. The only real gap is undefined timeout/no-match behavior, which an agent would want before committing to a 120s default wait.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 88%, so the schema already documents from/query/subject matching semantics, poll_s, account, timeout_s, and lookback_s in detail. The description only restates 'matching from/subject/query' and adds no filtering nuance of its own; baseline 3 applies when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource plus a critical scope constraint: it waits for a NEW message arriving after the call starts, with an example use case (sign-up verification email). That scope sentence is what functionally separates it from search_messages, so an agent can pick correctly without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives clear context for when this is the right tool ('e.g. a sign-up verification email') and the 'arriving after the call starts' framing implicitly rules out using it to find existing mail. It never names search_messages or read_message as the alternative for already-delivered messages, and there are no explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
10 tool updates
v0.1.0- First observed
create_draft - First observed
download_attachment - First observed
get_thread - First observed
list_accounts - First observed
list_folders - First observed
manage_messages - First observed
read_message - First observed
search_messages - First observed
send_email - First observed
wait_for_message
TDQS
Scored across 10 tools
Each tool targets a clearly distinct action: listing accounts/folders, searching messages, reading one message, reconstructing a thread, downloading attachments, waiting for new mail, creating drafts, sending email, and managing message state. The only mild overlap is create_draft vs send_email sharing arguments, but their purposes and two-phase behaviors are clearly differentiated.
All tool names use consistent snake_case and are verb-led (list_, search_, read_, get_, download_, wait_for_, create_, send_, manage_). The pattern is predictable and readable throughout.
Ten tools is well-scoped for an email MCP server, covering discovery, reading, waiting, composing, sending, and message management without excessive granularity. Each tool earns its place.
Core email workflows are covered: account/folder discovery, search, read, thread reconstruction, attachment download, waiting for verification mail, draft creation, sending with approval, and message management. Minor gaps exist, such as folder creation/renaming and message-body search, but the surface is largely complete for the stated purpose.
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Your own IMAP mailbox in any MCP client: search, read, flag, move; send and delete need confirm.
Your agent needs a mailbox of its own — to receive, thread, draft and send, with attachments, without borrowing your personal inbox or your company's SMTP. **What you can ask for** • "Create an inbox for this agent and tell me its address." • "Read the new messages in this thread and draft a reply." • "Send this message with the attachment and wait for the response." • "Search this inbox for everything from that domain." • "Show delivery metrics and the events on this inbox." **How to use it** Point any MCP client at https://mcp.aisa.one/mail/mcp and sign in with OAuth — there is no key to create or paste. 49 tools: create and delete inboxes, list and read messages, raw message bodies, attachments, threads, drafts and draft attachments, send and reply, message search, inbox events, metrics, and list entries — reads and writes. **Why this rather than the source** A real inbox an agent owns, rather than an SMTP credential it borrows from a human. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Find the contact elsewhere in the catalogue, then write to them from here — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/sales/mcp finds the person to write to.
Your mailbox for MCP clients: search, read, draft, send, rules and notes. Sending is off by default.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with 163 email accounts through IMAP/SMTP protocols. Supports reading unread emails, sending text/HTML emails with attachments, and saving email attachments through natural language commands.-
- AlicenseNot gradedqualityDmaintenanceEnables secure mailbox access and email management via IMAP/SMTP, with tools for reading, searching, organizing, sending, and deleting emails, designed for local use and compatible with MCP clients like ChatGPT.1MIT
- AlicenseAqualityDmaintenancePrivacy-first local MCP server for personal @163.com mailboxes, connecting via IMAP/SMTP with read-only search and write operations guarded by confirmation tokens.12MIT
- AlicenseBqualityCmaintenanceEnables email management through IMAP/SMTP, including reading, sending, replying, starring, deleting, labeling emails, handling attachments, and filtering by Gmail smart categories. Works with MCP-compatible clients like Claude Desktop and Claude Code using App Password authentication.1932 npmMIT