Yahoo Mail MCP Server
# Yahoo Mail MCP Server
[](LICENSE)
[](https://nodejs.org)
[](https://modelcontextprotocol.io)
MCP server exposing Yahoo Mail (via IMAP) as tools for Claude: list folders,
search/read emails, manage flags and folders.
## Setup
1. Generate a Yahoo App Password: Yahoo Account Security page -> "Generate
app password". A regular account password will not work if 2FA is enabled.
2. Copy `.env.example` to `.env` and fill in your credentials:
```
cp .env.example .env
```
3. Install dependencies (managed by devenv/pnpm):
```
pnpm install
```
4. Build and run the server directly to confirm it authenticates without error:
```
pnpm build
pnpm start
```
Ctrl-C to stop. If you see an `AuthenticationFailure`-related error, double
check `YAHOO_APP_PASSWORD` is an app password, not your account password.
## Registering with Claude Code
```
claude mcp add yahoo-mail node /path/to/yahoo-mail-mcp/dist/index.js
```
Or add to `.mcp.json`:
```json
{
"mcpServers": {
"yahoo-mail": {
"command": "node",
"args": ["/path/to/yahoo-mail-mcp/dist/index.js"],
"env": {
"YAHOO_EMAIL": "you@yahoo.com",
"YAHOO_APP_PASSWORD": "xxxxxxxxxxxxxxxx"
}
}
}
}
```
## Registering with Claude Desktop
Add to `claude_desktop_config.json` (Settings -> Developer -> Edit Config):
```json
{
"mcpServers": {
"yahoo-mail": {
"command": "npx",
"args": ["github:boo1-boo1/yahoo-mail-mcp"],
"env": {
"YAHOO_EMAIL": "you@yahoo.com",
"YAHOO_APP_PASSWORD": "xxxxxxxxxxxxxxxx"
}
}
}
}
```
Or, running from a local clone instead of GitHub:
```json
{
"mcpServers": {
"yahoo-mail": {
"command": "node",
"args": ["/path/to/yahoo-mail-mcp/dist/index.js"],
"env": {
"YAHOO_EMAIL": "you@yahoo.com",
"YAHOO_APP_PASSWORD": "xxxxxxxxxxxxxxxx"
}
}
}
}
```
Restart Claude Desktop after editing the config.
## Tools
- `list_folders` - list all mailboxes.
- `search_emails` - search a folder by sender, subject, free text, date
range, unread/flagged status. Returns lightweight summaries (newest first).
- `get_email` - fetch full content (headers, text/HTML body, attachment
metadata) of one message by folder + UID.
- `get_attachment` - download one attachment's content (base64) by folder,
UID, and `partId` (from `get_email`).
- `mark_read` - mark a message read/unread.
- `flag_email` - flag/unflag (star) a message.
- `move_email` - move a message to another folder.
- `delete_email` - soft delete (move to Trash) by default; `permanent: true`
expunges immediately and **cannot be undone**.
All operations identify messages by IMAP UID (stable across sessions), not
sequence number.
TDQS
Scored across 9 tools
Each tool targets a distinct email operation: folders, search, message retrieval, attachment retrieval, read state, flag state, move, delete, and send. There is no meaningful overlap between tools, and descriptions clarify boundaries.
All tools follow a consistent snake_case verb_noun pattern: list_folders, search_emails, get_email, get_attachment, mark_read, flag_email, move_email, delete_email, send_email. Naming is predictable and easy for an agent to infer.
Nine tools is well-scoped for a mail server covering search, read, attachment handling, message state management, organization, deletion, and sending. Each tool earns its place without bloat.
The tool set covers core email workflows well: search, read, attachments, flags, read state, move, delete with safety safeguards, and send. Minor gaps exist such as no reply/forward, draft management, or folder creation/renaming, but these are not critical dead ends for typical mail tasks.