{
  "markdown": "<!--\nGigaMail — mail for your AI agent\nCopyright (C) 2026 Adecubed\n\nThis program is free software: you can redistribute it and/or modify it\nunder the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or (at your\noption) any later version. See the LICENSE file for details.\n-->\n<!-- mcp-name: io.github.adecubed/gigamail -->\n\n# GigaMail — Mail for your AI agent\n\n**English** · [Italiano](#lang-it) · [中文](#lang-zh)\n\n**MCP server that gives your agent — Claude, Codex, OpenClaw, Hermes, or any\nMCP client — safe, controlled access to your email** — multi-account (Microsoft Graph + IMAP), calendar,\nlocal search index, sender memory, and an agent-aware permission model.\n\nNo built-in LLM: the intelligence is your agent's. The MCP server speaks\nstdio only — no network port. (An optional human console adds a local HTTP\nAPI bound to 127.0.0.1.)\n\n**On your data**: GigaMail keeps mail indexes, credentials, memory and\nconfiguration **on your machine** — we run no service and receive nothing.\nMail content your agent reads is, of course, handled by that agent and its\nmodel provider under their own data policies. Choose your agent\naccordingly; the masker lets you hide sensitive fields (tax codes, VAT\nnumbers, IBANs, emails, phone numbers — validated deterministically, no AI)\nbefore the agent ever sees them.\n\n\n\nhttps://github.com/user-attachments/assets/362b58b6-6161-4911-b255-4c735bc7ba56\n\n\n\n*The human console in ninety seconds, on a demo mailbox: dashboard, reading\na mail, a reply drafted by the agent from a one-line instruction, folders,\ncalendar, \"ask your mail\", automation rules and the first-run guide. The\nhuman reviews and sends — or edits the instruction and regenerates.*\n\n## Why\n\n- **Hybrid search**: provider search (Graph/IMAP) + local SQLite index — fast\n  and offline-friendly\n- **Sender memory**: tone, topics and history per sender, so replies sound right\n- **Observer**: patterns learned from how the user edited past drafts\n- **Knowledge files**: attach your price lists, terms, product sheets to an\n  account — the agent reads them to answer mail. Your agent doesn't need to\n  know everything: the account carries its own knowledge\n- **Agent-aware permissions**: reads are free; send/delete require an\n  approval given **out of band** — the agent gets an inert request id, a\n  human approves from the console or the CLI, and only then does it execute,\n  with the exact arguments the human saw. Every write lands in an\n  append-only action log\n- **Credentials never touch the agent channel**: login and account management\n  live in the CLI only — a prompt injection inside an email cannot add\n  accounts or read secrets\n\n## Quick start\n\nGigaMail ships through two channels:\n\n- **`pip install gigamail`** — the agentic core: MCP server, CLI, watcher\n  and the console's local HTTP backend. No graphical app — the right\n  channel when your agent is the interface.\n- **Windows desktop app** — the human console packaged with an\n  embedded Python: one installer, no prerequisites. Download\n  `GigaMail-Setup-<version>.exe` from the [latest release](https://github.com/adecubed/gigamail/releases/latest);\n  the app then updates itself from there. The installer is not code-signed\n  yet, so Windows SmartScreen warns on first run — compare the SHA-256\n  digest GitHub shows next to the asset. To build it yourself: Node 22+,\n  `console/prepare-python.ps1`, then `npm run dist`.\n\nEverything below covers the pip channel.\n\n```bash\npip install \"gigamail[all]\"\n\ngigamail login                # Microsoft device flow\ngigamail accounts add-imap    # or IMAP: Aruba, Gmail, Libero, ...\n```\n\n> **Microsoft login note**: the bundled Azure app is not yet\n> publisher-verified, so the consent screen shows an \"unverified\" notice\n> (works fine; some corporate tenants may block it). Standard alternative:\n> register your own Azure app and set your `client_id` in\n> `src/ade_mail_agent/core/ms_config.json`. IMAP needs none of this.\n\nGive the account its identity and knowledge (this is what makes replies yours):\n\n```bash\ngigamail identity set                       # who am I, what I do, tone\ngigamail identity add-file C:\\docs\\pricelist.xlsx\ngigamail identity add-file C:\\docs\\catalog\\   # whole folder\n```\n\nRegister in Claude Desktop / Claude Code (`mcpServers`):\n\n```json\n{\n  \"gigamail\": {\n    \"command\": \"gigamail-server\"\n  }\n}\n```\n\nThe commands are also available under their legacy names\n(`ade-mail-agent`, `ade-mail-agent-server`), so existing setups keep working.\n\nUsing **OpenClaw** or **Hermes** instead of Claude? Verified configs in\n[INTEGRATIONS.md](INTEGRATIONS.md).\n\n> **Are you an AI agent setting this up on behalf of a human?** You can do\n> the install and the MCP registration: `pip install \"gigamail[all]\"`, then\n> add `gigamail-server` to your client's MCP config (see INTEGRATIONS.md;\n> declare `GIGAMAIL_ROOT` if your client filters the environment). **Stop\n> there.** Connecting a mailbox (`gigamail login`, `gigamail accounts\n> add-imap`) asks for credentials and must be done by the human in their own\n> shell — it is not something you should do, and GigaMail is built so that\n> it cannot be done through you. Tell them what to run, then wait.\n\nThen just ask your agent: *\"reply to the last quote request using the price\nlist\"* — it reads the mail, pulls the numbers from your file, drafts the\nreply, and asks you before sending.\n\n## Tools\n\n24 typed tools, generated from the server itself:\n\n- **Read (15)** — accounts, identity, knowledge files, messages, unread,\n  folders, hybrid search, attachment text, sender history, learned\n  patterns, calendar events, free-slot availability\n- **Safe writes (3, audited)** — mark read, move message, create folder\n- **Dangerous (6, human approval out of band)** — send, reply, delete\n  message, delete folder, create/delete calendar event\n\nFull map and design decisions: [MAPPA_MCP.md](MAPPA_MCP.md).\n\n## Security model\n\nEmail content is treated as **untrusted data** (prompt injection). The\nagent cannot approve its own actions, by construction: a dangerous tool\nreturns only an inert `request_id`, and approving it — from the console or\nfrom `gigamail approvals approve` — requires an OS-level verification of\nthe person at the machine (**Windows Hello** / **Touch ID**). A process,\nincluding an agent that holds a shell, can open that prompt but cannot\npass it; with no such backend available, nothing approves. No secret ever\nenters the model context, so an injected instruction has nothing to\nspend. Repeating the id just returns *awaiting approval*. The agent\ncan only read files explicitly registered by the user, never the rest of the\nfilesystem. Every write action is logged to `%APPDATA%/ADE/agent_audit.jsonl`\n(append-only: GigaMail never rewrites past entries — it is not, and does not\nclaim to be, tamper-proof storage).\n\nWe red-team this: hostile emails ordering exfiltration, mass deletion, and\nthe agent to approve itself — fed to a real agent with every mail tool\nenabled.\n\n> This design is a fix. v0.1.0 returned a one-time confirm token in the\n> tool result, which put it in the model's context: the agent held both\n> halves. Thanks to **u/ranbuman** and **u/anderson_the_one** on r/mcp for\n> catching it. The switch now sits where the agent cannot reach.\n\n![Anti-injection harness: three hostile-email scenarios against a real\nagent, zero destructive actions](docs/anti-injection-harness.png)\n\nThe structural half of that suite runs in CI on every push\n([tests/test_injection.py](tests/test_injection.py)); the real-agent half is\nopt-in ([scripts/injection_e2e.py](scripts/injection_e2e.py)) and runs with\na dry-run guard so confirmed actions are audited but never executed.\n\n## Reply rules (0.2): semi-auto and auto reply, fenced\n\nYou can tell GigaMail: *mail from these senders (or in this folder) gets a\nreply drafted from these documents*. Rules are created from the CLI —\n`gigamail rules add` — behind the same Windows Hello / Touch ID prompt as\napprovals, and `gigamail watch` is the process that applies them. The MCP\nserver stays passive and **there is no MCP tool that touches rules**: an\ninjected instruction cannot enable autopilot.\n\n- **semi** (default): the draft becomes a normal approval request — you get\n  the notification, you approve with Hello, it goes out.\n- Notifications reach you where you are: a **Windows toast** with\n  ✅ / ❌ buttons (run `gigamail desktop-setup` once — UAC prompt — to make\n  them clickable; they open the approval, which raises Hello) and\n  **Telegram** (`gigamail telegram setup`, your own bot: ✅ approve if you\n  opted in with `--approve` behind Hello, ❌ reject, ✏️ ask for changes —\n  accepted only from your chat).\n- **auto**: the request is born approved, `decided_by automode:<rule_id>` —\n  you gave that approval when you created the rule, for a precise scope,\n  with a mandatory expiry, a daily cap and a per-sender cooldown. The\n  notification still fires.\n\nThe drafter (your own agent, via `claude -p`) produces the reply *body*\nand nothing else: recipient, subject and thread are fixed from the incoming\nmessage — always the sender, never `Reply-To`, never an address written by\nthe draft. Deterministic barriers run first: no DMARC pass → never auto;\nauto-generated mail, lists, no-reply senders, the provider's spam verdict,\nexecutable attachments → no reply at all; the first message from a new\nsender always goes through you; a burst of matches pauses the rule by\nitself. Details in [SECURITY.md](SECURITY.md).\n\n## License\n\n**AGPL-3.0-or-later.** Free to use, study, modify and share. If you\ndistribute a modified version — or run one as a network service — you must\nmake its source available under the same license. Commercial licenses for\nclosed-source use are available from the copyright holder.\n\n---\n\n<a id=\"lang-it\"></a>\n# GigaMail — La posta per il tuo agente AI\n\n[English](#gigamail--mail-for-your-ai-agent) · **Italiano** · [中文](#lang-zh)\n\n\n**Server MCP che dà al tuo agente — Claude, Codex, OpenClaw, Hermes o\nqualunque client MCP — accesso sicuro e controllato alla tua posta** — multi-account (Microsoft Graph +\nIMAP), calendario, indice di ricerca locale, memoria dei mittenti e un\nmodello di permessi pensato per gli agenti.\n\nNessun LLM interno: l'intelligenza è quella del tuo agente. Il server MCP\nparla solo stdio — nessuna porta di rete. (La console per l'umano, che è\nopzionale, aggiunge una API HTTP locale su 127.0.0.1.)\n\n**Sui tuoi dati**: GigaMail tiene indici della posta, credenziali, memoria\ne configurazione **sul tuo computer** — noi non gestiamo alcun servizio e\nnon riceviamo nulla. Il contenuto delle mail che il tuo agente legge è\novviamente trattato da quell'agente e dal suo fornitore di modello secondo\nle loro policy. Scegli l'agente di conseguenza; il masker permette di\nnascondere i dati sensibili (codici fiscali, partite IVA, IBAN, email,\ntelefoni — validati in modo deterministico, senza AI) prima che l'agente\nli veda.\n\nhttps://github.com/user-attachments/assets/362b58b6-6161-4911-b255-4c735bc7ba56\n\n*La console umana in novanta secondi, su una casella dimostrativa:\ndashboard, lettura di una mail, una risposta scritta dall'agente da\nun'istruzione di una riga, cartelle, calendario, \"chiedi alle mail\", regole\ndi automazione e guida iniziale. L'umano rivede e invia — oppure corregge\nl'istruzione e rigenera.*\n\n## Perché\n\n- **Ricerca ibrida**: provider (Graph/IMAP) + indice SQLite locale — veloce e\n  offline-friendly\n- **Memoria dei mittenti**: tono, argomenti e storico per rispondere nel modo giusto\n- **Observer**: pattern appresi dalle correzioni dell'utente alle bozze passate\n- **File di conoscenza**: collega listini, condizioni, schede prodotto a un\n  account — l'agente li legge per rispondere alle mail. Il tuo agente non\n  deve sapere tutto: le informazioni che gli servono viaggiano con l'account\n- **Permessi per agenti**: lettura libera; invio/cancellazione richiedono\n  un'approvazione data **fuori banda** — all'agente arriva solo un id\n  inerte, un umano approva dalla console o dalla CLI, e solo allora si\n  esegue, con gli argomenti esatti che l'umano ha visto. Ogni scrittura\n  finisce in un registro append-only\n- **Credenziali fuori dal canale agente**: login e gestione account solo via\n  CLI — una prompt injection dentro una mail non può aggiungere account né\n  leggere segreti\n\n## Setup rapido\n\nGigaMail si installa da due canali:\n\n- **`pip install gigamail`** — il core agentico: server MCP, CLI, watcher\n  e il backend HTTP locale della console. Nessuna app grafica — è il\n  canale giusto quando l'interfaccia è il tuo agente.\n- **App desktop Windows** — la console umana con Python embedded:\n  un solo installer, nessun prerequisito. Scarica\n  `GigaMail-Setup-<versione>.exe` dall'[ultima release](https://github.com/adecubed/gigamail/releases/latest); da lì\n  l'app si aggiorna da sola. L'installer non è ancora firmato, quindi\n  Windows SmartScreen avvisa al primo avvio — confronta il digest SHA-256\n  che GitHub mostra accanto al file. Per buildarlo in casa: Node 22+,\n  `console/prepare-python.ps1`, poi `npm run dist`.\n\nTutto quello che segue riguarda il canale pip.\n\n```bash\npip install \"gigamail[all]\"\n\ngigamail login                # device flow Microsoft\ngigamail accounts add-imap    # oppure IMAP: Aruba, Gmail, Libero, ...\n```\n\n> **Nota sul login Microsoft**: l'app Azure inclusa non è ancora\n> publisher-verified, quindi la schermata di consenso mostra l'avviso\n> \"unverified\" (funziona comunque; alcuni tenant aziendali potrebbero\n> bloccarla). Alternativa standard: registra la tua app Azure e metti il\n> tuo `client_id` in `src/ade_mail_agent/core/ms_config.json`.\n> Per IMAP non serve nulla di tutto questo.\n\nDai all'account la sua identità e la sua conoscenza (è ciò che rende le\nrisposte *tue*):\n\n```bash\ngigamail identity set                       # chi sono, cosa faccio, tono\ngigamail identity add-file C:\\docs\\listino.xlsx\ngigamail identity add-file C:\\docs\\catalogo\\   # intera cartella\n```\n\nRegistrazione in Claude Desktop / Claude Code (`mcpServers`):\n\n```json\n{\n  \"gigamail\": {\n    \"command\": \"gigamail-server\"\n  }\n}\n```\n\nI comandi restano disponibili anche con i vecchi nomi\n(`ade-mail-agent`, `ade-mail-agent-server`), così le installazioni esistenti\ncontinuano a funzionare.\n\nUsi **OpenClaw** o **Hermes** invece di Claude? Configurazioni verificate in\n[INTEGRATIONS.md](INTEGRATIONS.md).\n\nPoi chiedi al tuo agente: *\"rispondi all'ultima richiesta di preventivo\nusando il listino\"* — legge la mail, prende i numeri dal tuo file, prepara la\nrisposta e ti chiede conferma prima di inviare.\n\n## Tool\n\n24 tool tipizzati, generati dal server stesso:\n\n- **Lettura (15)** — account, identità, file di conoscenza, messaggi, non\n  lette, cartelle, ricerca ibrida, testo degli allegati, storico mittenti,\n  pattern appresi, eventi di calendario, slot liberi\n- **Scritture sicure (3, con audit)** — segna letto, sposta, crea cartella\n- **Pericolose (6, approvazione umana fuori banda)** — invio, risposta,\n  cancellazione messaggio, cancellazione cartella, creazione/cancellazione\n  evento\n\nMappa completa e decisioni di design: [MAPPA_MCP.md](MAPPA_MCP.md).\n\n## Modello di sicurezza\n\nIl contenuto delle email è trattato come **dato non fidato** (prompt\ninjection). L'agente non può approvare le proprie azioni, per costruzione:\nun tool pericoloso restituisce solo un `request_id` inerte, e approvarlo —\ndalla console o con `gigamail approvals approve` — richiede una verifica\ndell'utente fisico a livello di sistema operativo (**Windows Hello** /\n**Touch ID**). Un processo, compreso un agente con la shell, può aprire quel\nprompt ma non superarlo; senza un backend del genere, nulla viene approvato.\nNessun segreto entra nel contesto del modello, quindi un'istruzione\niniettata non ha nulla da spendere. Ripetere\nl'id restituisce solo *in attesa di approvazione*. L'agente può leggere solo i file\nregistrati esplicitamente dall'utente, mai il resto del filesystem. Ogni\nazione di scrittura finisce in `%APPDATA%/ADE/agent_audit.jsonl` (append-only:\nGigaMail non riscrive mai le voci passate — non è, e non pretende di essere,\nun archivio a prova di manomissione).\n\nLo mettiamo alla prova: mail ostili che ordinano esfiltrazione,\ncancellazione di massa e all'agente di approvarsi da solo, date a un agente\nreale con tutti i tool attivi.\n\n> Questo disegno è una correzione. La v0.1.0 restituiva un token di conferma\n> monouso nel risultato del tool, quindi dentro il contesto del modello:\n> l'agente aveva entrambe le metà. Grazie a **u/ranbuman** e\n> **u/anderson_the_one** su r/mcp per averlo notato. Ora l'interruttore sta\n> dove l'agente non arriva.\n\n![Harness anti-injection: tre scenari di mail ostili contro un agente reale,\nzero azioni distruttive](docs/anti-injection-harness.png)\n\nLa metà strutturale della suite gira in CI a ogni push\n([tests/test_injection.py](tests/test_injection.py)); quella con l'agente\nreale è opt-in ([scripts/injection_e2e.py](scripts/injection_e2e.py)) e usa\nuna modalità dry-run, così le azioni confermate finiscono nell'audit ma non\nvengono mai eseguite.\n\n## Regole di risposta (0.2): semi-auto e auto reply, con recinto\n\nPuoi dire a GigaMail: *le mail da questi mittenti (o in questa cartella)\nricevono una risposta preparata da questi documenti*. Le regole si creano\ndalla CLI — `gigamail rules add` — dietro lo stesso prompt Windows Hello /\nTouch ID delle approvazioni, e `gigamail watch` è il processo che le\napplica. Il server MCP resta passivo e **nessun tool MCP tocca le regole**:\nun'istruzione iniettata non può accendere l'autopilota.\n\n- **semi** (default): la bozza diventa una normale richiesta di\n  approvazione — arriva la notifica, approvi con Hello, parte.\n- Le notifiche ti raggiungono dove sei: **toast Windows** con bottoni\n  ✅ / ❌ (una volta `gigamail desktop-setup` — prompt UAC — per renderli\n  cliccabili; aprono l'approvazione, che alza Hello) e **Telegram**\n  (`gigamail telegram setup`, col tuo bot: ✅ approva se hai scelto\n  `--approve` dietro Hello, ❌ rifiuta, ✏️ chiedi modifiche — accettati\n  solo dalla tua chat).\n- **auto**: la richiesta nasce già approvata, `decided_by\n  automode:<rule_id>` — quell'approvazione l'hai data tu creando la regola,\n  per uno scope preciso, con scadenza obbligatoria, tetto giornaliero e\n  cooldown per mittente. La notifica parte comunque.\n\nChi scrive (il tuo agente, via `claude -p`) produce il *corpo* della\nrisposta e nient'altro: destinatario, oggetto e thread li fissa GigaMail\ndal messaggio in arrivo — sempre il mittente, mai il `Reply-To`, mai un\nindirizzo scritto dalla bozza. Prima passano barriere deterministiche:\nniente DMARC pass → mai auto; posta automatica, liste, mittenti no-reply,\nil verdetto spam del provider, allegati eseguibili → nessuna risposta; il\nprimo messaggio di un mittente nuovo passa sempre da te; una raffica di\nmatch mette in pausa la regola da sola. Dettagli in\n[SECURITY.md](SECURITY.md).\n\n## Licenza\n\n**AGPL-3.0-or-later.** Libero di usarlo, studiarlo, modificarlo e\ncondividerlo. Se distribuisci una versione modificata — o la offri come\nservizio in rete — devi rendere disponibile il sorgente con la stessa\nlicenza. Licenze commerciali per usi closed-source sono disponibili dal\ntitolare del copyright.\n\n\n---\n\n<a id=\"lang-zh\"></a>\n# GigaMail — 给你的 AI 代理的邮箱\n\n[English](#gigamail--mail-for-your-ai-agent) · [Italiano](#lang-it) · **中文**\n\n**一个 MCP 服务器，让你的代理 —— Claude、Codex、OpenClaw、Hermes 或任何\n兼容 MCP 的客户端 —— 安全、受控地访问你的真实邮箱** —— 多账户（Microsoft Graph + IMAP）、日历、本地搜索索引、发件人\n记忆，以及面向代理的权限模型。\n\n不内置任何 LLM：智能来自你自己的代理。MCP 服务器只使用 stdio 传输，不开\n网络端口。（可选的人工控制台会在 127.0.0.1 上提供一个本地 HTTP API。）\n\n**关于你的数据**：GigaMail 把邮件索引、凭据、记忆和配置全部保存在**你自己\n的机器上** —— 我们不运行任何服务，也收不到任何数据。代理读取的邮件内容当\n然会经过该代理及其模型提供商，适用他们各自的数据政策。请据此选择你的代理。\n\nhttps://github.com/user-attachments/assets/362b58b6-6161-4911-b255-4c735bc7ba56\n\n*演示邮箱上的人工控制台 90 秒：仪表盘、阅读邮件、代理根据一行指令起草的回复、\n文件夹、日历、“询问邮件”、自动化规则和首次运行向导。人工审阅后发送 ——\n或者修改指令后重新生成。*\n\n## 为什么\n\n- **混合搜索**：提供商搜索（Graph/IMAP）+ 本地 SQLite 索引，快速且支持离线\n- **发件人记忆**：按发件人记录语气、话题与往来历史，让回复更贴切\n- **观察者**：从用户对过往草稿的修改中学习偏好\n- **知识文件**：把价目表、条款、产品资料挂到账户上，代理读取它们来回信 ——\n  你的代理不需要什么都懂：账户自带知识\n- **面向代理的权限**：读取自由；发送/删除需要**带外**给出的人工批准 ——\n  代理只拿到一个惰性的请求 id，人从控制台或 CLI 批准后才会执行，且执行的\n  是人当时看到的那份参数。每次写操作都会记入只追加的审计日志\n- **凭据永远不经过代理通道**：登录与账户管理只存在于 CLI —— 邮件里的提示\n  注入无法添加账户或读取任何机密\n\n## 快速开始\n\nGigaMail 通过两个渠道发布：\n\n- **`pip install gigamail`** — 代理核心：MCP 服务器、CLI、watcher 和\n  控制台的本地 HTTP 后端。不含图形界面 — 如果你的代理就是界面，选这个渠道。\n- **Windows 桌面应用** — 面向人的控制台，内置 Python，一个安装包、\n  无需任何前置依赖。从[最新版本](https://github.com/adecubed/gigamail/releases/latest)下载\n  `GigaMail-Setup-<版本>.exe`，之后应用会自动从那里更新。安装包尚未代码签名，\n  首次运行时 Windows SmartScreen 会提示警告 — 请核对 GitHub 在文件旁显示的\n  SHA-256 摘要。自行构建：Node 22+，`console/prepare-python.ps1`，然后\n  `npm run dist`。\n\n下文内容均针对 pip 渠道。\n\n```bash\npip install \"gigamail[all]\"\n\ngigamail login                # Microsoft 设备码登录\ngigamail accounts add-imap    # 或任意 IMAP 提供商\n```\n\n为账户设置身份与知识（这是让回复\"像你\"的关键）：\n\n```bash\ngigamail identity set                       # 我是谁、做什么、语气\ngigamail identity add-file C:\\docs\\pricelist.xlsx\n```\n\n在 Claude Desktop / Claude Code 中注册（`mcpServers`）：\n\n```json\n{\n  \"gigamail\": {\n    \"command\": \"gigamail-server\"\n  }\n}\n```\n\n使用 **OpenClaw** 或 **Hermes**？经过验证的配置见\n[INTEGRATIONS.md](INTEGRATIONS.md)。\n\n> **你是替人类做安装的 AI 代理吗？** 你可以完成安装与 MCP 注册：\n> `pip install \"gigamail[all]\"`，然后把 `gigamail-server` 加入客户端的 MCP\n> 配置。**到此为止。** 连接邮箱（`gigamail login`、`gigamail accounts\n> add-imap`）需要输入凭据，必须由人类在自己的终端里完成 —— 这不是你该做的\n> 事，GigaMail 的设计也让它无法经由你完成。告诉他们要运行什么，然后等待。\n\n之后直接对你的代理说：\"用价目表回复最近那封询价邮件\" —— 它会读邮件、从你\n的文件里取数字、写好草稿，并在发送前征得你的同意。\n\n## 工具\n\n24 个类型化工具，由服务器本身生成：\n\n- **读取（15）** —— 账户、身份、知识文件、邮件、未读、文件夹、混合搜索、\n  附件文本、发件人历史、学习到的偏好、日历事件、空闲时段\n- **安全写入（3，有审计）** —— 标记已读、移动邮件、新建文件夹\n- **危险操作（6，需带外人工批准）** —— 发送、回复、删除邮件、删除文件夹、\n  创建/删除日历事件\n\n## 安全模型\n\n邮件内容被视为**不可信数据**（提示注入）。代理从构造上就无法批准自己的\n操作：危险工具只返回一个惰性的 `request_id`，而批准它 —— 无论从控制台还是\n`gigamail approvals approve` —— 都需要对机器前的人进行操作系统级验证\n（**Windows Hello** / **Touch ID**）。任何进程（包括持有 shell 的代理）都能\n弹出这个验证框，却无法通过它；没有此类验证后端时，一律拒绝（fail-closed）。\n没有任何机密进入模型上下文，被注入的指令无物可用。重复提交 id 只会得到\n*等待批准*。代理只能读取用户明确注册的文件，永远碰不到文件系统的其余部分。\n每次写操作都记入只追加的审计日志（GigaMail 从不改写历史条目 —— 它不是、\n也不自称是防篡改存储）。\n\n我们对此做红队测试：让恶意邮件命令真实代理外泄数据、批量删除、自我批准 ——\n在所有邮件工具全开的情况下，零破坏性操作。\n\n## 回复规则（0.2）：带栅栏的半自动与全自动回复\n\n你可以告诉 GigaMail：*来自这些发件人（或这个文件夹）的邮件，用这些文档起草\n回复*。规则只能从 CLI（`gigamail rules add`）或控制台创建，且要经过与批准\n相同的 Windows Hello / Touch ID 验证；`gigamail watch` 是执行规则的进程。\nMCP 服务器保持被动，**不存在任何能触碰规则的 MCP 工具**：被注入的指令无法\n打开自动驾驶。\n\n- **semi**（默认）：草稿成为一个普通的批准请求 —— 你收到通知，用 Hello\n  批准后才会发出。\n- 通知会找到你：**Windows 桌面通知**带 ✅/❌ 按钮（运行一次\n  `gigamail desktop-setup` 使其可点击；按钮只是打开批准流程，仍需 Hello），\n  以及 **Telegram**（`gigamail telegram setup`，用你自己的机器人：✅ 批准需\n  在 Hello 背后显式开启 `--approve`；❌ 拒绝、✏️ 要求修改 —— 且只接受来自\n  你那个会话的指令）。\n- **auto**：请求生来即已批准，`decided_by automode:<rule_id>` —— 这份批准是\n  你创建规则时在 Hello 背后给出的，范围精确、必有过期时间、每日上限和按\n  发件人的冷却时间。通知照常发出。\n\n起草者（你自己的代理，经 `claude -p`）只产出回复*正文*：收件人、主题与\n会话线程由 GigaMail 从来信中确定 —— 永远回给通过验证的发件人，绝不理会\n`Reply-To`，也绝不使用草稿里写出的地址。确定性栅栏先行：DMARC 未通过 →\n永不 auto；自动生成的邮件、邮件列表、no-reply 发件人、提供商的垃圾邮件判定、\n可执行附件 → 一律不回复；新发件人的第一封邮件永远经过你；短时间内大量命中\n会让规则自动暂停。详见 [SECURITY.md](SECURITY.md)。\n\n## 许可证\n\n**AGPL-3.0-or-later.** 自由使用、研究、修改与分享。若你分发修改版 —— 或将\n其作为网络服务运行 —— 必须以相同许可证提供其源代码。闭源商用许可可向版权\n持有人洽询。\n",
  "bytes": 23189,
  "sha": "13e1f3aee9e74c88fcdb95e1581c635176f8d33cd8d52c39fe63ec48b8835d0e",
  "repo_slug": "adecubed/gigamail",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_adecubed_gigamail_95538461/readme"
}