Claude Code
Anthropic
Self-hosted on Cloudflare

Give Claude Code a mailbox on your own domain

With the skill installed, Claude Code knows the SDK contract without being told: the constructor signature, the five error classes, the retry policy, the payload shapes. It can list the mailboxes your account owns, create one new address on a domain you already have, read the inbound event log, open a durable wait for a mailbox, fetch the body of a message an event pointed at, and send from the domain your key is bound to. The hosted MCP server at https://mcp.flowmails.net/mcp gives the same ten tools to a session that speaks MCP natively.

Step 1

Install the skill

The skill carries the SDK contract into the session — the package name, the constructor options, the error classes, the retry policy — so Claude Code stops inventing method names.

terminalbash
npx skills add wms-why/flowmails-sdk-plugin@flowmails-sdk

Claude Code picks the skill up from your project's installed skill list — run the install line in the chat and the contract is there for the next session. The same skill is published as a Claude Code plugin on a self-hosted marketplace, so a team can install it from its own repository instead.

Step 2

Or point it at the MCP server

The hosted Model Context Protocol server answers on https://mcp.flowmails.net/mcp over streamable HTTP. It mounts ten tools, and each one checks the credential’s scope before it runs — a credential without the scope gets a typed scope_denied answer rather than a failed call.

ToolScope
list_domainsaddresses:read
create_addressaddresses:write
list_eventsevents:read
wait_for_emailwaits:write
get_emailmessages:read
send_emailmessages:send

The full table of ten tools and their scopes is on the MCP server page.

The boundary

What the agent does, and what you do

What Claude Code does

  • List the domains your account owns and the addresses on one of them.
  • Create one new address on a domain you already have.
  • Read the inbound event log, open a durable wait, poll it, and fetch the body of a message it points at.
  • Send from the domain your credential is bound to, and read the delivery status afterwards.

What you do, once

  • Create the account and connect your Cloudflare account.
  • Add and verify a domain — the DNS records are yours.
  • Deploy the per-account receive worker.
  • Mint the key, then narrow it: a scoped credential names exactly the tools the agent may call.

Those four steps happen in the dashboard, once. After them, Claude Code can read the mailbox and send from the bound domain on its own initiative — there is no approval step in between — and you revoke the credential from the dashboard when you want it to stop.

FAQ

Common questions about Claude Code and Flowmails

Other coding agents

Flowmails for every agent