saasmail logo

saasmail

Community
choyiny

Self-hosted email server for SaaS teams on Cloudflare Workers with WebMCP support

Publisherchoyiny
Repositorysaasmail
LanguageTypeScript
Forks
51
Stars
253
Available tools
0
Transport typestreamable-http
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    saasmail exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    253 stars and 51 forks from the linked repository.

The centralized inbox for SaaS teams. One unified timeline per customer — marketing, notifications, and support emails collapsed into a single view, per person.

Every interaction with a customer matters, and context compounds. saasmail pulls the promo blast, the billing receipt, and the support thread into the same conversation, so anyone on your team can respond with the full history already in hand.

Self-hosted on Cloudflare Workers. Receive with Cloudflare Email Workers. Send with Cloudflare Email Sending, Resend, Bavimail, or Postmark.

Who this is for

SaaS teams that want a self-hosted email stack on Cloudflare Workers — one shared, per-customer inbox for marketing, transactional, and support mail — without renting a VM or operating a traditional mail server. If you have a domain, a Cloudflare account, and want to own your customer email data for ~$5/month, this is for you.

Quickstart

Prerequisites: a domain on Cloudflare with Email Routing available, the Workers Paid plan, and Node.js v18+.

The fastest path is the Claude Code onboarding skill — it provisions every Cloudflare resource, fills out your config, runs migrations, and deploys for you:

bash
git clone https://github.com/choyiny/saasmail.git
cd saasmail
claude   # then run /saasmail-onboarding

First successful result: your worker is live at your domain, and visiting it prompts you to create the first admin account. Name an inbox, send yourself a test email, and watch it land on a customer timeline.

Prefer to wire it up by hand? See Setup (~8 steps).

Documentation

Full docs live in docs/.

Deploy and operate: Setup · Email providers · Configuration · Updating · Architecture · Local development

Features: Inboxes and timelines · Email templates · Sequences · Suppressions and unsubscribe · Users and API keys · MCP server · WebMCP · Webhooks

Architecture at a glance

Everything runs inside a single Cloudflare Worker — no separate mail server to operate. See Architecture for the full diagram and the component-by-component breakdown.

Sponsors

GiveFeedback.dev uses AI to turn client screen recordings into actionable tasks and prevent scope creep.

Demo Video

One person's mail across four inboxes, collapsed into a single timeline — filter by inbox and reply inline.

https://github.com/user-attachments/assets/870186a2-840f-4b95-b859-4acd44863263

Screenshots

One timeline per customer — every inbox a person has emailed collapses into a single conversation, with per-inbox tabs and a chat-style composer.

Unified customer timeline

Agent Plan (WebMCP) — connect a browser AI agent and watch it work the inbox: it reads a playbook, lays out a live plan, and ticks steps off while a bottom-right feed groups each tool call as it runs.

Agent Plan with live plan and activity feed

Table overview — stat tiles plus a sortable people table spanning every inbox, with unread and attachment indicators.

Table overview

Templates & sequences — reusable {{variable}} email templates and multi-step drip campaigns you enroll contacts into.

Email templates

Drip sequences

Features

  • One timeline per customer — marketing, transactional, and support mail from a person, collapsed into one conversation.
  • Multi-inbox with team permissions — many inbound addresses on one deployment; members see only the inboxes they're assigned.
  • Thread or chat, per inbox — formal threading for marketing@, iMessage-style bubbles for support@.
  • Per-inbox forwarding — re-send inbound mail to any address through your own provider, sidestepping the IP blocks that break Email Routing forwards.
  • Email templates — reusable HTML with {{variable}} interpolation, sections, and a validated send contract.
  • Sequences — multi-step drip campaigns with delay overrides and auto-cancel on reply.
  • Suppressions and unsubscribe — RFC 8058 one-click unsubscribe, a suppression list enforced on every send path, and a transactional bypass.
  • Users and API keys — invite-only onboarding, passkeys, and scoped sk_… keys.
  • MCP server — connect Claude or any MCP client to your inbox over OAuth 2.1, scoped to that user's inboxes.
  • WebMCP — 20 in-page tools so a browser AI agent can work the inbox as the signed-in user. Reads and drafts; never sends or deletes.
  • Webhooks — HMAC-signed message.received callbacks for help-desk automation.

Provider Matrix

CloudflareResendBavimailPostmark
Sending✅✅✅✅
Receiving✅❌❌❌

Pick one outbound provider at deploy time — see Email providers for the per-provider config and the runtime selection order.

How much does it cost?

$5/month for the Cloudflare Workers Paid plan, which includes 3,000 emails per month of Cloudflare Email Sending at no extra cost. That's it.

No VM to rent. No sprawling cloud console to learn. Just a domain, a Cloudflare account, and the Workers Paid plan.

Roadmap

  • Agentic email steering — AI-driven conversation flows that intelligently gather information from contacts through multi-turn email exchanges

Contributing

See CONTRIBUTING.md. All participants are expected to follow the Code of Conduct. Security issues: see SECURITY.md.

This repo ships a CLAUDE.md at the project root with a few notes the maintainer uses when pairing with Claude Code. It's harmless to ignore if you're not using Claude Code.

License

Apache License 2.0

The name "saasmail" and the saasmail logo are used by the original project to identify it. You are free to fork and redistribute the source under the Apache 2.0 license, but please rename your fork (and replace public/saasmail-logo.png) if you run it as a branded product, so users aren't confused about which project they're installing.

Installation

TypingMind
{
  "mcpServers": {
    "saasmail": {
      "url": "https://your-cloudflare-worker-domain"
    }
  }
}

Use saasmail MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once saasmail is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP connects through a hosted MCP server URL in TypingMind.

Add an MCP server URL

Use this when saasmail is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter https://your-cloudflare-worker-domain in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste https://your-cloudflare-worker-domain into the Server URL field.
  2. Enter a connection name for saasmail.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the saasmail connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the saasmail tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the saasmail tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use saasmail to help me with this task?
saasmail
Sure. I read it.
Here is what I found using saasmail.

Frequently asked questions

What is the saasmail MCP server used for?

saasmail is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use saasmail MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use saasmail with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use saasmail MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With saasmail connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect saasmail MCP to TypingMind?

saasmail can be connected in TypingMind by adding its hosted MCP server URL. This is useful when you want a remote MCP connection that is available from your TypingMind workspace.

What tools does saasmail MCP provide in TypingMind?

saasmail exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use saasmail MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If saasmail requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