# Claude Yandex Mail

> Yandex Mail plugin for Claude Code & Cowork — async IMAP/SMTP MCP server with 11 tools and 3 skills (inbox triage, compose with HTML signature, threaded replies). Yandex 360 for Business compatible.

- **Type:** MCP server
- **Install:** `agentstack add mcp-nikarmontag-cmd-claude-yandex-mail`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [nikarmontag-cmd](https://agentstack.voostack.com/s/nikarmontag-cmd)
- **Installs:** 0
- **Category:** [Communication](https://agentstack.voostack.com/c/communication)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [nikarmontag-cmd](https://github.com/nikarmontag-cmd)
- **Source:** https://github.com/nikarmontag-cmd/claude-yandex-mail
- **Website:** https://github.com/nikarmontag-cmd/claude-yandex-mail

## Install

```sh
agentstack add mcp-nikarmontag-cmd-claude-yandex-mail
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# claude-yandex-mail

[](https://github.com/nikarmontag-cmd/claude-yandex-mail/actions/workflows/lint.yml)
[](LICENSE)
[](https://www.python.org/downloads/)

Плагин для **Claude Code** и **Claude Cowork**, превращающий Claude в почтового ассистента для Яндекс.Почты (включая Яндекс 360 для бизнеса с собственными доменами).

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: проверь почту

Claude:
Непрочитанных: 5

🔴 NEEDS REPLY (2):
  • [UID 1234] From Иванов И.И.  · business
    Запрос КП на отопление склада 800 м². Просит ответ до пятницы.
  • [UID 1233] From accounting@bank.example · financial
    Подтверждение платежа ожидает вашего согласия (дедлайн сегодня).

🟡 SHOULD READ (1):
  • [UID 1232] From notifications@stripe.com · notification
    Получен платёж $1,250.00 от ООО Партнёр.

⚪️ CAN IGNORE (2):
  • LinkedIn — еженедельная сводка
  • GitHub — Dependabot alert summary

Recommendation: ответь Иванову первым — дедлайн в пятницу.

You: ответь Иванову, что КП пришлю в среду
Claude: [показывает черновик с подписью и логотипом]
        Отправить?
You: да
Claude: ✓ Ответ отправлен на i.ivanov@example.com (тема: Re: Запрос КП ...)
```

## 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: "проверь почту"
    C->>S: skill match
    S->>M: get_unread_emails(limit=10)
    M->>Y: UID SEARCH UNSEENUID FETCH BODY.PEEK[]
    Y-->>M: raw RFC822 messages
    M-->>S: parsed (decoded subject, body, from)
    S->>C: categorise + prioritise
    C-->>U: structured triage
```

---

## 🇷🇺 Русский

### Что внутри

| Компонент | Что делает |
|---|---|
| **MCP-сервер** `yandex-mail` | 11 асинхронных инструментов через IMAP/SMTP: отправка с HTML-подписью и inline-картинками, поиск, листинг папок, перемещение между папками, метки прочитанности, ответы с цитированием |
| **Скилл** `check-inbox` | Триаж непрочитанных: категории (business / project / financial / personal / notification / marketing) и срочность (🔴/🟡/⚪️) |
| **Скилл** `compose-email` | Новое деловое письмо с HTML-подписью, логотипом и подтверждением перед отправкой |
| **Скилл** `reply-to-email` | Поиск оригинала, ответ с цитированием и сохранением thread (`Re:`, `In-Reply-To`, `References`) |

### Триггеры

| Скажи Claude | Скилл |
|---|---|
| «проверь почту», «что нового», «покажи непрочитанные» | `check-inbox` |
| «напиши письмо X», «отправь письмо», «составь письмо» | `compose-email` |
| «ответь X», «ответь на последнее письмо от X» | `reply-to-email` |

### Установка

#### 1. Получи пароль приложения Яндекса

Это **не** обычный пароль аккаунта. Получить:
1. Включи двухфакторную аутентификацию на `id.yandex.ru`
2. Открой `https://id.yandex.ru/security/app-passwords`
3. Создай пароль типа «Почта» — Яндекс покажет 16-символьный пароль один раз
4. Дополнительно: в настройках Яндекс.Почты убедись, что включён доступ по IMAP (`Все настройки → Почтовые программы → ☑ С сервера imap.yandex.ru по протоколу IMAP`)

#### 2. Клонируй и настрой

```bash
git clone https://github.com/nikarmontag-cmd/claude-yandex-mail.git
cd claude-yandex-mail
chmod +x scripts/setup.sh
./scripts/setup.sh
```

Скрипт спросит email + пароль приложения, создаст venv, установит зависимости и проверит подключение. Затем спросит данные для подписи (имя, должность, компания, email, телефон, сайт, путь к логотипу).

#### 3. Подключи к Claude

**Claude Code:**

```bash
claude plugin add /полный/путь/к/claude-yandex-mail
```

**Claude Cowork:** упакуй в `.plugin` и перетащи в окно приложения:

```bash
./scripts/build-plugin.sh ~/Desktop
# Создаст ~/Desktop/claude-yandex-mail.plugin
```

Затем перетащи `.plugin` файл в окно Cowork.

После установки — открой `/mcp` (в Claude Code), убедись что `yandex-mail` ✓ подключён, и попробуй: «проверь почту».

### Требования

- macOS / Linux (Windows не тестировался — должен работать с WSL или MSYS)
- Python 3.10+
- Bash 4+ для setup-скрипта
- Аккаунт Яндекс.Почты с включённой 2FA и паролем приложения

### Безопасность

- Креды хранятся в `server/.env` с `chmod 600`, файл в `.gitignore`
- Подпись и логотип в `assets/`, тоже игнорируются git'ом
- Никакие данные не уходят за пределы Яндекса и твоей машины

### Структура

```
claude-yandex-mail/
├── .claude-plugin/plugin.json    # манифест плагина
├── .mcp.json                     # конфиг MCP-сервера
├── server/
│   ├── server.py                 # MCP-сервер (asyncio + aioimaplib + aiosmtplib)
│   ├── requirements.txt
│   └── .env.example              # шаблон для кредов
├── skills/
│   ├── check-inbox/SKILL.md
│   ├── compose-email/SKILL.md
│   └── reply-to-email/SKILL.md
├── assets/
│   ├── signature.template.html   # шаблон подписи (HTML)
│   ├── signature.template.txt    # шаблон подписи (plain)
│   ├── signature.html            # сгенерируется setup-скриптом
│   ├── signature.txt             # сгенерируется setup-скриптом
│   └── logo.jpg                  # опционально, скопируется setup-скриптом
├── scripts/setup.sh
├── LICENSE
└── README.md
```

### Изменить подпись

Удали `assets/signature.html` и `assets/signature.txt`, перезапусти `./scripts/setup.sh`.

Или отредактируй файлы вручную — они в обычном HTML/тексте, без шаблонизации.

### Лицензия

MIT — см. [LICENSE](LICENSE).

---

## 🇬🇧 English

### 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

See the structure tree in the Russian section above.

### 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).

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [nikarmontag-cmd](https://github.com/nikarmontag-cmd)
- **Source:** [nikarmontag-cmd/claude-yandex-mail](https://github.com/nikarmontag-cmd/claude-yandex-mail)
- **License:** MIT
- **Homepage:** https://github.com/nikarmontag-cmd/claude-yandex-mail

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-nikarmontag-cmd-claude-yandex-mail
- Seller: https://agentstack.voostack.com/s/nikarmontag-cmd
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
