sequence

Book a demo

Tell us a little about your business. We'll reply within one business day to set up a 20-minute call.

Get started

Codex MCP setup for email and SMS.

Add Sequence to Codex as a remote MCP server, either with your account key in config.toml or by signing in with OAuth. Codex can then build and send email and text campaigns, and wire them into the app you are working on.

You type
When a user upgrades in our app, send an order.upgraded event to Sequence and email them a thank-you with their new plan's features.
Get started

Book a demo

Tell us a little about your business. We'll reply within one business day to set up a 20-minute call.

What your agent does

  1. Step 1

    list_teams

    Checks the connection

    Lists the brands your key can reach. If this works, Codex is connected.

  2. Step 2

    upsert_template

    Writes the email

    HTML or MJML with tokens such as the plan name from the event.

  3. Step 3

    create_sequence

    Listens for your app's event

    The sequence starts whenever your backend reports the event for a contact.

    Excerpt of the call

    {
      "name": "Upgrade thank-you",
      "trigger_type": "event",
      "trigger_event_name": "order.upgraded"
    }
  4. Step 4

    add_step

    Adds the email

    Sends right away, or after a wait you choose.

  5. Step 5

    send_event

    Tests the event end to end

    Records one event for a test contact, the same call your backend makes through the REST API.

    Excerpt of the call

    {
      "email": "you@example.com",
      "event_name": "order.upgraded",
      "event_id": "test-001",
      "event_properties": {
        "plan": "pro"
      }
    }
  6. Step 6

    simulate_event

    Shows what would send

    Replays a stored event and reports what each sequence would send, without sending anything.

The same job, without a builder.

Builder-style marketing tools make you assemble every piece by hand. With Sequence, your agent does the assembly from one sentence, and you review the result.

In a builder, you

  • Drag text, image and button blocks into an email editor, one email at a time
  • Draw a workflow canvas with waits and if/then branches
  • Stack AND/OR rules to define who belongs in each segment
  • Paste merge tags into every subject line and paragraph
  • Click through settings for send windows, senders and unsubscribe links

With Sequence, you

Type one sentence. Your agent makes 6 calls:

  • list_teams
  • upsert_template
  • create_sequence
  • add_step
  • send_event
  • simulate_event

Add Sequence to config.toml

Add the server to ~/.codex/config.toml with your account key as a Bearer header. Codex loads it the next time it starts.

claude mcp add --transport http sequence \  https://setsequence.com/api/mcp \  --header "Authorization: Bearer cad_acct_…"

Or sign in with OAuth

Run codex mcp add sequence with the Sequence MCP URL, then codex mcp login sequence. Codex opens a sign-in page, and your key stays in your Sequence account.

Use http_headers, not headers

The header table in a Codex MCP entry is named http_headers. An entry that uses headers instead fails to load, and Codex does not say why, so the server just never appears. If list_teams is missing, check this first.

Questions

Where do I get an account key?

In Sequence, open Settings, then AI agents, and create a key. Keys start with cad_acct_.

Can Codex call Sequence from my app's code too?

Your app calls the REST API under /api/v1 with the same key. Codex can write that integration and test it with the MCP tools.

Codex does not show the Sequence tools. What now?

Restart Codex so it reloads config.toml, then check that the entry uses http_headers and that the key starts with cad_acct_.

How many brands can one key reach?

Every brand you own. Pass the brand's slug as team on each call.

Ask your agent. Sequence sends.

Start free with one brand and 3,000 emails a month. No card needed.

Get started

Book a demo

Tell us a little about your business. We'll reply within one business day to set up a 20-minute call.