Mail.ru mail MCP server
mailru-mcp
An MCP server for Mail.ru mail: reading, search, folder sorting and archiving that works around Mail.ru's IMAP quirks
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- Can bulk move, archive and trash messages
- Sending a reply only works against a whitelist, but drafting and archiving work without one
Install
Manual install
pip install mcpThe only external dependency; everything else comes from the Python standard library.
This is third-party code. Review the repository files before installing.
What it does
The server connects to Mail.ru mail over IMAP using an app-specific password and gives an agent tools to list and create folders, count and list messages with time and sender filters, read a full message, move and bulk-archive old mail, delete into trash and prepare a reply. It separately handles Mail.ru's known quirks: Cyrillic folder names in modified UTF-7, connection drops on bulk reads (worked around by reading in batches of 200), and reconnecting after long sessions break. A reply can only be saved as a draft or sent to addresses from an explicit whitelist; without that whitelist, sending is disabled entirely.
Who it is for. For anyone whose Mail.ru inbox is overflowing and wants an agent to sort, file and archive mail without risking an accidental mass send.
Good fit when
- You need to sort thousands of accumulated messages into folders in one go
- You need to find and read messages from a specific sender over a period
- You need to prepare a reply as a draft or restrict sending to a narrow address list
Not a fit when
- You need to send mail to arbitrary addresses without restriction: the server deliberately blocks this without an explicit whitelist
- You need Mail.ru calendar or contacts access: the server only works with mail
Example request
Create a Stores folder and move all messages from Ozon and Wildberries over the last year into itLimitations
The project is very new, has a single author, no releases or packaging, and installs by cloning the repository. It needs an app-specific password, not the main account password. Bulk moves can produce duplicate copies after a connection drop, which the author openly warns about.
How to disable. Remove the mailru entry from your MCP client config and stop the server process.
MCP
- Transport
- stdio
- Authentication
- API key
| Environment variables | |
|---|---|
| MAILRU_EMAIL required | Mail.ru email address. |
| MAILRU_PASSWORD required, secret | App-specific password, created in Mail.ru security settings. |
| MAILRU_ALLOWED_RECIPIENTS | Comma-separated list of addresses or domains allowed for send_reply. |
Security check
- Can bulk move, archive and trash messages
- Sending a reply only works against a whitelist, but drafting and archiving work without one
README in short
The README explains in detail why Mail.ru needs a dedicated server, gives a table of ten tools, and shows app-password setup and a Claude Code config. Separate sections cover the Mail.ru quirks it works around (folder encoding, session drops, duplicates after failures) and safety measures: treating email content as data rather than instructions, a recipient whitelist, and reversible deletion. The author cites numbers from a real test on their own inbox.
FAQ
Can messages be permanently deleted?
No, delete_emails moves messages to trash like the regular delete button, so a mistake can be undone.
How is sending protected from instructions hidden in email text?
send_reply only sends to addresses or domains listed in MAILRU_ALLOWED_RECIPIENTS; without it sending is disabled entirely, and draft_reply never sends anything on its own.
Related
A self-hosted knowledge base with block-level references and a built-in MCP server for connecting AI agents to your notes
A CLI for every Google Workspace API with JSON output and agent skills: Drive, Gmail, Calendar, Sheets and more
Local search over Markdown notes, docs and meeting transcripts: keywords, semantic search and reranking, with an MCP server
A task manager for AI-driven development: breaks a PRD into dependent tasks and guides the agent through them via MCP or CLI