Read, search, move, and delete Yahoo Mail over IMAP β MCP server for Claude
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
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.
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.
Yahoo blocks IMAP logins using your normal account password once two-step verification is enabled (and recommends app passwords generally). To generate one:
yahoo-mail-mcp, and generate.Use this app password as YAHOO_APP_PASSWORD, never your real account
password.
Requires Python 3.10+.
Edit .env and fill in:
.env is already in .gitignore β never commit it.
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.
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.
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.
Once registered, just talk to Claude naturally β it will pick the right tool automatically. For example:
| Tool | Purpose | Key parameters |
|---|---|---|
list_folders | List every IMAP folder/label, with special-use flags | (none) |
create_folder | Create a folder if it doesn't already exist (idempotent) | name |
list_emails | List recent emails in a folder, newest first | folder="INBOX", limit=20, unread_only=False |
search_emails | Search a folder by sender/subject/date range/unread, AND-combined | folder, sender, subject, since (YYYY-MM-DD), before, unread_only, limit |
read_email | Fetch full headers + body (plain text, or HTML stripped) + attachment filenames | uid, folder="INBOX" |
get_attachment | Fetch one attachment's raw bytes, base64-encoded | uid, filename, folder="INBOX" |
move_email | Move a single message between folders by UID | uid, from_folder, to_folder |
delete_email | Delete a message β soft-delete (Trash) by default | uid, folder="INBOX", permanent=False |
mark_email | Set/unset the read (\Seen) flag | uid, folder="INBOX", read=True |
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.{"error": ..., "error_type": ...} dicts rather than raw exceptions/stack
traces.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.
Issues and pull requests are welcome β see CONTRIBUTING.md.
MIT β see LICENSE.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/yahoo-mail-mcp)<a href="https://allmcps.com/mcp/yahoo-mail-mcp"><img src="https://allmcps.com/api/badge/yahoo-mail-mcp?style=directory" alt="Yahoo Mail MCP on AllMCPs" /></a>