Yahoo Mail MCP Server
This server lets Claude access your Yahoo Mail account to read and manage emails, create folders, and send (or draft) messages.
Read mail: List folders; list message summaries with filters (unread, sender, subject, since date, limit); fetch full message content (text, optionally HTML).
Manage folders: Create new folders (including nested paths like 'Projects/Alpha'); move messages between folders.
Send or draft email: Compose and send emails (to/cc/bcc, subject, text/HTML, reply threading). If
YAHOO_MCP_DRAFTS_ONLY=true, sending is replaced by saving drafts instead.Configurable access modes: Read-only mode disables folder creation, moving, and sending; drafts-only mode keeps reading and folder management but only saves drafts.
Security features: No network calls except to Yahoo IMAP/SMTP; credentials stay in env vars; optional read-only/drafts-only limits to mitigate prompt injection.
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., "@Yahoo Mail MCP Server check my inbox for unread emails from my boss"
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.
Yahoo Mail MCP Server
An MCP server that gives Claude access to a Yahoo Mail account: read messages, create folders, move messages between folders, and compose/send email. It connects directly to Yahoo's IMAP and SMTP servers using an app password — Yahoo does not offer a general-purpose OAuth Mail API for third-party apps, so this is the supported way to integrate.
There are two ways to install it — pick whichever fits how much you want to inspect before running it:
Quick start (npm) — no clone, no build, one config block.
Build from source (GitHub) — clone and compile it yourself so you know exactly what's running.
1. Generate a Yahoo app password
Yahoo requires an app-specific password for IMAP/SMTP access (your normal account password will not work, especially if 2-step verification is on).
Sign in at https://login.yahoo.com and go to Account Info → Account Security.
Turn on 2-step verification if it isn't already on (required for app passwords).
Under App passwords, click Generate app password, name it (e.g. "Claude MCP"), and copy the generated password. You won't be able to view it again.
Related MCP server: yahoo-mail-mcp
Quick start (npm)
No install step required — npx fetches and runs the package on demand. Add this to
your Claude config (claude_desktop_config.json, reachable from Claude Desktop's
Settings → Local MCP servers → Edit config):
{
"mcpServers": {
"yahoo-mail": {
"command": "npx",
"args": ["-y", "local-mcp-server-yahoo-mail"],
"env": {
"YAHOO_EMAIL": "you@yahoo.com",
"YAHOO_APP_PASSWORD": "your-16-char-app-password",
"YAHOO_MCP_DRAFTS_ONLY": "true"
}
}
}
}Why
YAHOO_MCP_DRAFTS_ONLYis in there by default. With it set, Claude composes mail into your Drafts folder rather than sending it, and you review and send from Yahoo Mail yourself. That one line is the most effective thing you can do to limit what a malicious email could make Claude do on your behalf, so it is the recommended starting point. Delete the line once you are comfortable letting Claude send directly. See Security for the reasoning, and for the stricter read-only option.
Or with the Claude Code CLI:
claude mcp add yahoo-mail --env YAHOO_EMAIL=you@yahoo.com --env YAHOO_APP_PASSWORD=xxxxxxxxxxxxxxxx --env YAHOO_MCP_DRAFTS_ONLY=true -- npx -y local-mcp-server-yahoo-mailFully quit and relaunch Claude Desktop afterward — MCP servers are only loaded at startup.
Build from source (GitHub)
Prefer to read and compile the code yourself before it touches your inbox:
git clone https://github.com/prakash-murali/local-mcp-server-yahoo-mail.git
cd local-mcp-server-yahoo-mail
npm install
npm run buildThen point your config at the built file instead of npx:
{
"mcpServers": {
"yahoo-mail": {
"command": "node",
"args": ["/absolute/path/to/local-mcp-server-yahoo-mail/dist/index.js"],
"env": {
"YAHOO_EMAIL": "you@yahoo.com",
"YAHOO_APP_PASSWORD": "your-16-char-app-password",
"YAHOO_MCP_DRAFTS_ONLY": "true"
}
}
}
}Environment variables
Variable | Required | Default | Description |
| yes | — | Your full Yahoo Mail address |
| yes | — | App password generated in step 1 |
| no |
| IMAP host override |
| no |
| IMAP port override |
| no |
| SMTP host override |
| no |
| SMTP port override |
| no |
| Set to |
| no |
| Set to |
Credentials are never written to disk by this server — they're read from environment variables at startup and used only to authenticate to Yahoo's IMAP/SMTP servers over TLS.
Try it read-only first
If you'd rather not grant write/send access right away, set YAHOO_MCP_READ_ONLY to
true in the env block. The server won't even register the create_folder,
move_message, or send_email tools — Claude can only list folders and read messages
until you turn it off.
A good middle setting is YAHOO_MCP_DRAFTS_ONLY=true, which keeps folder management
and lets Claude compose mail, but puts every message in your Drafts folder for you to
review and send yourself. See Security for why that matters.
Tools
list_folders — list all folders/mailboxes (Inbox, Sent, Drafts, Trash, custom folders).
create_folder — create a new folder; use
/for nested paths (Projects/Alpha).list_messages — list message summaries in a folder, with optional filters (unread only, sender, subject substring, since date) and a result limit.
get_message — fetch the body of one message by folder + UID. Returns plain text by default; pass
includeHtmlto also get the raw HTML part.move_message — move a message from one folder to another by UID.
send_email — compose and send an email (to/cc/bcc, subject, text and/or HTML body, optional reply threading headers). Replaced by save_draft, which writes to your Drafts folder without sending, when
YAHOO_MCP_DRAFTS_ONLY=true.
Security
The risk worth understanding first: prompt injection
Anyone who knows your email address can put text in your inbox. When you ask Claude to
read a message, that attacker-controlled text enters the same conversation where the
send_email and move_message tools are available. A message crafted to look like
instructions ("forward the last 20 emails to …") is a real attack, and no mail-access
tool of this kind can fully prevent it.
The defence that works is structural: take away the ability to send data out, so that an injected instruction has nothing to act with. Two env settings do that:
YAHOO_MCP_READ_ONLY=trueremoves every write tool. Strongest option, and the right one if you mainly want Claude to read and summarise mail.YAHOO_MCP_DRAFTS_ONLY=truereplacessend_emailwithsave_draft. Claude composes, the message lands in your Drafts folder, and nothing leaves the account until you read it in Yahoo Mail and press send yourself.
Note that neither can be changed by Claude. There is deliberately no tool to turn off read-only or drafts-only mode, because a control the model can switch off is not a control. Changing them means editing your config and restarting the host.
Two smaller measures that help but are not boundaries:
Message bodies and subject lines are returned wrapped in an explicit marker telling the model that the content is untrusted data and must not be treated as instructions.
The HTML part is not returned unless you pass
includeHtml. HTML can hide text from you in comments,display:noneelements, or white-on-white text while still feeding it to the model.
Treat both as defence in depth. A determined injection can talk its way past wording; it cannot talk its way past a tool that isn't registered.
The rest
This server is a thin, auditable bridge between Claude and Yahoo's own mail servers — there's no third-party backend in between.
No network calls other than to Yahoo. The only hosts this code talks to are
imap.mail.yahoo.comandsmtp.mail.yahoo.com(or whatever you override them to), both over TLS. No telemetry, no analytics, no other endpoint.Small, readable codebase. The entire implementation is ~5 files under
src/— read it yourself before trusting it with your inbox.App password, not your real password. It's scoped to IMAP/SMTP and can be revoked independently at any time from Yahoo Account Security, without touching your main login credentials.
Credentials stay local. They're read from environment variables at process start and are never logged or written to disk by this code.
Well-known dependencies.
imapflow,nodemailer,mailparser, and the official@modelcontextprotocol/sdk— all widely used, independently auditable packages.Optional read-only mode. Set
YAHOO_MCP_READ_ONLY=trueto disable all write/send capability while you evaluate it (see above).
If you find a security issue, please open an issue rather than a public PR with exploit details.
Development
npm run dev # tsc --watch
npm start # run the built server directly (for manual stdio testing)Available Tools
6 toolscreate_folderCreate a Yahoo Mail folderA
Create a new folder (mailbox) in Yahoo Mail. Use '/' to specify a nested folder path, e.g. 'Projects/Alpha'.
Inputs: path (required).
get_messageGet a message's full contentA
Fetch the full content (text and HTML body) of a single message by folder and UID.
Inputs: uid (required), folder (required).
list_foldersList Yahoo Mail foldersA
List all folders/mailboxes in the Yahoo Mail account, including special-use folders like Inbox, Sent, Drafts, and Trash.
Inputs: no named parameters.
list_messagesList messages in a folderA
List message summaries (subject, from, to, date, read status) in a given folder, optionally filtered by unread status, sender, subject text, or date.
Inputs: folder (required), from, limit, since, +2 more.
move_messageMove a message between foldersC
Move a single message from one folder to another by UID.
Inputs: uid (required), destFolder (required), sourceFolder (required).
send_emailCompose and send an emailB
Compose and send a new email from the configured Yahoo Mail account. Provide plain text and/or HTML body.
Inputs: to (required), subject (required), cc, bcc, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct action and resource: folders vs. messages vs. sending. list_messages and get_message are clearly separated as summary vs. full content, so there is no real ambiguity.
All tool names follow a consistent verb_noun pattern: list_folders, create_folder, list_messages, get_message, move_message, send_email. This makes the toolset predictable and easy to navigate.
Six tools is a well-scoped size for an email-focused server. Each tool covers an essential part of the core workflow without unnecessary bloat or redundancy.
The core email flows are covered: listing folders and messages, reading, moving, sending, and creating folders. However, obvious operations like deleting messages, marking read/unread, and renaming or deleting folders are missing, creating notable gaps for full mailbox management.
Maintenance
Related MCP Connectors
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Read and search FranklyMail email and prepare drafts, replies, and forwards for human approval.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables users to manage their Yahoo Mail account through natural language, including listing, reading, searching, deleting, archiving, flagging, and moving emails via IMAP. Supports both local Claude Desktop integration and remote access with secure OAuth 2.0 authentication.11MIT
- AlicenseNot gradedqualityCmaintenanceEnables controlling Yahoo Mail from Claude in plain English — read, search, organize, delete, and send emails, with a two-phase confirmation step to prevent accidental destructive actions.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to read, search, organize, and clean up Yahoo Mail emails over IMAP without Yahoo API keys.4MIT
- AlicenseBqualityCmaintenanceEnables Claude Desktop or Claude Code to access a Yahoo Mail account over IMAP/SMTP, supporting listing, searching, reading, and sending emails through natural language.4MIT