gigamail
MCP serverProductivityYour real mailbox and calendar for your agent (M365/IMAP); a human approves every send.
Unavailable. This server has no hosted endpoint yet, so ahel can't serve it.
Connect ahel once, and every AI you use reads what you have installed.
From the project's README
As published by adecubed/gigamail in README.md.
GigaMail — Mail for your AI agent
English · Italiano · 中文
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.
Two minutes and a quarter on a demo mailbox, in four scenes: the same question answered differently in two folders, a price taken from the seller's own file, a marker left where the documents say nothing, and a mail carrying instructions for the assistant that never reaches the model. A human reviews and sends — or edits the instruction and regenerates.
Why
- Hybrid search: provider search (Graph/IMAP) + local SQLite index — fast and offline-friendly
- Sender memory: tone, topics and history per sender, so replies sound right
- Observer: patterns learned from how the user edited past drafts
- Knowledge files: attach your price lists, terms, product sheets to an account — the agent reads them to answer mail. Your agent doesn't need to know everything: the account carries its own knowledge
- Agent-aware permissions: reads are free; send/delete require an approval given out of band — the agent gets an inert request id, a human approves from the console or the CLI, and only then does it execute, with the exact arguments the human saw. Every write lands in an append-only action log
- Credentials never touch the agent channel: login and account management live in the CLI only — a prompt injection inside an email cannot add accounts or read secrets
Quick start
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.- Windows desktop app — the human console packaged with an
embedded Python: one installer, no prerequisites. Download
GigaMail-Setup-<version>.exefrom 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, thennpm run dist.
Everything below covers the pip channel.
pip install "gigamail[all]"
gigamail login # Microsoft device flow
gigamail accounts add-imap # or IMAP: Aruba, Gmail, Libero, ...
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):
gigamail identity set # who am I, what I do, tone
gigamail identity add-file C:\docs\pricelist.xlsx
gigamail identity add-file C:\docs\catalog\ # whole folder
Register in Claude Desktop / Claude Code (mcpServers):
{
"gigamail": {
"command": "gigamail-server"
}
}
The commands are also available under their legacy names
(ade-mail-agent, ade-mail-agent-server), so existing setups keep working.
Using Codex? The repository is a Codex plugin: it registers the
gigamail MCP server and adds a skill that teaches Codex the approval gate.
codex plugin marketplace add adecubed/gigamail
codex plugin add gigamail@gigamail
GigaMail is also in the OpenAI Plugins Directory,
as a skill: install it from there, then register the server with
codex mcp add gigamail -- gigamail-server (the server comes from pip,
as above).
Using OpenClaw or Hermes? 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.
Tools
28 typed tools, generated from the server itself:
- Read (17) — accounts, identity, knowledge files, messages, unread, folders, hybrid search, attachment text, sender history, learned patterns, calendar events, free-slot availability, Drive files and their text
- Safe writes (3, audited) — mark read, move message, create folder
- Dangerous (8, human approval out of band) — send, reply, delete message, delete folder, create/delete calendar event, upload a file to Drive, move a Drive file to the trash
The calendar is served by Microsoft Graph or Google Calendar, whichever
the user connected; the tools are the same either way. Drive uses the
drive.file scope, so it only ever sees files GigaMail created itself.
Connecting Google: GOOGLE_SETUP.md.
Full map and design decisions: MAPPA_MCP.md.
Security model
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.
Reply rules (0.2): semi-auto and auto reply, fenced
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.
- semi (default): the draft becomes a normal approval request — you get the notification, you approve with Hello, it goes out.
- Notifications reach you where you are: a Windows toast with
✅ / ❌ buttons (run
gigamail desktop-setuponce — 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--approvebehind Hello, ❌ reject, ✏️ ask for changes — accepted only from your chat). - auto: the request is born approved,
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.
License
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.
GigaMail — La posta per il tuo agente AI
English · Italiano · 中文
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.
Due minuti e un quarto su una casella dimostrativa, in quattro scene: la stessa domanda con due risposte diverse in due cartelle, un prezzo preso dai file dell'utente, un marcatore dove i documenti non dicono niente, e una mail con dentro istruzioni per l'assistente che al modello non arriva mai. L'umano rivede e invia — oppure corregge l'istruzione e rigenera.
Perché
- Ricerca ibrida: provider (Graph/IMAP) + indice SQLite locale — veloce e offline-friendly
- Memoria dei mittenti: tono, argomenti e storico per rispondere nel modo giusto
- Observer: pattern appresi dalle correzioni dell'utente alle bozze passate
- File di conoscenza: collega listini, condizioni, schede prodotto a un account — l'agente li legge per rispondere alle mail. Il tuo agente non deve sapere tutto: le informazioni che gli servono viaggiano con l'account
- Permessi per agenti: lettura libera; invio/cancellazione richiedono un'approvazione data fuori banda — all'agente arriva solo un id inerte, un umano approva dalla console o dalla CLI, e solo allora si esegue, con gli argomenti esatti che l'umano ha visto. Ogni scrittura finisce in un registro append-only
- Credenziali fuori dal canale agente: login e gestione account solo via CLI — una prompt injection dentro una mail non può aggiungere account né leggere segreti
Setup rapido
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.- App desktop Windows — la console umana con Python embedded:
un solo installer, nessun prerequisito. Scarica
GigaMail-Setup-<versione>.exedall'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, poinpm run dist.
Tutto quello che segue riguarda il canale pip.
pip install "gigamail[all]"
gigamail login # device flow Microsoft
gigamail accounts add-imap # oppure IMAP: Aruba, Gmail, Libero, ...
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):
gigamail identity set # chi sono, cosa faccio, tono
gigamail identity add-file C:\docs\listino.xlsx
gigamail identity add-file C:\docs\catalogo\ # intera cartella
Registrazione in Claude Desktop / Claude Code (mcpServers):
{
"gigamail": {
"command": "gigamail-server"
}
}
I comandi restano disponibili anche con i vecchi nomi
(ade-mail-agent, ade-mail-agent-server), così le installazioni esistenti
continuano a funzionare.
Usi Codex? Il repository è un plugin Codex: registra il server MCP
gigamail e aggiunge una skill che insegna a Codex il gate di approvazione.
codex plugin marketplace add adecubed/gigamail
codex plugin add gigamail@gigamail
Usi OpenClaw o Hermes? 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.
Tool
28 tool tipizzati, generati dal server stesso:
- Lettura (17) — account, identità, file di conoscenza, messaggi, non lette, cartelle, ricerca ibrida, testo degli allegati, storico mittenti, pattern appresi, eventi di calendario, slot liberi, file di Drive e il loro testo
- Scritture sicure (3, con audit) — segna letto, sposta, crea cartella
- Pericolose (8, approvazione umana fuori banda) — invio, risposta, cancellazione messaggio, cancellazione cartella, creazione/cancellazione evento, caricamento di un file su Drive, cestinamento di un file di Drive
Il calendario è servito da Microsoft Graph o da Google Calendar, secondo
quello che l'utente ha collegato: i tool sono gli stessi. Drive usa lo
scope drive.file, quindi vede solo i file creati da GigaMail.
Per collegare Google: GOOGLE_SETUP.md.
Mappa completa e decisioni di design: MAPPA_MCP.md.
Modello di sicurezza
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.
Regole di risposta (0.2): semi-auto e auto reply, con recinto
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.
- semi (default): la bozza diventa una normale richiesta di approvazione — arriva la notifica, approvi con Hello, parte.
- Le notifiche ti raggiungono dove sei: toast Windows con bottoni
✅ / ❌ (una volta
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--approvedietro Hello, ❌ rifiuta, ✏️ chiedi modifiche — accettati solo dalla tua chat). - auto: la richiesta nasce già approvata,
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.
Licenza
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.
GigaMail — 给你的 AI 代理的邮箱
English · Italiano · 中文
一个 MCP 服务器,让你的代理 —— Claude、Codex、OpenClaw、Hermes 或任何 兼容 MCP 的客户端 —— 安全、受控地访问你的真实邮箱 —— 多账户(Microsoft Graph + IMAP)、日历、本地搜索索引、发件人 记忆,以及面向代理的权限模型。
不内置任何 LLM:智能来自你自己的代理。MCP 服务器只使用 stdio 传输,不开 网络端口。(可选的人工控制台会在 127.0.0.1 上提供一个本地 HTTP API。)
关于你的数据:GigaMail 把邮件索引、凭据、记忆和配置全部保存在你自己 的机器上 —— 我们不运行任何服务,也收不到任何数据。代理读取的邮件内容当 然会经过该代理及其模型提供商,适用他们各自的数据政策。请据此选择你的代理。
演示邮箱上的两分一刻钟,共四个场景:同一个问题在两个文件夹里得到不同的回复、 价格取自用户自己的文件、文档里没有的信息留下标记,以及一封夹带助手指令的邮件 从未送到模型面前。人工审阅后发送 —— 或者修改指令后重新生成。
为什么
- 混合搜索:提供商搜索(Graph/IMAP)+ 本地 SQLite 索引,快速且支持离线
- 发件人记忆:按发件人记录语气、话题与往来历史,让回复更贴切
- 观察者:从用户对过往草稿的修改中学习偏好
- 知识文件:把价目表、条款、产品资料挂到账户上,代理读取它们来回信 —— 你的代理不需要什么都懂:账户自带知识
- 面向代理的权限:读取自由;发送/删除需要带外给出的人工批准 —— 代理只拿到一个惰性的请求 id,人从控制台或 CLI 批准后才会执行,且执行的 是人当时看到的那份参数。每次写操作都会记入只追加的审计日志
- 凭据永远不经过代理通道:登录与账户管理只存在于 CLI —— 邮件里的提示 注入无法添加账户或读取任何机密
快速开始
GigaMail 通过两个渠道发布:
pip install gigamail— 代理核心:MCP 服务器、CLI、watcher 和 控制台的本地 HTTP 后端。不含图形界面 — 如果你的代理就是界面,选这个渠道。- Windows 桌面应用 — 面向人的控制台,内置 Python,一个安装包、
无需任何前置依赖。从最新版本下载
GigaMail-Setup-<版本>.exe,之后应用会自动从那里更新。安装包尚未代码签名, 首次运行时 Windows SmartScreen 会提示警告 — 请核对 GitHub 在文件旁显示的 SHA-256 摘要。自行构建:Node 22+,console/prepare-python.ps1,然后npm run dist。
下文内容均针对 pip 渠道。
pip install "gigamail[all]"
gigamail login # Microsoft 设备码登录
gigamail accounts add-imap # 或任意 IMAP 提供商
为账户设置身份与知识(这是让回复"像你"的关键):
gigamail identity set # 我是谁、做什么、语气
gigamail identity add-file C:\docs\pricelist.xlsx
在 Claude Desktop / Claude Code 中注册(mcpServers):
Shortened here. Read the whole README on GitHub.
Signals
- GitHub stars
- 5
- Last commit
- Sep 2026
Advanced
- Delivery
- gigamail MCP server → your ahel gateway (mcp.ahel.ai) → every connected AI client.
- Catalog kind
- mcp-server
- Gateway key
io-github-adecubed-gigamail- Source
- github.com/adecubed/gigamail