Back to Projects

LaunchMail

Sole Developer & Architect

EmailAIAutomationMCP
Visit Project

Agent-first email platform where AI agents get their own @launchmail.me inboxes via REST API, MCP protocol, or OpenClaw plugin. Full email lifecycle: AWS SES for outbound (SESv2Client + SendEmailCommand), SNS webhooks for inbound (MIME parsing, S3 storage), and delivery/bounce/complaint event tracking. Embeddable React SDK for host apps. Used by LaunchThatBot for agent email capabilities.

4
Integration Methods

REST API, MCP server, OpenClaw plugin, embeddable React SDK

12+
Mail Schema Tables

mailboxes, threads, messages, attachments, outbox, deliveryEvents, suppressionList, apiKeys, sessions

3
Event Handlers

SES inbound, SES delivery events, mailbox provisioning

The Problem

AI agents need email accounts to sign up for services, receive verification codes, and communicate — but Gmail and other providers block automated signups. Building email infrastructure from scratch means handling SES configuration, MIME parsing, bounce management, and suppression lists.

The Solution

Built an email platform with a REST API (POST /api/v1/mailboxes/provision), an MCP server (@launchmail/mcp) for AI tool integration, and an OpenClaw plugin for LaunchThatBot. AWS SES handles outbound via SESv2Client. Inbound flows through SNS → Convex HTTP handlers → MIME parsing → thread/message storage. Reusable Agentmail Convex component owns the full mail data model.

Technical Decisions

Key architecture decisions and their outcomes

Agentmail as a reusable Convex component

Context

Email data model (mailboxes, threads, messages, delivery events) is needed by multiple apps.

Decision

Extracted the full mail data model into a Convex component (packages/plugins/agentmail). Apps mount it and interact via component APIs.

Outcome

LaunchMail, LaunchThatBot, and Portal all share the same email infrastructure without duplication.

MCP + REST API + OpenClaw plugin for maximum integration surface

Context

Different AI agents use different integration patterns — some use MCP, some use REST, some use OpenClaw.

Decision

Built all three: @launchmail/mcp for MCP-native agents, REST API for HTTP integrations, OpenClaw plugin for LaunchThatBot agents.

Outcome

Any AI agent framework can create and manage email inboxes through its preferred protocol.

Engineering Details

  • Mailbox provisioning: API key auth → scope check (mail.admin) → entitlement/quota check → component provisionMailbox → domain assignment
  • Inbound flow: SES → SNS → Convex HTTP /ses/inbound → parseMimeToInbound → thread matching → message storage
  • Outbound flow: outbox mutation → dispatchOutboxMessage action → SESv2Client.SendEmailCommand → providerMessageId tracking
  • Delivery events: SNS /ses/events → ingestSesDeliveryEvent → bounce/complaint handling + suppression list
  • MCP server: @modelcontextprotocol/sdk with StdioServerTransport, tools split across inboxes, messages, drafts, contacts

Key Highlights

  • REST API: POST /api/v1/mailboxes/provision with API key auth + mail.admin scope
  • MCP server (@launchmail/mcp) with tools for list, send, drafts, contacts
  • OpenClaw plugin adds launchmail_create_inbox/launchmail_delete_inbox
  • AWS SES outbound: SESv2Client + SendEmailCommand with delivery tracking
  • SNS inbound webhooks: SubscriptionConfirmation, MIME parsing, S3 storage
  • Delivery, bounce, and complaint event tracking via sesEventsHandler
  • Embeddable React SDK (embed-react) for host apps
  • Agentmail Convex component: mailboxes, threads, messages, attachments, outbox, suppression list

Tech Stack

Next.jsAWS SES / SNSConvexMCP SDKTypeScript

Skills & Technologies

Related Articles

Related Projects