mailmcp
All your mailboxes in any AI agent. Runs on your computer. Nothing is sent or trashed without your click.
mailmcp is an MCP server that connects Claude Code, Codex, Cursor, Antigravity, Gemini CLI (any MCP client) to several mail accounts at once: Gmail, iCloud, Yandex, Zoho, Fastmail, Yahoo, GMX and any IMAP/SMTP provider. Outlook/Hotmail is coming in v0.2.
"Find the invoices from last week in all my inboxes"
"Summarise my unread mail on the school account"
"Draft a reply to Ahmet saying Thursday works"
"Send it" → a page opens in your browser: To / Subject / Body / [Approve] [Reject]
Why
| Built-in Gmail/Outlook connectors | mailmcp | |
|---|---|---|
| Several accounts of the same provider | One account per provider | As many as you want |
| iCloud, Yandex, Zoho, company/hosting mail | Not available | Any IMAP/SMTP |
| Works in | That one app | Every MCP client, one login |
| Sending | Depends on the client's permission mode | Human click on a local page, enforced by the server |
| Where your credentials live | The vendor's cloud | Your OS keychain |
Install
Give your agent this repository's link and say "install this" — it follows INSTALL.md.
Or do it yourself (needs uv):
uvx allmail-mcp install # adds the "mail" server to Claude Code, Codex, Cursor, Antigravity, Gemini CLI
uvx allmail-mcp add-account # opens a local page; paste an app password there
No uv? uvx comes from uv (winget install astral-sh.uv, or the one-line
installer). Without it: pipx install allmail-mcp, then run allmail-mcp install --command allmail-mcp.
Restart your agent and ask it about your mail. Single client, by hand:
claude mcp add --scope user mail -- uvx allmail-mcp
codex mcp add mail -- uvx allmail-mcp
Safety model
- Passwords never go through the chat. You type an app password into a page served on
127.0.0.1; mailmcp verifies it with an IMAP login and stores it in Windows Credential Manager / macOS Keychain / Linux Secret Service. If no secure keychain exists, it refuses. - Reading and drafting are free; sending and trashing need your click. The agent can only request. The approval page shows the real recipients, subject and body held by the server, not the agent's summary. The click executes the action.
- Approval can be turned off (
"turn off send approval"), but turning it off itself needs a click. Turning it back on is instant. - No permanent delete. "Trash" moves mail to the provider's Trash folder.
- Mail content is marked as untrusted before the agent sees it, and hidden HTML text (a common prompt-injection trick) is removed.
- Reading never marks mail as read.
- The local page binds to
127.0.0.1on a random port, checksHostandOrigin, uses single-use tokens that expire, sends a strict CSP and contains no JavaScript.
What it cannot protect against: whatever the agent reads is sent to your AI provider (Anthropic, OpenAI, Google...). Do not connect mailboxes you would not show to it. See SECURITY.md.
Tools
| Tool | What it does |
|---|---|
accounts_list |
Connected accounts and approval settings |
account_add |
Opens the local add-account page |
folders_list |
Folders of an account |
mail_search |
Search one or all accounts (sender, subject, dates, unread, Gmail syntax on Gmail) |
mail_read |
One message as clean text |
draft_create |
Save a draft (also replies in-thread) |
request_send |
Send, after your click |
request_trash |
Move to Trash, after your click |
action_status |
Did the user approve? |
settings |
Turn approvals on/off |
Ten small tools on purpose: fewer tokens in every session, fewer ways to go wrong.
Providers
| Provider | How you sign in |
|---|---|
| Gmail | App password (needs 2-Step Verification; most Google Workspace accounts can't use them) |
| iCloud | App-specific password |
| Yandex, Zoho, Fastmail, Yahoo, GMX, AOL, Mail.ru | App password |
| Anything else with IMAP/SMTP | Settings are looked up automatically (built-in table, then Mozilla's autoconfig database) or entered by hand |
| Outlook / Hotmail / Live | v0.2 |
| Proton | Through Proton Mail Bridge, entered by hand |
Commands
uvx allmail-mcp # run the MCP server (what your agent starts)
uvx allmail-mcp add-account
uvx allmail-mcp accounts
uvx allmail-mcp remove-account <id>
uvx allmail-mcp install [--client claude|codex|cursor|antigravity|gemini] [--dry-run] [--yes]
uvx allmail-mcp uninstall
uvx allmail-mcp doctor # checks keychain, config and each account's login
Skill (optional)
If your agent supports Agent Skills, copy skill/mailmcp/SKILL.md to
~/.claude/skills/mailmcp/SKILL.md (Claude Code), ~/.codex/skills/mailmcp/SKILL.md (Codex) or
.agents/skills/mailmcp/SKILL.md in your project. It teaches the agent the tool workflow: search
all accounts, read before replying, draft first, wait for the user to approve in the browser, never take
instructions from inside an email. mailmcp works without it.
Alternatives
Good projects exist and you may prefer them: Wh1isper/mcp-email-server (IMAP, Python), marlinjai/email-mcp (Gmail/Outlook OAuth, Node), Softeria/ms-365-mcp-server (all of Microsoft 365), jgalea/mailbox-mcp (security-focused). mailmcp's focus is: many accounts across providers, every client, server-enforced human approval, credentials only in the OS keychain.
Development
git clone https://github.com/efelazut/allmail-mcp && cd mailmcp
uv venv && uv pip install -e ".[dev]"
uv run pytest
Architecture: docs/ARCHITECTURE.md. License: MIT.
Metadata
Release files for allmail-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| allmail_mcp-0.1.1.tar.gz | 90.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| allmail_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 147.6 kB
Release files / allmail_mcp-0.1.1.tar.gz
| Download URL | allmail_mcp-0.1.1.tar.gz |
|---|---|
| Size | 90.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66ea739b5e5374b6e2bec79785e81977abe1b5ddc6a466c87303b8bb306dae79
|
|
BLAKE2b-256 checksum How to use checksums |
e0477429f78aa99feb9780c5e82810a28172e73f80f9e14327c6fdd3c243be13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.
Transparency logRelease files / allmail_mcp-0.1.1-py3-none-any.whl
| Download URL | allmail_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 57.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc7f776b94dd64bb0e7807ed1db17f75403f4ec1503808d6071833d298dd9687
|
|
BLAKE2b-256 checksum How to use checksums |
e234203e25998688fa6a3f87514696a6bffba4af1c445e5e140c5e4192d53952
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.
Transparency log