mail-mcp
Connects to Gmail accounts over IMAP/SMTP using app-specific passwords, supporting mailbox search and reading, drafts, attachment downloads, and optional message sending or modification per account.
Connects to iCloud Mail over IMAP/SMTP using an app-specific password, enabling mailbox access, message search and reading, drafts, attachment downloads, and optional sending or modification.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mail-mcp show my unread emails from all accounts"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mail-mcp
English summary. A local, multi-account email MCP server for macOS (IMAP/SMTP) that connects to Claude Desktop and Claude Code over stdio. Secrets live only in the macOS Keychain, Microsoft accounts use XOAUTH2 (MSAL device code), and sending or modifying mail is off by default for every account. The rest of this README is in Turkish.
Bu Mac'te yerel çalışan, çok hesaplı bir e-posta MCP sunucusu (IMAP/SMTP). Claude Desktop ve Claude Code'a stdio ile bağlanır. Bulut ya da ev sunucusu kullanmaz.
Sırlar yalnızca macOS Keychain'de durur:
Uygulama şifreleri: service
mail-mcp, account = hesap adıMicrosoft token önbelleği: service
mail-mcp-msal, account = hesap adı.msal-extensionsKeychainPersistenceile şifreli tutulur; refresh token otomatik yenilenir.
~/.config/mail-mcp/accounts.tomlsır içermez. Yükleyicipassword,tokenya dasecretgibi anahtarları reddeder.Microsoft hesapları (hotmail, okul) XOAUTH2 ile bağlanır: MSAL device code akışı ve kendi Entra uygulama kaydın.
Gönderme (
allow_send) ve değiştirme (allow_modify) her hesapta varsayılan olarak kapalı. Taslak (allow_draft) ve ek indirme (allow_download) varsayılan olarak açıktır ve hesap başına kapatılabilir.E-posta içeriği güvenilmez veridir: gövdeler çağrı başına değişen nonce'lu bir zarfla döner, gönderenin denetlediği alanlar
untrusted_fieldsile işaretlenir (bkz. Güvenlik).
Neden hazır paket değil?
mcp-email-server 1.15.0 (ai-zerolab) kaynağına bakıldı (2026-11-19). Çoklu hesap, keyring ve SPECIAL-USE desteği var, ama XOAUTH2/OAuth2 yok. oauth|xoauth|msal araması .py dosyalarında yalnızca web arayüzünün kendi Bearer başlığını buluyor. Outlook.com'da uygulama şifreleri Eylül 2024'ten beri çalışmadığı için hotmail ve okul hesapları bu paketle bağlanamaz.
Related MCP server: email-mcp
Dizin düzeni
~/mcp/mail-mcp/ proje (uv, Python 3.12, mcp 2.3 MCPServer)
src/mail_mcp/
server.py MCP araçları (stdio)
cli.py mail-mcp komutları
ops.py hesap bazlı işlemler
imap.py imaplib oturumu: LOGIN / XOAUTH2 (SASL-IR), SEARCH, FETCH, APPEND, MOVE
smtp.py gönderim (şifre / XOAUTH2)
msauth.py MSAL device code + Keychain token önbelleği + AADSTS hata çevirisi
folders.py LIST ayrıştırma, SPECIAL-USE (RFC 6154) ve isim yedekleri
query.py araç parametreleri -> IMAP SEARCH (Türkçe terimler için CHARSET UTF-8 literal)
mime.py başlık, gövde (HTML -> metin), ek meta verisi (IMAP bölüm numaraları), görünmez karakter temizliği
hidden.py HTML'de posta istemcisinin göstermediği (CSS/öznitelikle gizlenmiş) metni bulur ve atar
audit.py yan etkilerin içeriksiz denetim kaydı (JSONL)
utf7.py IMAP modified UTF-7 (Türkçe klasör adları)
tests/ pytest: birim + GreenMail entegrasyon
scripts/desktop-add-mail.sh Claude Desktop'a mail girdisini uygulama kapalıyken ekler
~/.config/mail-mcp/accounts.toml hesaplar (0600, sır yok)
~/.config/mail-mcp/state/ MSAL sinyal dosyaları (boş; yalnızca zaman damgası) + audit.jsonl (denetim kaydı, 0600)
~/Library/Application Support/mail-mcp/attachments/<hesap>/ indirilen ekler ([settings] download_dir)Hesaplar
hesap | adres | sağlayıcı | kimlik doğrulama |
icloud | ***@icloud.com |
| uygulamaya özel şifre |
okul | ***@bavu.edu.tr |
| OAuth2 (XOAUTH2) |
gmail-md | ***@gmail.com |
| uygulama şifresi |
gmail-123 | ***@gmail.com |
| uygulama şifresi |
hotmail | ***@hotmail.com |
| OAuth2 (XOAUTH2) |
Sunucu adresleri config.py içindeki PROVIDER_DEFAULTS'tan gelir ve hesap bölümünde ezilebilir (imap_host, imap_port, imap_security, smtp_host, smtp_port, smtp_security, username). Hesap başına izinler:
[accounts.gmail-md]
address = "***@gmail.com"
provider = "gmail"
allow_send = false # true: send_message çalışır
allow_modify = false # true: mark_read / move_message çalışır
# allow_draft = false # create_draft'ı kapatır (varsayılan true)
# allow_download = false # download_attachment'ı kapatır (varsayılan true)
# allowed_recipients = ["@example.org", "biri@example.com"] # send_message yalnız bu alan adlarına/adreslere gönderir
# save_sent_copy = true # SMTP gönderiminden sonra Sent'e kopya (iCloud'da varsayılan açık)
# enabled = false # hesabı "all" işlemlerinin dışında bırakır
[settings]
# max_sends_per_hour = 20 # hesap başına saatlik gönderim denemesi bütçesi (0: hiç gönderme)
# max_attachment_bytes = 52428800 # bundan büyük ek indirilmez (varsayılan 50 MB)
# audit_log = "~/.config/mail-mcp/state/audit.jsonl" # denetim kaydının yeri; false: dosya yazılmazDosya her araç çağrısında (mtime'a göre) yeniden okunur, yani değişiklikler için sunucuyu yeniden başlatmak gerekmez. İstisna yetkilerdir: allow_send, allow_modify, allow_draft, allow_download, allowed_recipients, settings.max_sends_per_hour, denetim kaydının yeri ve dosyanın yolu sunucu açılırken sabitlenir. Çalışan sunucuda yapılan düzenleme bir yetkiyi yalnız daraltabilir (bayrağı kapatır, alıcı listesini kısaltır ya da ekler, bütçeyi düşürür; daraltılan yetki yeniden başlatmaya kadar öyle kalır). Yetki açmak, listeyi genişletmek ya da yetkili yeni hesap eklemek için sunucuyu yeniden başlatmak gerekir; çalışırken eklenen hesap dört bayrağın hiçbirini almaz.
accounts.toml grup ya da diğer kullanıcılar tarafından yazılabiliyorsa (ör. kip 664/666) ya da başka bir kullanıcıya aitse sunucu dosyayı yüklemez: chmod 600 ~/.config/mail-mcp/accounts.toml.
Kurulum adımları
1. Gmail (gmail-md ve gmail-123 için ayrı ayrı)
myaccount.google.com → Güvenlik → 2 Adımlı Doğrulama'yı aç.
myaccount.google.com/apppasswords → ad:
mail-mcp→ Oluştur → 16 karakterlik şifreyi kopyala.Terminalde:
mail-mcp add-password gmail-md(
mail-mcp,~/mcp/mail-mcp/.venv/bin/mail-mcpya dauv --directory ~/mcp/mail-mcp run mail-mcpile çağrılır.) Boşluklar otomatik silinir. Kayıttan sonra IMAP girişi hemen test edilir.
2. iCloud
account.apple.com → Oturum Açma ve Güvenlik → Uygulamaya özel parolalar →
mail-mcp.mail-mcp add-password icloud
3. Hotmail: IMAP erişimi
outlook.live.com → Ayarlar → Posta → İletme ve IMAP → "Cihazların ve uygulamaların IMAP kullanmasına izin ver" → Kaydet.
4. Entra uygulama kaydı (bir kez; hotmail ve okul aynı client ID'yi kullanır)
https://entra.microsoft.com → Uygulama kayıtları (App registrations) → Yeni kayıt.
Ad:
mail-mcp (kişisel)Desteklenen hesap türleri: Herhangi bir kuruluş dizinindeki hesaplar ve kişisel Microsoft hesapları (Any Entra ID tenant + personal Microsoft accounts)
Yeniden yönlendirme URI'si: boş bırak
Kaydet.
Genel bakış sayfasından Uygulama (istemci) kimliği'ni kopyala.
Kimlik doğrulama (Authentication) → Gelişmiş ayarlar → Genel istemci akışlarına izin ver (Allow public client flows) = Evet → Kaydet.
(İsteğe bağlı, yönetici onayı için yararlı) API izinleri → İzin ekle → Microsoft Graph → Temsilci izinleri →
IMAP.AccessAsUser.All,SMTP.Send. İstemci gizli anahtarı ya da sertifika oluşturma: public client'ta gerekmez.Client ID'yi
~/.config/mail-mcp/accounts.tomldosyasında[microsoft] client_id = "..."satırına yaz. Client ID gizli değildir.
Kişisel bir Microsoft hesabıyla Entra'ya girildiğinde dizin (tenant) yoksa kayıt sayfası açılmayabilir. Bu durumda ücretsiz bir Entra/Azure dizini oluşturman gerekir. Okulun izin veriyorsa okul hesabıyla da kayıt açabilirsin.
İstenen scope'lar: https://outlook.office.com/IMAP.AccessAsUser.All ve https://outlook.office.com/SMTP.Send. offline_access MSAL tarafından otomatik eklenir; MSAL ayrılmış scope'ların elle verilmesini reddediyor.
5. Microsoft girişleri
mail-mcp login hotmail --smtp
mail-mcp login okul --smtpEkrandaki kodu https://microsoft.com/devicelogin sayfasına gir ve doğru hesabı seç. Yanlış hesapla girilirse token önbellekten silinir ve hata verilir. --smtp, SMTP AUTH'u da dener; posta göndermez.
Okul tenant'ı onay vermezse (AADSTS90094 / 65001 / "Need admin approval" sayfası): login hatayı açıkça yazar ve okul hesabını enabled = false yapar (TOML yedeği alınarak). Diğer hesaplar çalışmaya devam eder. Seçenekler:
BT biriminden uygulama için admin consent iste (Client ID'yi ver).
Okul postasını bir Gmail hesabına yönlendir: outlook.office.com → Ayarlar → Posta → İletme. Kurum dış yönlendirmeyi engelleyebilir.
Elle yönetmek için:
mail-mcp disable okul --reason "..."/mail-mcp enable okul.
6. Test
mail-mcp doctor # her hesap: IMAP LOGIN + INBOX EXAMINE, OK/HATA tablosu
mail-mcp doctor --smtp # + SMTP AUTH (posta gönderilmez)
mail-mcp doctor gmail-md # tek hesapBağlantı
Claude Desktop (Sohbet sekmesi):
~/Library/Application Support/Claude/claude_desktop_config.json→mcpServers.mail(/opt/homebrew/bin/uv --directory /Users/<kullanıcı>/mcp/mail-mcp run --frozen mail-mcp serve; Desktop~açmaz, yollar mutlak olmalı). Dosyayı uygulama açıkken düzenleme. Uygulama dosyayı açılışta bir kez belleğe okuyor, değişiklikleri izlemiyor ve her ayar değişikliğinde dosyanın tamamını bellekteki kopyadan yeniden yazıyor (main.log'daki "Config file written" satırları; 2026-11-19'da günde 500'den fazla). Uygulama açıkken elle eklenen girdi ilk yazımda siliniyor. Bu, 2026-11-19'da iki kez oldu. Kaynak:app.asariçinde yüklemeB_()(önbellek), yazmaH_(). GeçersizmcpServersgirdileri ise korunuyor (skippedMcpServers). Doğru sıra:Claude'dan Cmd+Q ile çık. Bu Code sekmesini de kapatır, o yüzden aşağıdaki komutu bir Claude oturumundan değil Terminal.app'ten çalıştır.
Şu komutu çalıştır:
~/mcp/mail-mcp/scripts/desktop-add-mail.shUygulama açıksa betik reddeder. Önce
.bak-<tarih>-mailyedeği alır, girdiyi atomik olarak ekler, zaten varsa dokunmaz.Claude'u aç ve kontrol et:
jq '.mcpServers | keys' ~/Library/Application\ Support/Claude/claude_desktop_config.jsonçıktısında"mail"görünmeli. Ayrıca~/Library/Logs/Claude/mcp-server-mail.logoluşmalı vemcp.log'da[mail] Server startedsatırı olmalı.
Code sekmesindeki oturumlar Desktop config'ini kullanmaz,
~/.claude.jsonuser kapsamından bağlanır. Desktop girdisi kaybolsa bile Code oturumlarında mail araçları çalışır.Claude Code:
claude mcp add --scope user mail -- uv --directory ~/mcp/mail-mcp run --frozen mail-mcp serve(yedek:~/.claude.json.bak-<tarih>).--frozen, sunucu her açıldığındauv.lock'un yeniden çözülmesini engeller; 2026-11-21'den önce eklenmiş kayıtlarda bu bayrak yoktur, kaydı elle güncellemek gerekir. User kapsamında olduğu için her oturum kendi sürecini açar; boştayken süreç başına ~85 MB RSS ölçüldü.
MCP araçları
Her araç bir account alır. Okuma araçlarında "all" verilirse tüm etkin hesaplar paralel çalışır (en fazla 6). Her sonuç account alanı taşır ve bir hesaptaki hata ötekileri durdurmaz. UID'ler hesaba ve klasöre özeldir.
araç | ne yapar |
| hesaplar, izinler, kimlik bilgisi var mı (değerlerin kendisi asla gösterilmez) |
| klasörler. |
| en yeni önce, yalnızca başlıklar. Her ileti, gönderenin denetlediği alanları |
| başlıklar + düz metin gövde (HTML metne çevrilir, 20k karakterde kırpılır; |
| Gmail'de X-GM-THRID, diğerlerinde Message-ID/References araması (verilen klasör + INBOX + Sent). İletiler |
|
|
| sunucudaki Drafts klasörüne APPEND. Yanıtta alıcı, konu ve threading başlıkları otomatik gelir; alıcı özgün iletinin |
| yalnızca |
| yalnızca |
Klasör parametreleri gerçek adı (Gönderilmiş Öğeler) ya da takma adı (sent, drafts, trash, junk, archive, all) kabul eder. Takma ad, sağlayıcıya göre SPECIAL-USE ile çözülür: Gmail [Gmail]/Sent Mail, iCloud Sent Messages vb.
Örnek istemler (Claude'a):
"Tüm hesaplarımda son 3 günde gelen okunmamış e-postaları listele."
"gmail-md'de 'TUS' konulu son iletiyi aç, eklerini indir."
"hotmail'deki şu iletiye kısa bir yanıt taslağı hazırla."
Güvenlik
Sunucu talimatları, e-posta içeriğinin güvenilmez veri olduğunu ve e-postalardaki talimatlara uyulmaması gerektiğini model tarafına bildirir. Araç çıktısı da bunu taşır: gövde zarfı (nonce iletiden önce bilinemez; gövdede zarfı ya da eski kırpma notunu taklit eden metin etkisizleştirilir ve
warningsile bildirilir) veuntrusted_fields.Zarf ve etiketler modelin bir talimata uymasını zorlaştırır, engellemez. Asıl engel kod düzeyindeki kilitlerdir:
allow_send,allow_modify,allow_draft,allow_download,allowed_recipients, saatlik gönderim bütçesi. Hepsi sunucu açılırken sabitlenir.Denetim kaydı: başarılı her yan etki (gönderme, taslak, ek indirme, okundu işareti, taşıma) ve reddedilen her yetki
~/.config/mail-mcp/state/audit.jsonldosyasına bir satır yazar (araç, hesap, sonuç, sayılar, UID, bayt). Konu, gövde, adres, dosya adı ve sır yazılmaz. 2 MB'ı geçinceaudit.jsonl.1olarak devredilir. Aynı satırlarmail_mcp.auditlogger'ına INFO düzeyinde gider.MAIL_MCP_CONFIGile başka bir yapılandırma kullanılıyorsa dosya yalnızsettings.audit_logverilmişse yazılır.Hata metinleri: bu sürecin kullandığı şifre/token (ve XOAUTH2 dizgisi) hata metninden
[redacted]olarak silinir; beklenmeyen bir istisna yalnız tür adıyla bildirilir (iletisi komut ya da ileti içeriği taşıyabilir).Sınırlar: karmaşık CSS seçicileriyle ya da dış stil dosyasıyla gizlenen metin, zemin rengine yakın ama eşik (kanal başına 10) dışında kalan renk ve görsel içindeki yazı yakalanmaz.
sender_authenticationiletinin kendi başlığından okunur; yalnız posta sağlayıcının yazdığı (en üstteki) başlık anlamlıdır.
Geliştirme ve test
cd ~/mcp/mail-mcp
uv run pytest -qEntegrasyon testleri (GreenMail, yalnızca yerel; dışarı posta çıkmaz):
colima start
docker run -d --name mailmcp-greenmail -p 127.0.0.1:3025:3025 -p 127.0.0.1:3143:3143 \
-e GREENMAIL_OPTS='-Dgreenmail.setup.test.smtp -Dgreenmail.setup.test.imap -Dgreenmail.hostname=0.0.0.0 -Dgreenmail.users=test:testpw@localhost,test2:testpw2@localhost -Dgreenmail.users.login=local_part' \
greenmail/standalone:2.1.8
uv run pytest -q
docker rm -f mailmcp-greenmail && colima stopBu testler şunları kapsar: Türkçe SEARCH (çoklu literal), HTML gövde, ek indirme, thread (saat dilimi farkıyla sıralama dahil), Drafts'a yanıt taslağı, izin kilitleri, MOVE, MOVE'suz sunucu yolu (kopyala + UID EXPUNGE) ve STORE, yerel SMTP gönderimi + Sent kopyası, XOAUTH2 (SASL-IR) kod yolu ve stdio üzerinden account="all". GreenMail konteyneri UTC ile çalışır; tarih testleri bu yüzden UTC gününü kullanır.
Outlook.com (hotmail) SEARCH komutunda UTF-8 kabul etmiyor: CHARSET UTF-8 için NO [BADCHARSET (US-ASCII)], 8-bit baytlar için BAD dönüyor (2026-11-19'da gerçek hesapta ölçüldü). Ayrıca SUBJECT alt dizeyle, TEXT ise yalnız kelime başından eşleşiyor. Böyle sunucularda (hotmail için baştan, diğerlerinde ilk BADCHARSET yanıtından sonra) Türkçe terim yerine sunucuya kelime başındaki ASCII önek gönderiliyor (taslağı → tasla). Kesin eşleşme istemci tarafında Türkçeye duyarlı biçimde yapılıyor (İ/ı). Uygun önek yoksa (ödev) başlık terimleri en yeni 1000, gövde terimleri en yeni 150 aday üzerinde süzülüyor; sınır aşılırsa sonuçta notes alanı bunu bildiriyor.
Bilinen sınırlamalar:
Outlook.com
RFC822.SIZEiçin gerçek boyutu değil kendi tahminini bildiriyor (2026-11-20'de ölçüldü: uid 41146 için 81925, indirilen 23466 bayt).sizebu yüzden hotmail'de yaklaşık bir değerdir; gerçek bayt sayısısize_fetchedalanındadır.hotmail'de hem
ArchivehemArşivklasörü var ve hiçbiri SPECIAL-USE bayrağı taşımıyor.archivetakma adıArchive'a çözülür; öbürü için klasör adını (Arşiv) ver.list_foldersçıktısındakialiasalanı hangisinin seçildiğini gösterir.imaplib yetenek listesini girişten önce okur; Gmail ve iCloud MOVE/UIDPLUS'ı girişten sonra bildirir. Sunucu bu yüzden girişten sonra
CAPABILITY'yi yeniden okur.GreenMail
FROM/TOaramasında yalnız tam adresle eşleşiyor (RFC 3501 alt dize ister). Gerçek sağlayıcılar alt dizeyle eşleştiriyor; testte tam adres kullanıldı.Exchange'de
HEADER Message-IDaraması başarısız olursaget_threadkonu eşleşmesine düşer ve bununotesalanında belirtir.XOAUTH2 SASL-IR yolunda, sunucu hata bildirmek için continuation (
+ <json>) gönderirse istemci zaman aşımına (30 sn) kadar bekler. Microsoft doğrudanNOdöndürüyor; Gmail böyle yapıyor ama burada Gmail şifreyle bağlanıyor.Python yorumlayıcısı değişirse (uv Python güncellemesi) macOS, Keychain erişimi için bir kez izin isteyebilir.
Komutlar
mail-mcp serve | add-password <h> [--no-verify] | delete-password <h> | login <h> [--smtp]
logout <h> | doctor [h...] [--smtp] | disable <h> [--reason] | enable <h>Log çıktısı stderr'e gider (MAIL_MCP_LOG=INFO). Log'a ileti içeriği, şifre ya da token yazılmaz. MAIL_MCP_CONFIG farklı bir yapılandırma dosyası seçer.
Lisans
Available Tools
10 toolscreate_draftA
Save a plain-text draft in the account's server-side Drafts folder (nothing is sent).
With reply_to_uid (in reply_folder) it becomes a reply: In-Reply-To/References are set, and
'to' and 'subject' default to the original's Reply-To/From and 'Re: <subject>'. When the recipient
comes from a Reply-To that is not the sender, the result says so (reply_to_differs_from_sender,
warnings). Refused where allow_draft = false.Inputs: body (required), account (required), cc, to, +4 more.
download_attachmentA
Save one attachment (part number from get_message, e.g. "2" or "1.2") under the download folder (default ~/Library/Application Support/mail-mcp/attachments//; settings.download_dir in accounts.toml) and return its local path. Never overwrites existing files.
The file is marked with com.apple.quarantine (quarantined says whether that worked) and the result
carries warnings for executable or active-content types. Do not open or run a downloaded file
unless the user asks for it. Refused where allow_download = false, and above
settings.max_attachment_bytes (default 50 MB).Inputs: uid (required), part (required), account (required), folder.
get_messageARead-only
Get one message: headers, plain-text body (HTML converted to text, truncated to max_chars, default 20000, must be at least 1) and attachment metadata (part, filename, type, size). Does not mark it as read. size is the server's RFC822.SIZE; size_fetched appears when the fetched bytes differ.
URLs longer than 80 chars (mostly tracking links) are shortened to their host ("example.com/…") and
label-less long links are dropped; links_shortened reports how many. full_links=true keeps every URL.
The body is wrapped in an untrusted-content envelope (see the server instructions); body_chars and
body_truncated describe the text inside it. HTML text that a mail client would not display
(display:none, zero font size, white on white, ...) is removed and reported in hidden_content.
content_trust carries: invisible_chars_removed, from_is_self, sender_authentication (spf/dkim/dmarc
as the message's Authentication-Results header states them) and, when they apply,
reply_to_differs_from_sender and alternative_mismatch. Attachment filenames are sanitised.Inputs: uid (required), account (required), folder, max_chars, +1 more.
get_threadARead-only
Get the conversation a message belongs to, oldest first, from the folder and Sent.
Give uid (+folder) or message_id ("<...@...>"). Gmail uses its native thread id; other providers
match Message-ID/References/In-Reply-To. account="all" is allowed only with message_id.
Bodies get the same cleanup as get_message: long URLs are shortened to their host unless
full_links=true, and each message reports links_shortened when any were. Each body is wrapped in the
untrusted-content envelope (one nonce per call) and each message lists its untrusted_fields.Inputs: account (required), uid, folder, full_links, +3 more.
list_accountsARead-only
List configured email accounts, their provider, auth type, permissions and whether credentials are present.
Inputs: no named parameters.
list_foldersARead-only
List folders of an account (or "all"). special_use is the role the server flags (SPECIAL-USE); alias is the alias (sent, drafts, trash, junk, archive, all) that resolves to the folder, which also covers folders matched by name when the server sends no flag.
with_counts=true adds message/unseen counts (slower: one STATUS per folder).Inputs: account (required), with_counts.
mark_readA
Mark messages read (or unread with read=false). Requires allow_modify = true for the account.
Inputs: uids (required), account (required), read, folder.
move_messageADestructive
Move messages to another existing folder (name or alias such as trash, archive). Requires allow_modify = true for the account.
Inputs: uids (required), account (required), destination (required), folder.
search_messagesARead-only
Search messages; newest first. Returns headers only (use get_message for the body). Every message lists its sender-controlled fields in untrusted_fields; invisible and text-direction characters are removed from them (invisible_chars_removed appears when any were).
query: free text (IMAP TEXT, headers+body). from_addr/to_addr/subject: substring matches.
since/before: YYYY-MM-DD arrival date (IMAP INTERNALDATE; before is exclusive). unread: true=only unread, false=only read.
folder: name or alias (sent, drafts, trash, junk, archive, all). limit: 1-200 (above 200 is capped and noted, below 1 is an error).
gmail_query: Gmail search syntax (X-GM-RAW), Gmail accounts only.
account="all" searches every enabled account in parallel.Inputs: account (required), limit, query, since, +7 more.
send_messageADestructive
SEND an email now via SMTP. Only works for accounts with allow_send = true (default false). Only use when the user explicitly asked to send this exact message; otherwise use create_draft. Refused when a recipient is outside the account's allowed_recipients (if set) or when the account's hourly send budget (settings.max_sends_per_hour, default 20) is used up.
Inputs: to (required), body (required), account (required), subject (required), +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool maps to a distinct resource+action: account listing, folder listing, search, single-message read, thread read, attachment download, draft creation, send, read-state change, and move. The only potentially confusable pair (get_message vs get_thread, create_draft vs send_message) is explicitly disambiguated in the descriptions, including a direct instruction to prefer create_draft unless the user asked to send.
All ten tools follow a consistent snake_case verb_noun pattern (list_accounts, get_message, search_messages, create_draft, mark_read, move_message). No camelCase or stylistic outliers; mark_read and move_message still read as verb+object.
Ten tools is well within the ideal 3-15 range and each one covers a distinct part of the mail workflow (discovery, reading, attachments, composing, state changes). Nothing appears redundant or missing at the count level.
Core lifecycle is covered: accounts, folders, search, read message/thread, attachments, draft, send, mark read, move (including to trash/archive). Gaps remain around destructive operations (no delete/expunge), draft editing/deletion, and sending attachments, but these are minor and mostly workaroundable.
Maintenance
Related MCP Connectors
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Connect Gmail, iCloud Mail, Outlook, Yahoo Mail, Fastmail and other IMAP inboxes to ChatGPT, Claude and compatible AI assistants. Find emails by meaning across languages with semantic search. Ask AI to find customer conversations, summarize deadlines and draft follow-ups. Give a sales rep access to a shared outreach inbox or bring email into a compatible CRM. Share an iCloud custom-domain inbox with teammates without their own Apple ID or iCloud+ plan. Search results may be incomplete or stale; separate permissions control mail actions.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables Claude to control the macOS Mail app for reading, searching, drafting, sending, and managing emails directly from Claude Desktop.12MIT
- FlicenseNot gradedqualityBmaintenanceEnables Claude to read, search, draft, send, flag, and move email across multiple IMAP/SMTP mailboxes while keeping credentials local.-
- AlicenseNot gradedqualityCmaintenanceConnects Claude Desktop to a local email client, enabling AI-powered email reading, searching, drafting, and organization while preventing sending or permanent deletion.1Apache 2.0
- AlicenseBqualityDmaintenanceEnables email management through IMAP/SMTP, including reading, sending, replying, starring, deleting, labeling emails, handling attachments, and filtering by Gmail smart categories. Works with MCP-compatible clients like Claude Desktop and Claude Code using App Password authentication.1950 npmMIT