Codex
OpenAI
Self-hosted on Cloudflare

Give Codex a mailbox on your own domain

With the contract in the session, Codex can list the domains your account owns, list the addresses on one of them, create a single new address, read the inbound event log with a cursor, open a durable wait and poll it, search the mailbox, and send from the domain your key is bound to. The hosted MCP server at https://mcp.flowmails.net/mcp mounts the same ten tools with a per-tool scope check, so a session that speaks MCP natively never has to remember a method name.

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 Codex stops inventing method names.

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

The skill follows the Agent Skills spec, so a Codex checkout reads it from its own skills directory. A repository that does not read a skill directory can carry the same contract in an AGENTS.md block instead, and the hosted MCP server at https://mcp.flowmails.net/mcp needs no skill at all.

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
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 Codex 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, Codex 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 Codex and Flowmails

Other coding agents

Flowmails for every agent