Programmatic access to Gmail mailboxes for apps and agents.
Gmail API reads mail you already have. MailKite provisions addresses on your domain with real deliverability — and an MCP for agents.
See the full MailKite vs Gmail API comparisonA minimal, copy-paste starter. Swap in your own domain and API key.
import { verifyWebhook } from "@mailkite/client";
// MailKite POSTs every inbound email at your domain as JSON.
// Point a route at this handler in the MailKite dashboard.
export default async function handler(req: Request) {
const raw = await req.text();
const sig = req.headers.get("x-mailkite-signature") ?? "";
// Reject anything not signed by your webhook secret
const ok = await verifyWebhook(sig, raw, process.env.MK_WEBHOOK_SECRET!);
if (!ok) return new Response("bad signature", { status: 401 });
const email = JSON.parse(raw);
// Route into Gmail API: open a ticket, create a task, store a record
await routeIntoName(email); // email.from · email.subject · email.text
return new Response(JSON.stringify({ ok: true }));
} The Gmail API gives applications and agents programmatic access to existing Gmail mailboxes — read, send, label, and search — via OAuth. It's the path for apps that operate on a user's own Gmail, but it requires OAuth consent per user and doesn't provision new addresses or handle deliverability for your domain.
Free within Google API quotas
Agent & MCP email
Inboxes, SDKs, and MCP servers that give AI agents email.
Yes, with OAuth consent from the mailbox owner. It reads/sends from an existing Gmail account rather than a new address.
Gmail API operates on existing Gmail mailboxes. MailKite provisions new addresses on your own verified domain with SPF/DKIM deliverability and an MCP server. See /alternatives/gmail-api.
Reads/sends from Outlook/M365 mailboxes; enterprise OAuth scopes.
View details
Wraps existing mailboxes (Gmail/Outlook) under one API — not its own mail.
View detailsHosted OAuth MCP — agents get their own inbox, no local install.
View detailsReceive email as a webhook, send with one API. Unlimited free domains.
View detailsPoint a domain, drop in a webhook URL, and send your first email in minutes. Unlimited domains, no credit card.