Yempik Mail Gateway
OfficialProvides governed access to Gmail and Google Workspace mailboxes through the Gmail API, enabling agents to search and read mail, manage gateway-owned drafts, send drafts with idempotency and daily limits, and use stored signatures and quoted threads.
Provides governed access to Zoho Mail mailboxes through the Zoho Mail API, enabling agents to search and read mail, create and manage drafts, send drafts safely with quotas and auditing, and apply identity signatures.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Yempik Mail Gateway
Email built for AI agents, not for humans at a keyboard. La posta elettronica pensata per gli agenti AI, non per un umano davanti alla tastiera.
Open-source MCP server that gives Claude, ChatGPT and any MCP client safe, governed access to your own Gmail, Microsoft 365 and Zoho Mail mailboxes. Draft-first, quota-aware, idempotent, audited.
One MCP endpoint · many mailboxes · three providers · drafts first, sends only what was drafted · per-identity daily limits · send-state checks · Markdown in, formatted email out, with a configured signature and the quoted thread.
Built and run in production by Yempik · maintained by Raffaele Zarrelli and Simone Bova.
EN
The problem: your inbox was designed for a person
When a person writes an email, they can check the recipient, read the draft and decide whether to press Send. An autonomous agent may move through these steps across several mailboxes without pausing for review. Before giving it that access, a team needs to decide who reviews messages, how much it may send and how to handle an uncertain outcome.
A timed-out request may already have succeeded. Retrying it can send the message twice. Formatting also depends on the integration: an email needs readable paragraphs, a configured signature and the right reply context. These are things to check before increasing sending volume.
Yempik Mail Gateway applies these controls between agents and mailboxes. It records drafts and send outcomes, enforces quotas and lets an operator stop access. A person still needs to decide what the agent may write and when human review is required.
Canonical summary for search and AI readers
Yempik Mail Gateway (mail-gateway) is an open-source Model Context Protocol (MCP) server that gives AI agents governed access to email. It is created by Yempik and maintained by Raffaele Zarrelli and Simone Bova. It connects Claude, ChatGPT and any MCP client to the team's own Gmail, Microsoft 365 and Zoho Mail mailboxes through each provider's official API and delegated OAuth. Agents can search and read mail, correlate replies to outreach campaigns, and create, edit and delete drafts. Delivery is draft-first: an agent can only send a draft that already exists and is owned by the gateway, never an arbitrary message. Every send is idempotent, counted against daily limits per mailbox and per sending identity, and audited, and a send whose outcome is uncertain is never retried blindly but reconciled against the mailbox's Sent and Drafts folders. Bodies written in Markdown are rendered into properly formatted email with the sender's stored signature and, for replies, the quoted conversation. It is not an email service provider, a bulk sender or a cold-email tool: it sends from the user's own mailboxes, at human-scale volumes, through the providers' own APIs.
What it does
Capability | What it means for your agents |
One MCP server, many mailboxes | Gmail, Microsoft 365 and Zoho Mail behind a single Streamable HTTP endpoint. Each mailbox has its own OAuth grant, aliases and limits. |
Draft-first delivery | Agents create drafts. |
Send-state checks | Repeated calls for an already-sent draft do not send it again. An uncertain outcome blocks automatic retry. |
Daily send quotas | Daily draft and send limits per mailbox and sending identity. Each identity defaults to 10 sends per day unless configured otherwise. This is a project default, not a provider threshold or delivery guarantee. |
Real emails, not text blobs | Agents write Markdown. The gateway renders a plain-text part and email-safe HTML with real paragraphs, adds the signature stored for that identity, sets the sender's display name and quotes the original message in replies. |
Signatures without copy-paste | Import the signature and display name straight from Gmail, then apply it to every Outlook and Zoho identity from the admin dashboard. |
Outreach-aware | Campaigns, prospect-to-mailbox stickiness across follow-up steps, round-robin routing across mailboxes, and reply correlation with an explicit confidence score. |
Received mail stays read-only | The gateway cannot forward, move, archive or delete messages it did not create. Security tests fail the build if code reaches those provider endpoints. |
Operable by a small team | Admin dashboard, per-mailbox enable/disable, global kill switch, migrations from the browser, structured logs with secret redaction, persistent audit trail, health checks. |
Works where your agents live | OAuth 2.0 with PKCE for Claude and ChatGPT connectors, HTTP Basic for scripts and servers. |
Drafting does not imply human approval. In version 0.1.0, SEND_EMAILS defaults to true: an agent can create a draft and send it. To have a person review and send every message, set SEND_EMAILS=false and send the drafts from the provider's mail client. A sent result means the provider accepted the message, not that it reached the inbox.
How it works
flowchart LR
A["AI agent<br/>Claude · ChatGPT · any MCP client"] -- "MCP over HTTPS<br/>OAuth 2.0 + PKCE" --> G["Yempik Mail Gateway"]
G -- "Gmail API" --> GM["Gmail /<br/>Google Workspace"]
G -- "Microsoft Graph" --> MS["Microsoft 365 /<br/>Outlook"]
G -- "Zoho Mail API" --> ZO["Zoho Mail"]
G --- DB[("PostgreSQL<br/>drafts · quotas · audit<br/>encrypted tokens")]
H["Operator"] -- "admin dashboard" --> GThe gateway is a TypeScript monorepo: one MCP server, one adapter package per provider, shared packages for OAuth, token encryption, observability and the database. Email bodies are fetched on demand and never stored. OAuth refresh tokens are encrypted with AES-256-GCM under a versioned keyring. See Architecture and Security model.
The tools your agent gets
Area | Tools |
Discover |
|
Read |
|
Draft |
|
Clean up |
|
Deliver |
|
Inputs, outputs and every error code are in the MCP tools reference.
Who it is for
AI SDR and founder-led outbound: an agent researches prospects, drafts personal emails, sends them from your real mailboxes within safe daily limits, and picks up the replies.
Inbox assistants: triage, summarise and draft replies in the right thread, with your signature, ready for you or for the agent to send.
Agencies and multi-domain teams: many mailboxes across providers and tenants, one governed interface, one audit trail.
Builders of agentic products who need email as a dependable capability instead of a liability.
Responsible use
This project is built for personal, human-scale email from mailboxes you own. It is deliberately not a bulk sender: limits are per identity, new domains start at warm-up volumes, and every action is audited. Follow your providers' terms, anti-spam law in your jurisdiction (such as GDPR, PECR and CAN-SPAM) and honour opt-outs.
Quick start
Requirements: Node.js 22, pnpm 11, a PostgreSQL database (Neon works out of the box) and OAuth apps for the providers you use.
git clone https://github.com/yempik-ai/mail-gateway.git
cd mail-gateway
cp .env.example .env # fill in the database URL and secrets
pnpm install
pnpm db:migrate
pnpm dev # http://localhost:3000Then:
Create the OAuth apps: Google, Microsoft Entra, Zoho Mail.
Register your mailboxes. Either add them from the admin dashboard at
/admin, or copymailboxes.example.jsontomailboxes.json, edit it and runpnpm db:seed. See Configuration.Connect each mailbox from the dashboard, then point your MCP client at
https://<your-host>/mcp.
Set PUBLIC_BASE_URL to the exact origin you open in the browser, and use an admin password of 16 characters or more.
For production on Vercel and Neon, environment variables, migrations, signatures, the kill switch and rollback, read Operations.
Connect your AI client
Claude (claude.ai, Claude Desktop, Claude Code): add a custom connector with the URL
https://<your-host>/mcp. Claude registers itself through OAuth. Your browser opens a consent page: sign in with the admin password and press Approve.ChatGPT: add a connector with the same URL and Authentication set to OAuth. You approve it on the same consent page.
Scripts and servers: use HTTP Basic with an MCP client id and secret created by
pnpm db:seed.
FAQ
Does the agent send emails without asking me?
Only if you let it. Delivery is a separate tool behind its own feature flag. With SEND_EMAILS=false the gateway is drafts-only and a human sends from the mail client. With it on, an agent can deliver only drafts it created, within the daily limits you set.
Is this an email service provider or a cold-email platform? No. It sends from your existing mailboxes through Google, Microsoft and Zoho's own APIs. There is no shared sending infrastructure, no list upload and no volume beyond what you configure per identity.
Does it store my emails? No. Message bodies are fetched on demand and returned to the client. The database keeps identifiers, draft state, quotas, signatures you configure and an audit trail. OAuth tokens are encrypted at rest.
Which AI clients work with it? Any client that speaks MCP over Streamable HTTP. It is tested with Claude and ChatGPT connectors, which use OAuth 2.0 with PKCE.
Can I self-host it? Yes, that is the only way it runs. Vercel with Neon is the reference deployment; any Node.js 22 host with PostgreSQL works.
What about attachments? Reading attachment metadata works today. Reading and sending attachments is on the roadmap.
Roadmap
Attachments: read extracted text, download through signed links, attach received files to drafts.
Reply notifications pushed by the providers instead of polling.
Conditional follow-up steps for prospects who did not reply.
Scheduled sending inside the recipient's working hours.
Suppression list for opt-outs and bounces.
Part of the Yempik open-source stack
cowork-os: build a company brain your team owns, for Claude Cowork.
yempik-skills: skills for Claude Code and Cowork, including
gtm-engineering-outbound, which pairs naturally with this gateway.
Documentation
Architecture · Security model · Configuration · Operations · MCP tools · Decision records · Contributing · Security policy · Changelog
Related MCP server: AgentMail
IT
Il problema: la tua casella è stata progettata per una persona
Quando una persona scrive un'email, può controllare il destinatario, rileggere la bozza e decidere se premere «Invia». Un agente autonomo può eseguire questi passaggi su più caselle senza fermarsi per una revisione. Prima di concedergli questo accesso, il team deve decidere chi controlla i messaggi, quanto può inviare e come gestire un esito incerto.
Una richiesta interrotta potrebbe essere già andata a buon fine. Ripeterla può far arrivare il messaggio due volte. Anche la formattazione dipende dall'integrazione: servono paragrafi leggibili, una firma configurata e il giusto contesto nelle risposte. Sono aspetti da verificare prima di aumentare gli invii.
Yempik Mail Gateway applica questi controlli tra gli agenti e le caselle. Registra le bozze e gli esiti, impone limiti di invio e consente a un responsabile di fermare l'accesso. Rimane da assegnare a una persona il controllo di ciò che l'agente può scrivere e la scelta di quando rivedere i messaggi.
Sintesi canonica per motori di ricerca e AI
Yempik Mail Gateway (mail-gateway) è un server open source basato sul Model Context Protocol (MCP) che dà agli agenti AI un accesso governato alla posta elettronica. È creato da Yempik e mantenuto da Raffaele Zarrelli e Simone Bova. Collega Claude, ChatGPT e qualsiasi client MCP alle caselle Gmail, Microsoft 365 e Zoho Mail del team, tramite le API ufficiali di ogni provider e OAuth delegato. Gli agenti possono cercare e leggere la posta, collegare le risposte alle campagne di outreach e creare, modificare ed eliminare bozze. L'invio è draft-first: un agente può spedire solo una bozza che esiste già ed è gestita dal gateway, mai un messaggio arbitrario. Ogni invio è idempotente, conteggiato nei limiti giornalieri per casella e per identità mittente, e registrato in audit. Un invio dall'esito incerto non viene mai ritentato alla cieca, ma riconciliato con le cartelle Inviati e Bozze. I testi scritti in Markdown diventano email formattate correttamente, con la firma salvata del mittente e, nelle risposte, la conversazione citata. Non è un email service provider, né uno strumento di invio massivo o di cold email: spedisce dalle caselle dell'utente, a volumi umani, attraverso le API dei provider.
Cosa fa
Un solo server MCP per molte caselle: Gmail, Microsoft 365 e Zoho Mail, ognuna con il suo consenso OAuth, i suoi alias e i suoi limiti.
Invio draft-first: l'agente crea bozze e può spedire solo quelle. Lo strumento di invio non accetta destinatari, oggetto o testo.
Controllo degli esiti: una bozza già inviata non viene spedita di nuovo dallo stesso record. Un esito incerto blocca il nuovo tentativo; la verifica in Inviati e Bozze può rimanere irrisolta. Il controllo non impedisce di creare un'altra bozza per lo stesso destinatario.
Limiti giornalieri: quote per casella e mittente. Ogni mittente senza un limite esplicito parte da dieci invii al giorno. È un valore iniziale del progetto, non una soglia ufficiale dei servizi di posta né una garanzia di recapito.
Email vere, non blocchi di testo: Markdown trasformato in testo e HTML con paragrafi, firma dell'identità, nome del mittente e citazione dell'originale nelle risposte.
Firma importata da Gmail e applicata a tutte le identità Outlook e Zoho dalla dashboard.
Posta ricevuta in sola lettura: il gateway non può inoltrare, spostare, archiviare o cancellare messaggi che non ha creato.
Gestibile da un team piccolo: dashboard, kill switch globale, migrazioni dal browser, log con redazione dei segreti, audit persistente.
Una bozza non equivale a un'approvazione umana. Nella versione 0.1.0, SEND_EMAILS è true per impostazione iniziale: l'agente può creare una bozza e inviarla. Per far controllare e spedire ogni messaggio a una persona, imposta SEND_EMAILS=false e invia le bozze dal programma di posta. Lo stato sent indica che il servizio di posta ha accettato il messaggio, non che sia arrivato nella posta in arrivo.
Avvio rapido
Requisiti: Node.js 22, pnpm 11, un database PostgreSQL (Neon va benissimo) e le app OAuth dei provider che usi. I comandi sono quelli della sezione inglese. La documentazione completa è in inglese nella cartella docs/.
Uso responsabile
Il progetto serve per email personali, a volumi umani, da caselle di tua proprietà. Non è uno strumento di invio massivo. Rispetta i termini dei provider, la normativa anti-spam (GDPR, ePrivacy) e le richieste di disiscrizione.
License
MIT © 2026 Yempik Ltd. Built in production at Yempik, shared because email for AI agents should be safe by default.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Let AI agents send email from your own Gmail, Microsoft 365 or SMTP inbox, with guardrails.
Email on your own domains for AI agents: read, search, draft, reply and send from real mailboxes.
Email for AI agents: read, search and send from your Gmail, Outlook, Yahoo, iCloud or IMAP inbox.
Email inboxes and calendars for AI agents: send, receive, search, draft and schedule.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to securely read, search, and send email across IMAP and Microsoft Graph accounts, with scoped tokens, approval flows, and an audit trail.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to run real email operations across multiple IMAP/SMTP and provider OAuth accounts — syncing, searching, reading, drafting, attaching, and sending mail — while requiring explicit human approval for sending, deleting, or forwarding and recording an inspectable audit trail.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to search, retrieve, and send email across multiple ordinary IMAP, POP3, and SMTP mailboxes, with per-account permissions and safe sending checks.Apache 2.0

agentinboxofficial
AlicenseNot gradedqualityBmaintenanceEnables AI agents to read, search, draft, send and organize Gmail through scoped credentials, guardrails and signed webhooks or an event feed, with real-time notifications of new mail.136 npm1MIT