The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Gigamail listing page.
MCP server that gives your agent — Claude, Codex, OpenClaw, Hermes, or any MCP client — safe, controlled access to your email — multi-account (Microsoft Graph + IMAP), calendar, local search index, sender memory, and an agent-aware permission model.
No built-in LLM: the intelligence is your agent's. The MCP server speaks stdio only — no network port. (An optional human console adds a local HTTP API bound to 127.0.0.1.)
On your data: GigaMail keeps mail indexes, credentials, memory and configuration on your machine — we run no service and receive nothing. Mail content your agent reads is, of course, handled by that agent and its model provider under their own data policies. Choose your agent accordingly; the masker lets you hide sensitive fields (tax codes, VAT numbers, IBANs, emails, phone numbers — validated deterministically, no AI) before the agent ever sees them.
https://github.com/user-attachments/assets/362b58b6-6161-4911-b255-4c735bc7ba56
The human console in ninety seconds, on a demo mailbox: dashboard, reading a mail, a reply drafted by the agent from a one-line instruction, folders, calendar, "ask your mail", automation rules and the first-run guide. The human reviews and sends — or edits the instruction and regenerates.
GigaMail ships through two channels:
pip install gigamail — the agentic core: MCP server, CLI, watcher
and the console's local HTTP backend. No graphical app — the right
channel when your agent is the interface.GigaMail-Setup-<version>.exe from the latest release;
the app then updates itself from there. The installer is not code-signed
yet, so Windows SmartScreen warns on first run — compare the SHA-256
digest GitHub shows next to the asset. To build it yourself: Node 22+,
console/prepare-python.ps1, then npm run dist.Everything below covers the pip channel.
Microsoft login note: the bundled Azure app is not yet publisher-verified, so the consent screen shows an "unverified" notice (works fine; some corporate tenants may block it). Standard alternative: register your own Azure app and set your
client_idinsrc/ade_mail_agent/core/ms_config.json. IMAP needs none of this.
Give the account its identity and knowledge (this is what makes replies yours):
Register in Claude Desktop / Claude Code (mcpServers):
The commands are also available under their legacy names
(ade-mail-agent, ade-mail-agent-server), so existing setups keep working.
Using OpenClaw or Hermes instead of Claude? Verified configs in INTEGRATIONS.md.
Are you an AI agent setting this up on behalf of a human? You can do the install and the MCP registration:
pip install "gigamail[all]", then addgigamail-serverto your client's MCP config (see INTEGRATIONS.md; declareGIGAMAIL_ROOTif your client filters the environment). Stop there. Connecting a mailbox (gigamail login,gigamail accounts add-imap) asks for credentials and must be done by the human in their own shell — it is not something you should do, and GigaMail is built so that it cannot be done through you. Tell them what to run, then wait.
Then just ask your agent: "reply to the last quote request using the price list" — it reads the mail, pulls the numbers from your file, drafts the reply, and asks you before sending.
24 typed tools, generated from the server itself:
Full map and design decisions: MAPPA_MCP.md.
Email content is treated as untrusted data (prompt injection). The
agent cannot approve its own actions, by construction: a dangerous tool
returns only an inert request_id, and approving it — from the console or
from gigamail approvals approve — requires an OS-level verification of
the person at the machine (Windows Hello / Touch ID). A process,
including an agent that holds a shell, can open that prompt but cannot
pass it; with no such backend available, nothing approves. No secret ever
enters the model context, so an injected instruction has nothing to
spend. Repeating the id just returns awaiting approval. The agent
can only read files explicitly registered by the user, never the rest of the
filesystem. Every write action is logged to %APPDATA%/ADE/agent_audit.jsonl
(append-only: GigaMail never rewrites past entries — it is not, and does not
claim to be, tamper-proof storage).
We red-team this: hostile emails ordering exfiltration, mass deletion, and the agent to approve itself — fed to a real agent with every mail tool enabled.
This design is a fix. v0.1.0 returned a one-time confirm token in the tool result, which put it in the model's context: the agent held both halves. Thanks to u/ranbuman and u/anderson_the_one on r/mcp for catching it. The switch now sits where the agent cannot reach.

The structural half of that suite runs in CI on every push (tests/test_injection.py); the real-agent half is opt-in (scripts/injection_e2e.py) and runs with a dry-run guard so confirmed actions are audited but never executed.
You can tell GigaMail: mail from these senders (or in this folder) gets a
reply drafted from these documents. Rules are created from the CLI —
gigamail rules add — behind the same Windows Hello / Touch ID prompt as
approvals, and gigamail watch is the process that applies them. The MCP
server stays passive and there is no MCP tool that touches rules: an
injected instruction cannot enable autopilot.
gigamail desktop-setup once — UAC prompt — to make
them clickable; they open the approval, which raises Hello) and
Telegram (gigamail telegram setup, your own bot: ✅ approve if you
opted in with --approve behind Hello, ❌ reject, ✏️ ask for changes —
accepted only from your chat).decided_by automode:<rule_id> —
you gave that approval when you created the rule, for a precise scope,
with a mandatory expiry, a daily cap and a per-sender cooldown. The
notification still fires.The drafter (your own agent, via claude -p) produces the reply body
and nothing else: recipient, subject and thread are fixed from the incoming
message — always the sender, never Reply-To, never an address written by
the draft. Deterministic barriers run first: no DMARC pass → never auto;
auto-generated mail, lists, no-reply senders, the provider's spam verdict,
executable attachments → no reply at all; the first message from a new
sender always goes through you; a burst of matches pauses the rule by
itself. Details in SECURITY.md.
AGPL-3.0-or-later. Free to use, study, modify and share. If you distribute a modified version — or run one as a network service — you must make its source available under the same license. Commercial licenses for closed-source use are available from the copyright holder.
Server MCP che dà al tuo agente — Claude, Codex, OpenClaw, Hermes o qualunque client MCP — accesso sicuro e controllato alla tua posta — multi-account (Microsoft Graph + IMAP), calendario, indice di ricerca locale, memoria dei mittenti e un modello di permessi pensato per gli agenti.
Nessun LLM interno: l'intelligenza è quella del tuo agente. Il server MCP parla solo stdio — nessuna porta di rete. (La console per l'umano, che è opzionale, aggiunge una API HTTP locale su 127.0.0.1.)
Sui tuoi dati: GigaMail tiene indici della posta, credenziali, memoria e configurazione sul tuo computer — noi non gestiamo alcun servizio e non riceviamo nulla. Il contenuto delle mail che il tuo agente legge è ovviamente trattato da quell'agente e dal suo fornitore di modello secondo le loro policy. Scegli l'agente di conseguenza; il masker permette di nascondere i dati sensibili (codici fiscali, partite IVA, IBAN, email, telefoni — validati in modo deterministico, senza AI) prima che l'agente li veda.
https://github.com/user-attachments/assets/362b58b6-6161-4911-b255-4c735bc7ba56
La console umana in novanta secondi, su una casella dimostrativa: dashboard, lettura di una mail, una risposta scritta dall'agente da un'istruzione di una riga, cartelle, calendario, "chiedi alle mail", regole di automazione e guida iniziale. L'umano rivede e invia — oppure corregge l'istruzione e rigenera.
GigaMail si installa da due canali:
pip install gigamail — il core agentico: server MCP, CLI, watcher
e il backend HTTP locale della console. Nessuna app grafica — è il
canale giusto quando l'interfaccia è il tuo agente.GigaMail-Setup-<versione>.exe dall'ultima release; da lì
l'app si aggiorna da sola. L'installer non è ancora firmato, quindi
Windows SmartScreen avvisa al primo avvio — confronta il digest SHA-256
che GitHub mostra accanto al file. Per buildarlo in casa: Node 22+,
console/prepare-python.ps1, poi npm run dist.Tutto quello che segue riguarda il canale pip.
Nota sul login Microsoft: l'app Azure inclusa non è ancora publisher-verified, quindi la schermata di consenso mostra l'avviso "unverified" (funziona comunque; alcuni tenant aziendali potrebbero bloccarla). Alternativa standard: registra la tua app Azure e metti il tuo
client_idinsrc/ade_mail_agent/core/ms_config.json. Per IMAP non serve nulla di tutto questo.
Dai all'account la sua identità e la sua conoscenza (è ciò che rende le risposte tue):
Registrazione in Claude Desktop / Claude Code (mcpServers):
I comandi restano disponibili anche con i vecchi nomi
(ade-mail-agent, ade-mail-agent-server), così le installazioni esistenti
continuano a funzionare.
Usi OpenClaw o Hermes invece di Claude? Configurazioni verificate in INTEGRATIONS.md.
Poi chiedi al tuo agente: "rispondi all'ultima richiesta di preventivo usando il listino" — legge la mail, prende i numeri dal tuo file, prepara la risposta e ti chiede conferma prima di inviare.
24 tool tipizzati, generati dal server stesso:
Mappa completa e decisioni di design: MAPPA_MCP.md.
Il contenuto delle email è trattato come dato non fidato (prompt
injection). L'agente non può approvare le proprie azioni, per costruzione:
un tool pericoloso restituisce solo un request_id inerte, e approvarlo —
dalla console o con gigamail approvals approve — richiede una verifica
dell'utente fisico a livello di sistema operativo (Windows Hello /
Touch ID). Un processo, compreso un agente con la shell, può aprire quel
prompt ma non superarlo; senza un backend del genere, nulla viene approvato.
Nessun segreto entra nel contesto del modello, quindi un'istruzione
iniettata non ha nulla da spendere. Ripetere
l'id restituisce solo in attesa di approvazione. L'agente può leggere solo i file
registrati esplicitamente dall'utente, mai il resto del filesystem. Ogni
azione di scrittura finisce in %APPDATA%/ADE/agent_audit.jsonl (append-only:
GigaMail non riscrive mai le voci passate — non è, e non pretende di essere,
un archivio a prova di manomissione).
Lo mettiamo alla prova: mail ostili che ordinano esfiltrazione, cancellazione di massa e all'agente di approvarsi da solo, date a un agente reale con tutti i tool attivi.
Questo disegno è una correzione. La v0.1.0 restituiva un token di conferma monouso nel risultato del tool, quindi dentro il contesto del modello: l'agente aveva entrambe le metà. Grazie a u/ranbuman e u/anderson_the_one su r/mcp per averlo notato. Ora l'interruttore sta dove l'agente non arriva.

