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

已驗證STDIO僅桌面效率與工作流溝通與協作

概覽

AI 產生的概覽

本機 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 檔案。建立應用程式密碼需先開啟兩步驟驗證。
安裝前請注意
應用程式密碼可存取整個信箱,應保存在 .env 或設定中且不要提交到版本庫。工具可移動、標記和刪除郵件;永久刪除會立即清除郵件,但必須明確要求,預設僅移至垃圾桶。郵件內容屬於不可信輸入,且本專案為非官方專案,與 Yahoo 無關聯。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Yahoo Mail Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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:

  1. Go to https://login.yahoo.com/account/security.
  2. Turn on Two-step verification if it isn't already on (required for app passwords).
  3. Find "Generate app password" (sometimes under "App passwords" / "Manage app passwords").
  4. Choose "Other app", name it something like yahoo-mail-mcp, and generate.
  5. 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+.

bash
cd yahoo-mail-mcppython3 -m venv .venvsource .venv/bin/activatepip install -r requirements.txt

4. Configure credentials

bash
cp .env.example .env

Edit .env and fill in:

[email protected]YAHOO_APP_PASSWORD=your16charapppassword

.env is already in .gitignore — never commit it.

5. Sanity-check connectivity

Before wiring the server into Claude, confirm your credentials work:

bash
python test_connection.py

This logs in, lists your folders, and prints the 3 most recent inbox emails. It never prints your app password.

6. Run the server

bash
python server.py

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):

json
{  "mcpServers": {    "yahoo-mail": {      "command": "/absolute/path/to/yahoo-mail-mcp/.venv/bin/python",      "args": ["/absolute/path/to/yahoo-mail-mcp/server.py"],      "env": {        "YAHOO_EMAIL": "[email protected]",        "YAHOO_APP_PASSWORD": "your16charapppassword"      }    }  }}

Claude Code — add the same server via the CLI:

bash
claude mcp add yahoo-mail /absolute/path/to/yahoo-mail-mcp/.venv/bin/python /absolute/path/to/yahoo-mail-mcp/server.py

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

ToolPurposeKey parameters
list_foldersList every IMAP folder/label, with special-use flags(none)
create_folderCreate a folder if it doesn't already exist (idempotent)name
list_emailsList recent emails in a folder, newest firstfolder="INBOX", limit=20, unread_only=False
search_emailsSearch a folder by sender/subject/date range/unread, AND-combinedfolder, sender, subject, since (YYYY-MM-DD), before, unread_only, limit
read_emailFetch full headers + body (plain text, or HTML stripped) + attachment filenamesuid, folder="INBOX"
get_attachmentFetch one attachment's raw bytes, base64-encodeduid, filename, folder="INBOX"
move_emailMove a single message between folders by UIDuid, from_folder, to_folder
delete_emailDelete a message — soft-delete (Trash) by defaultuid, folder="INBOX", permanent=False
mark_emailSet/unset the read (\Seen) flaguid, folder="INBOX", read=True

Notes on safety behavior

  • delete_email(permanent=False) (the default) moves the message to Trash and is recoverable. permanent=True immediately expunges it — the caller must opt in explicitly.
  • move_email and delete_email fetch 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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分