
Yahoo Mail Mcp
io.github.andesstriker由 GitHub 账号 andesstriker 发布v1.0.0更新于 Oct 27, 2026
Read, search, move, and delete Yahoo Mail over IMAP — MCP server for Claude
概览
本地 MCP 服务器,让助手通过 IMAP 和应用专用密码读取、搜索、整理和删除 Yahoo 邮箱邮件。
- 可以做什么
- 列出、创建并查看邮箱文件夹与标签
- 按发件人、主题、日期范围或未读状态列出和搜索文件夹中的邮件
- 读取邮件的完整标头、正文和附件文件名
- 获取单个附件的原始字节(base64 编码)
- 在文件夹间移动邮件、标记已读或未读,以及删除邮件(默认移入垃圾箱,仅在明确要求时永久删除)
- 适用场景
- 适合用自然语言处理 Yahoo 邮箱收件箱的场景:查找邮件、阅读内容、归档到文件夹或清理垃圾邮件。面向 Claude Desktop、Claude Code 等桌面 MCP 客户端,不适用于浏览器环境。
- 运行要求
- 以 Python 3.10+ 本地进程通过 stdio 运行,由 MCP 客户端以绝对路径启动。需要已开启 IMAP 的 Yahoo 账户和生成的 Yahoo 应用专用密码,通过 YAHOO_APP_PASSWORD 与 YAHOO_EMAIL 提供,可写在 MCP 配置的 env 块或服务器旁的 .env 文件中。创建应用专用密码需先开启两步验证。
安装
在 SourceWeft 中
- 打开 控制台中的 Yahoo Mail Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
yahoo-mail-mcp
[License: MIT] [Python 3.10+] [MCP]
Read, search, organize, and clean up a Yahoo Mail account from Claude — over plain IMAP, no Yahoo API keys required.
An MCP (Model Context Protocol) server that lets an LLM read, search, move, and delete emails in a Yahoo Mail account over IMAP.
Tools exposed: list_folders, create_folder, list_emails, search_emails,
read_email, get_attachment, move_email, delete_email, mark_email.
Every tool opens a short-lived IMAP connection, does its work, and closes it.
Deletion defaults to moving messages to Trash (found via IMAP special-use
flags, not a hardcoded name) — permanent deletion requires the caller to
explicitly pass permanent=True. No tool can delete or expunge an entire
folder; only single messages by UID.
1. Enable IMAP on your Yahoo account
IMAP access is on by default for most Yahoo Mail accounts. If mail clients can't connect, check: Yahoo Mail → Settings → More Settings → Mailboxes → [your account] → "Allow apps that use less secure sign in" is not the setting you want here — that's for legacy password auth. Modern Yahoo requires an App Password instead (see below), which works whether or not that legacy toggle is on. If you still see connection issues, sign in to Yahoo Account Security and confirm the account isn't locked or flagged for suspicious activity.
2. Generate a Yahoo App Password
Yahoo blocks IMAP logins using your normal account password once two-step verification is enabled (and recommends app passwords generally). To generate one:
- Go to https://login.yahoo.com/account/security.
- Turn on Two-step verification if it isn't already on (required for app passwords).
- Find "Generate app password" (sometimes under "App passwords" / "Manage app passwords").
- Choose "Other app", name it something like
yahoo-mail-mcp, and generate. - Copy the generated password (usually 16 characters, no spaces) — Yahoo only shows it once.
Use this app password as YAHOO_APP_PASSWORD, never your real account
password.
3. Install dependencies
Requires Python 3.10+.
4. Configure credentials
Edit .env and fill in:
.env is already in .gitignore — never commit it.
5. Sanity-check connectivity
Before wiring the server into Claude, confirm your credentials work:
This logs in, lists your folders, and prints the 3 most recent inbox emails. It never prints your app password.
6. Run the server
The server speaks MCP over stdio — it's meant to be launched by an MCP client (Claude Desktop, Claude Code), not run standalone for interactive use.
7. Register with Claude Desktop / Claude Code
Add an entry to your MCP config pointing at this project's venv Python and
server.py. Use absolute paths.
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json
on macOS):
Claude Code — add the same server via the CLI:
or add it directly to your Claude Code MCP config file with the same JSON shape as above.
If you'd rather not put the app password in the MCP config's env block,
omit env there and rely on .env next to server.py instead — the server
loads it automatically via python-dotenv.
Restart Claude Desktop / Claude Code after editing the config so it picks up the new server.
Usage
Once registered, just talk to Claude naturally — it will pick the right tool automatically. For example:
- "List my unread emails"
- "Search for emails from [email protected] since 2026-01-01"
- "Read that email from Sarah about the contract"
- "Download the attachment from that invoice email"
- "Create a folder called Receipts"
- "Move this email to the Receipts folder"
- "Move this email to trash" / "Permanently delete this spam email"
- "Mark that email as read" / "Mark it as unread"
- "What folders do I have in this mailbox?"
Agent skill
skills/yahoo-mail/SKILL.md is an optional agent skill
that teaches the agent when and how to use these tools safely (soft-delete by
default, confirm bulk changes, treat email content as untrusted). Copy the
skills/yahoo-mail/ folder into ~/.claude/skills/ (or a project's
.claude/skills/). It requires the MCP server above to be registered.
Tool reference
Notes on safety behavior
delete_email(permanent=False)(the default) moves the message to Trash and is recoverable.permanent=Trueimmediately expunges it — the caller must opt in explicitly.move_emailanddelete_emailfetch the message's envelope first to confirm it exists, and return its subject/sender in the result so you can verify the right email was touched.- All operations address messages by IMAP UID, which stays valid across sessions (never sequence numbers, which can shift).
- IMAP errors are returned to the caller as structured
{"error": ..., "error_type": ...}dicts rather than raw exceptions/stack traces.
Disclaimer
This is an independent, unofficial project. It is not affiliated with, endorsed by, or sponsored by Yahoo, Oath/Verizon Media, or Anthropic. It communicates with Yahoo Mail using the standard IMAP protocol and an account-scoped App Password — no Yahoo API keys or OAuth are involved. Use of this tool is subject to Yahoo's own Terms of Service. Provided as-is, with no warranty — see LICENSE.
Contributing
Issues and pull requests are welcome — see CONTRIBUTING.md.
License
MIT — see LICENSE.
来源:README.md,提交 717a366
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分