Show HN: Secure agentic email infrastructure with beta desktop client GigaMail, a new open-source MCP server, provides secure agentic email infrastructure with a beta desktop client, enabling AI agents like Claude, Codex, and OpenClaw to safely access email via a permission model that requires human approval for sends and deletes. The tool keeps all data on the user's machine, supports multi-account via Microsoft Graph and IMAP, and includes features like hybrid search, sender memory, and knowledge files. It is available via pip install "gigamail[all]" and integrates with MCP clients. 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 coming lets you hide sensitive fields before the agent ever sees them. A real draft: the agent pulled the figures from the account's documents, picked the floor plans to attach, and proposed slots from the calendar. The human reviews and sends — or edits the instruction and regenerates. 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 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 id in src/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 OpenClaw or Hermes instead of Claude? Verified configs in INTEGRATIONS.md /adecubed/gigamail/blob/main/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 add gigamail-server to your client's MCP config see INTEGRATIONS.md; declare GIGAMAIL ROOT if 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: Read 15 — accounts, identity, knowledge files, messages, unread, folders, hybrid search, attachment text, sender history, learned patterns, calendar events, free-slot availability Safe writes 3, audited — mark read, move message, create folder Dangerous 6, human approval out of band — send, reply, delete message, delete folder, create/delete calendar event Full map and design decisions: MAPPA MCP.md /adecubed/gigamail/blob/main/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/ranbumanandu/anderson the oneon 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 /adecubed/gigamail/blob/main/tests/test injection.py ; the real-agent half is opt-in scripts/injection e2e.py /adecubed/gigamail/blob/main/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. 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-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 . auto : the request is born approved, decided by automode: