email-mcp
Local MCP server for multi-account IMAP/SMTP email (iCloud + Gmail via app-specific passwords). Never marks mail read. Cross-folder search, idempotent sends, TLS verified.
Status
- Tested against iCloud only. The design is provider-generic (Gmail config is included as an example), but only iCloud has been exercised end-to-end so far. Gmail/others are untested — use at your own risk and please report back.
- macOS only (uses the macOS Keychain via
keyring).
Requirements
- An app-specific password for each mailbox, stored in your macOS Keychain (see Configure / Get an app-specific password). The password is read from the Keychain at runtime — it is never written to disk, logged, or returned by any tool.
- You must grant Keychain permission. The first time the server reads the password,
macOS shows a dialog: "… wants to use your confidential information stored in
'email-mcp' in your keychain." — click Allow (or Always Allow). This grants
access to only that one
email-mcpitem, nothing else in your Keychain. Note the prompt is tied to the specific Python binary running the server, so it may re-ask if you switch interpreters.
Install
pip install email-mcp # or: pipx install email-mcp
This provides an email-mcp command (and python -m email_mcp.server).
Configure
- Create your account registry at
~/.config/email-mcp/accounts.yml(seeconfig/accounts.example.ymlfor the format). Override the location with theEMAIL_MCP_ACCOUNTSenv var if you prefer. - Store each account's app-specific password in the macOS Keychain:
python -m email_mcp.setup_cli icloud-personal
(For local development you can instead setEMAIL_MCP_PASSWORDin a.env.)
Register with Claude Code
claude mcp add email --scope user -- email-mcp
Tools
list_accounts, set_default_account, list_folders, get_emails (recency by default; search via query/filters), send_email (idempotent), mark_email, move_email.
Get an app-specific password
- iCloud: appleid.apple.com -> Sign-In & Security -> App-Specific Passwords.
- Gmail: myaccount.google.com -> Security -> App passwords.
Develop
python3.12 -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/pytest
Metadata
Release files for email-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 | |
|---|---|---|---|
| email_mcp-0.1.1.tar.gz | 12.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| email_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.0 kB
Release files / email_mcp-0.1.1.tar.gz
| Download URL | email_mcp-0.1.1.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73b5491588103886f5e9e3e748301c094077886f785b391e8eb7a7b3c0ba7273
|
|
BLAKE2b-256 checksum How to use checksums |
5e8184ef0bd61df8c1e1da38c41ec872e8b9790fe29903957188c2ec24a82f76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 31, 2026.
Transparency logRelease files / email_mcp-0.1.1-py3-none-any.whl
| Download URL | email_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f49ee5085703c5d9e0723304c4c58ffcccb55133a7efb6414ef2547b6312ec0
|
|
BLAKE2b-256 checksum How to use checksums |
b0a30ae3072643047eccc661be5552a8f52c0e9172409b296db1c4486571bf12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 31, 2026.
Transparency log