La metà strutturale della suite gira in CI a ogni push (tests/test_injection.py); quella con l'agente reale è opt-in (scripts/injection_e2e.py) e usa una modalità dry-run, così le azioni confermate finiscono nell'audit ma non vengono mai eseguite.
Puoi dire a GigaMail: le mail da questi mittenti (o in questa cartella)
ricevono una risposta preparata da questi documenti. Le regole si creano
dalla CLI — gigamail rules add — dietro lo stesso prompt Windows Hello /
Touch ID delle approvazioni, e gigamail watch è il processo che le
applica. Il server MCP resta passivo e nessun tool MCP tocca le regole:
un'istruzione iniettata non può accendere l'autopilota.
gigamail desktop-setup — prompt UAC — per renderli
cliccabili; aprono l'approvazione, che alza Hello) e Telegram
(gigamail telegram setup, col tuo bot: ✅ approva se hai scelto
--approve dietro Hello, ❌ rifiuta, ✏️ chiedi modifiche — accettati
solo dalla tua chat).decided_by automode:<rule_id> — quell'approvazione l'hai data tu creando la regola,
per uno scope preciso, con scadenza obbligatoria, tetto giornaliero e
cooldown per mittente. La notifica parte comunque.Chi scrive (il tuo agente, via claude -p) produce il corpo della
risposta e nient'altro: destinatario, oggetto e thread li fissa GigaMail
dal messaggio in arrivo — sempre il mittente, mai il Reply-To, mai un
indirizzo scritto dalla bozza. Prima passano barriere deterministiche:
niente DMARC pass → mai auto; posta automatica, liste, mittenti no-reply,
il verdetto spam del provider, allegati eseguibili → nessuna risposta; il
primo messaggio di un mittente nuovo passa sempre da te; una raffica di
match mette in pausa la regola da sola. Dettagli in
SECURITY.md.
AGPL-3.0-or-later. Libero di usarlo, studiarlo, modificarlo e condividerlo. Se distribuisci una versione modificata — o la offri come servizio in rete — devi rendere disponibile il sorgente con la stessa licenza. Licenze commerciali per usi closed-source sono disponibili dal titolare del copyright.
一个 MCP 服务器,让你的代理 —— Claude、Codex、OpenClaw、Hermes 或任何 兼容 MCP 的客户端 —— 安全、受控地访问你的真实邮箱 —— 多账户(Microsoft Graph + IMAP)、日历、本地搜索索引、发件人 记忆,以及面向代理的权限模型。
不内置任何 LLM:智能来自你自己的代理。MCP 服务器只使用 stdio 传输,不开 网络端口。(可选的人工控制台会在 127.0.0.1 上提供一个本地 HTTP API。)
关于你的数据:GigaMail 把邮件索引、凭据、记忆和配置全部保存在你自己 的机器上 —— 我们不运行任何服务,也收不到任何数据。代理读取的邮件内容当 然会经过该代理及其模型提供商,适用他们各自的数据政策。请据此选择你的代理。
https://github.com/user-attachments/assets/362b58b6-6161-4911-b255-4c735bc7ba56
演示邮箱上的人工控制台 90 秒:仪表盘、阅读邮件、代理根据一行指令起草的回复、 文件夹、日历、“询问邮件”、自动化规则和首次运行向导。人工审阅后发送 —— 或者修改指令后重新生成。
GigaMail 通过两个渠道发布:
pip install gigamail — 代理核心:MCP 服务器、CLI、watcher 和
控制台的本地 HTTP 后端。不含图形界面 — 如果你的代理就是界面,选这个渠道。GigaMail-Setup-<版本>.exe,之后应用会自动从那里更新。安装包尚未代码签名,
首次运行时 Windows SmartScreen 会提示警告 — 请核对 GitHub 在文件旁显示的
SHA-256 摘要。自行构建:Node 22+,console/prepare-python.ps1,然后
npm run dist。下文内容均针对 pip 渠道。
为账户设置身份与知识(这是让回复"像你"的关键):
在 Claude Desktop / Claude Code 中注册(mcpServers):
使用 OpenClaw 或 Hermes?经过验证的配置见 INTEGRATIONS.md。
你是替人类做安装的 AI 代理吗? 你可以完成安装与 MCP 注册:
pip install "gigamail[all]",然后把gigamail-server加入客户端的 MCP 配置。到此为止。 连接邮箱(gigamail login、gigamail accounts add-imap)需要输入凭据,必须由人类在自己的终端里完成 —— 这不是你该做的 事,GigaMail 的设计也让它无法经由你完成。告诉他们要运行什么,然后等待。
之后直接对你的代理说:"用价目表回复最近那封询价邮件" —— 它会读邮件、从你 的文件里取数字、写好草稿,并在发送前征得你的同意。
24 个类型化工具,由服务器本身生成:
邮件内容被视为不可信数据(提示注入)。代理从构造上就无法批准自己的
操作:危险工具只返回一个惰性的 request_id,而批准它 —— 无论从控制台还是
gigamail approvals approve —— 都需要对机器前的人进行操作系统级验证
(Windows Hello / Touch ID)。任何进程(包括持有 shell 的代理)都能
弹出这个验证框,却无法通过它;没有此类验证后端时,一律拒绝(fail-closed)。
没有任何机密进入模型上下文,被注入的指令无物可用。重复提交 id 只会得到
等待批准。代理只能读取用户明确注册的文件,永远碰不到文件系统的其余部分。
每次写操作都记入只追加的审计日志(GigaMail 从不改写历史条目 —— 它不是、
也不自称是防篡改存储)。
我们对此做红队测试:让恶意邮件命令真实代理外泄数据、批量删除、自我批准 —— 在所有邮件工具全开的情况下,零破坏性操作。
你可以告诉 GigaMail:来自这些发件人(或这个文件夹)的邮件,用这些文档起草
回复。规则只能从 CLI(gigamail rules add)或控制台创建,且要经过与批准
相同的 Windows Hello / Touch ID 验证;gigamail watch 是执行规则的进程。
MCP 服务器保持被动,不存在任何能触碰规则的 MCP 工具:被注入的指令无法
打开自动驾驶。
gigamail desktop-setup 使其可点击;按钮只是打开批准流程,仍需 Hello),
以及 Telegram(gigamail telegram setup,用你自己的机器人:✅ 批准需
在 Hello 背后显式开启 --approve;❌ 拒绝、✏️ 要求修改 —— 且只接受来自
你那个会话的指令)。decided_by automode:<rule_id> —— 这份批准是
你创建规则时在 Hello 背后给出的,范围精确、必有过期时间、每日上限和按
发件人的冷却时间。通知照常发出。起草者(你自己的代理,经 claude -p)只产出回复正文:收件人、主题与
会话线程由 GigaMail 从来信中确定 —— 永远回给通过验证的发件人,绝不理会
Reply-To,也绝不使用草稿里写出的地址。确定性栅栏先行:DMARC 未通过 →
永不 auto;自动生成的邮件、邮件列表、no-reply 发件人、提供商的垃圾邮件判定、
可执行附件 → 一律不回复;新发件人的第一封邮件永远经过你;短时间内大量命中
会让规则自动暂停。详见 SECURITY.md。
AGPL-3.0-or-later. 自由使用、研究、修改与分享。若你分发修改版 —— 或将 其作为网络服务运行 —— 必须以相同许可证提供其源代码。闭源商用许可可向版权 持有人洽询。