Content
# Tool List
[](https://github.com/nikarmontag-cmd/claude-yandex-mail/actions/workflows/lint.yml)
[](LICENSE)
[](https://www.python.org/downloads/)
A plugin for **Claude Code** and **Claude Cowork** that turns Claude into a mail assistant for Yandex Mail (including Yandex 360 for Business with custom domains).
## Demo
```
You: check mail
Claude:
Unread: 5
🔴 NEEDS REPLY (2):
• [UID 1234] From Иванов И.И. <i.ivanov@example.com> · business
Request for a quote on heating for a 800 m² warehouse. Needs a response by Friday.
• [UID 1233] From accounting@bank.example · financial
Payment confirmation awaiting your consent (deadline today).
🟡 SHOULD READ (1):
• [UID 1232] From notifications@stripe.com · notification
Received payment $1,250.00 from LLC Partner.
⚪️ CAN IGNORE (2):
• LinkedIn — weekly summary
• GitHub — Dependabot alert summary
Recommendation: reply to Иванов first — deadline is Friday.
You: reply to Иванов that you'll send the quote on Wednesday
Claude: [shows a draft with signature and logo]
Send?
You: yes
Claude: ✓ Response sent to i.ivanov@example.com (subject: Re: Request for a quote ...)
```
## Architecture
```mermaid
sequenceDiagram
participant U as User
participant C as Claude (Code/Cowork)
participant S as check-inbox skill
participant M as MCP server (server.py)
participant Y as Yandex IMAP/SMTP
U->>C: "check mail"
C->>S: skill match
S->>M: get_unread_emails(limit=10)
M->>Y: UID SEARCH UNSEEN<br/>UID FETCH BODY.PEEK[]
Y-->>M: raw RFC822 messages
M-->>S: parsed (decoded subject, body, from)
S->>C: categorise + prioritise
C-->>U: structured triage
```
## What's inside
| Component | Purpose |
|---|---|
| **MCP server** `yandex-mail` | 11 async tools over IMAP/SMTP: send with HTML signature and inline images, search, list folders, move between folders, set/unset read flags, threaded replies |
| **Skill** `check-inbox` | Triage unread mail: categorise (business / project / financial / personal / notification / marketing) and rank by urgency (🔴/🟡/⚪️) |
| **Skill** `compose-email` | Compose a new business email with HTML signature, optional logo, and explicit send confirmation |
| **Skill** `reply-to-email` | Find the original message, reply with quoting and proper threading (`Re:`, `In-Reply-To`, `References`) |
### Triggers
| Tell Claude | Skill |
|---|---|
| "check my mail", "what's new", "show unread" | `check-inbox` |
| "write an email to X", "send X a message", "compose an email" | `compose-email` |
| "reply to X", "reply to the last email from X" | `reply-to-email` |
### Installation
#### 1. Get a Yandex app password
This is **not** your normal account password. To get one:
1. Enable 2FA on `id.yandex.com`
2. Open `https://id.yandex.com/security/app-passwords`
3. Create a "Mail" app password — Yandex shows the 16-char password exactly once
4. In Yandex Mail settings, make sure IMAP access is enabled (`All settings → Mail clients → ☑ From imap.yandex.com via IMAP`)
#### 2. Clone and set up
```bash
git clone https://github.com/nikarmontag-cmd/claude-yandex-mail.git
cd claude-yandex-mail
chmod +x scripts/setup.sh
./scripts/setup.sh
```
The script asks for your email + app password, creates a venv, installs dependencies, and tests the IMAP connection. It then asks for signature details (name, position, company, email, phone, website, optional logo path).
#### 3. Connect to Claude
**Claude Code:**
```bash
claude plugin add /full/path/to/claude-yandex-mail
```
**Claude Cowork:** package as `.plugin` and drop into the app:
```bash
./scripts/build-plugin.sh ~/Desktop
# Creates ~/Desktop/claude-yandex-mail.plugin
```
Then drag the `.plugin` file into Cowork.
After install, open `/mcp` (in Claude Code), confirm `yandex-mail` is ✓ connected, and try: "check my mail".
### Requirements
- macOS / Linux (Windows not tested — should work via WSL or MSYS)
- Python 3.10+
- Bash 4+ for the setup script
- A Yandex Mail account with 2FA enabled and an app password
### Security
- Credentials are stored in `server/.env` with `chmod 600`, gitignored
- Signature and logo live in `assets/`, also gitignored
- Nothing leaves Yandex and your local machine
### Layout
```
claude-yandex-mail/
├── .claude-plugin/plugin.json # plugin manifest
├── .mcp.json # MCP server config
├── server/
│ ├── server.py # MCP server (asyncio + aioimaplib + aiosmtplib)
│ ├── requirements.txt
│ └── .env.example # credentials template
├── skills/
│ ├── check-inbox/SKILL.md
│ ├── compose-email/SKILL.md
│ └── reply-to-email/SKILL.md
├── assets/
│ ├── signature.template.html # signature template (HTML)
│ ├── signature.template.txt # signature template (plain)
│ ├── signature.html # generated by setup script
│ ├── signature.txt # generated by setup script
│ └── logo.jpg # optional, copied by setup script
├── scripts/setup.sh
├── LICENSE
└── README.md
```
### Changing the signature
Delete `assets/signature.html` and `assets/signature.txt`, then re-run `./scripts/setup.sh`.
Or edit the files manually — they're plain HTML/text, no templating after generation.
### License
MIT — see [LICENSE](LICENSE).
MCP Config
Below is the configuration for this MCP Server. You can copy it directly to Cursor or other MCP clients.
mcp.json
Connection Info
You Might Also Like
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
Appwrite
Build like a team of hundreds