# yahoo-mail-mcp [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/andesstriker/yahoo-mail-mcp  
**GitHub Stars:** 6  
**Views:** 8  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/yahoo-mail-mcp

## Description
Read, search, move, and delete Yahoo Mail over IMAP — MCP server for Claude

## Tools
Capabilities this server exposes over MCP:

- **list_folders** — List every IMAP folder/label, with special-use flags
- **create_folder** — Create a folder if it doesn't already exist (idempotent)
- **list_emails** — List recent emails in a folder, newest first
- **search_emails** — Search a folder by sender/subject/date range/unread, AND-combined
- **read_email** — Fetch full headers + body (plain text, or HTML stripped) + attachment filenames
- **get_attachment** — Fetch one attachment's raw bytes, base64-encoded
- **move_email** — Move a single message between folders by UID
- **delete_email** — Delete a message — soft-delete (Trash) by default
- **mark_email** — Set/unset the read (`\Seen`) flag

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/andesstriker/yahoo-mail-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
cd yahoo-mail-mcp
```

2. Install:

```sh
python3 -m venv .venv
```

3. Install:

```sh
pip install -r requirements.txt
```

4. Configure:

```sh
cp .env.example .env
```

5. Check the setup:

```sh
python test_connection.py
```

6. Start the server:

```sh
python server.py
```

## Documentation

## What yahoo-mail-mcp does

The yahoo-mail-mcp MCP server gives an MCP client access to a Yahoo Mail account through IMAP. It belongs in the Communication category and is intended for agents that need to inspect or organize mailbox contents without using Yahoo's API or OAuth.

Available operations include listing folders and their IMAP special-use flags, creating folders, listing recent messages, and searching within a folder. Searches can combine sender, subject, date boundaries, and unread status. Messages can be opened with their headers and body text; HTML content is stripped when needed, and available attachment filenames are returned.

The server also retrieves an individual attachment as base64-encoded data, moves one message between folders, and sets or clears the read flag. Deletion is message-specific and uses the IMAP UID supplied by the tool workflow.

## How it works

Each tool creates a short-lived IMAP connection, performs its operation, and closes the connection. Messages are addressed by IMAP UID rather than sequence number, avoiding references that can change between sessions. Move and delete operations first check the message envelope and return identifying details such as subject and sender.

By default, deleting a message moves it to the Trash folder discovered through IMAP special-use flags. Permanent removal requires an explicit `permanent=true` argument. The server does not provide a way to delete or expunge an entire folder in one operation. IMAP failures are returned as structured error data containing an error message and error type.

## Setup and configuration

The yahoo-mail-mcp MCP server requires Python 3.10 or newer. Create a virtual environment, install the repository's requirements, and provide these environment variables:

- `YAHOO_EMAIL`: the Yahoo Mail address to connect to
- `YAHOO_APP_PASSWORD`: an app-specific Yahoo password

Yahoo generally requires an App Password for IMAP access, especially when two-step verification is enabled. The normal Yahoo account password should not be used. The project can load values from a `.env` file through `python-dotenv`; alternatively, place them in the MCP client's environment configuration.

Run `python test_connection.py` to authenticate, list folders, and display three recent inbox messages without printing the app password. Start the server with `python server.py`. It communicates over stdio, so launch it from an MCP client rather than treating it as an interactive standalone program.

The documented client setup uses absolute paths to the virtual-environment Python executable and `server.py`. The README provides registration instructions for Claude Desktop and Claude Code. Restart the client after changing its MCP configuration. An optional Claude Code skill documents safer usage patterns, including soft deletion by default and treating email content as untrusted.

## Tools and capabilities

The yahoo-mail-mcp MCP server exposes these tools:

- `list_folders`: Return all IMAP folders and special-use markers.
- `create_folder`: Create a folder when it does not already exist.
- `list_emails`: List recent messages in newest-first order, optionally limited to unread mail.
- `search_emails`: Apply combined sender, subject, date, and unread filters within a folder.
- `read_email`: Return full headers, body content, and attachment filenames.
- `get_attachment`: Return one attachment's raw contents as base64.
- `move_email`: Move one message from a source folder to a destination folder.
- `delete_email`: Move one message to Trash or permanently expunge it when explicitly requested.
- `mark_email`: Set or remove the IMAP `\\Seen` flag.

These tools support tasks such as finding unread mail, reviewing a contract message, creating a receipts folder, moving an invoice, or retrieving an attachment. The server is independent and unofficial; it is not affiliated with Yahoo or Anthropic, and its use remains subject to Yahoo's terms.

_Full upstream README: https://allmcps.com/mcp/yahoo-mail-mcp/readme_

