Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt

Use this file to discover all available pages before exploring further.

MCP Integration

Sequenzy supports the Model Context Protocol (MCP), allowing AI assistants like Claude Desktop, Claude Code, Codex, Cursor, and other MCP clients to manage your email marketing directly.

What You Can Do

With Sequenzy MCP, AI assistants can:
  • Manage subscribers - Add, update, search, and remove subscribers
  • Create sequences - Generate and configure email automation sequences
  • Draft campaigns - Create and edit campaign drafts
  • Send transactional emails - Send single emails via template or HTML
  • View analytics - Get stats for campaigns, sequences, and overall performance
  • Inspect localization - Read company localization settings and localized template variants
  • Generate content - AI-powered email and sequence generation

Quick Setup

The easiest way to set up MCP is using our setup wizard:
npx @sequenzy/setup
This will:
  1. Open your browser to log in
  2. Create a personal API key
  3. Auto-detect supported installed AI clients
  4. Configure those clients automatically

Manual Setup

Across most MCP clients, the core server config is the same:
  • Command: npx
  • Args: -y @sequenzy/mcp
  • Env: SEQUENZY_API_KEY=seq_user_your_key_here
If your client supports local stdio MCP servers, you can usually reuse that exact command and environment variable in its native config format.

Claude Desktop

  1. Open Claude Desktop settings file:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add Sequenzy MCP:
{
  "mcpServers": {
    "sequenzy": {
      "command": "npx",
      "args": ["-y", "@sequenzy/mcp"],
      "env": {
        "SEQUENZY_API_KEY": "seq_user_your_key_here"
      }
    }
  }
}
  1. Restart Claude Desktop

Cursor

  1. Open ~/.cursor/mcp.json (create if it doesn’t exist)
  2. Add Sequenzy:
{
  "mcpServers": {
    "sequenzy": {
      "command": "npx",
      "args": ["-y", "@sequenzy/mcp"],
      "env": {
        "SEQUENZY_API_KEY": "seq_user_your_key_here"
      }
    }
  }
}
  1. Restart Cursor

Windsurf

Same format as Cursor, but the config is at:
  • macOS: ~/Library/Application Support/Windsurf/mcp.json
  • Windows: %APPDATA%\Windsurf\mcp.json

Claude Code

You can add Sequenzy to Claude Code directly from the CLI:
claude mcp add sequenzy --scope user --env SEQUENZY_API_KEY=seq_user_your_key_here -- npx -y @sequenzy/mcp
If you prefer a shared project config, add the same server to .mcp.json:
{
  "mcpServers": {
    "sequenzy": {
      "command": "npx",
      "args": ["-y", "@sequenzy/mcp"],
      "env": {
        "SEQUENZY_API_KEY": "seq_user_your_key_here"
      }
    }
  }
}
On native Windows, wrap npx with cmd /c:
claude mcp add sequenzy --scope user --env SEQUENZY_API_KEY=seq_user_your_key_here -- cmd /c npx -y @sequenzy/mcp

Codex

You can add Sequenzy to Codex from the CLI:
codex mcp add sequenzy --env SEQUENZY_API_KEY=seq_user_your_key_here -- npx -y @sequenzy/mcp
Verify that Codex can see the server:
codex mcp list
Or add it manually in ~/.codex/config.toml:
[mcp_servers.sequenzy]
command = "npx"
args = ["-y", "@sequenzy/mcp"]

[mcp_servers.sequenzy.env]
SEQUENZY_API_KEY = "seq_user_your_key_here"

Other MCP Clients

For tools like VS Code Copilot, OpenClaw, Hermes, and other MCP-compatible clients, use the same Sequenzy stdio server:
  • Command: npx
  • Args: -y @sequenzy/mcp
  • Env: SEQUENZY_API_KEY=seq_user_your_key_here
If a client asks for a JSON config, use the same mcpServers.sequenzy shape shown above. If it provides a CLI helper, point it at npx -y @sequenzy/mcp and set the same environment variable.

Getting Your API Key

  1. Go to the Sequenzy dashboard
  2. Open Settings → API Keys
  3. Click “Create Personal Key”
  4. Copy the key (starts with seq_user_)
Or use the setup wizard: npx @sequenzy/setup

Available Tools

Subscribers

  • add_subscriber - Add a new subscriber
  • update_subscriber - Update subscriber attributes/tags
  • remove_subscriber - Unsubscribe or delete
  • get_subscriber - Get subscriber details
  • search_subscribers - Search by tags, attributes, segments

Campaigns

  • list_campaigns - List all campaigns
  • get_campaign - Get campaign details and stats
  • create_campaign - Create a draft campaign from raw HTML or Sequenzy blocks
  • update_campaign - Edit a draft, including reply-to settings, raw HTML, or Sequenzy blocks
  • send_test_email - Send test to single address

Company

  • get_company - Get company details plus effective localization settings

Sequences

  • list_sequences - List all sequences
  • get_sequence - Get sequence details plus sequence.emails, which includes each step’s nodeId, linked emailId, subject, preview text, and blocks
  • create_sequence - Create a sequence with:
    • trigger: "segment_entered" plus segmentId for saved-segment entry automations
    • goal - AI generates email content
    • steps with blocks - Sequenzy JSON block format
    • steps with html - Any HTML (React Email, MJML, etc.) - auto-converted
    • enrollmentMode: "matching_field" for event-triggered product-, variant-, order-, or subscription-specific sequences that should block duplicate active runs only for the same resolved field
    • enrollmentFieldPath, such as order.id or product.providerVariantId, when you want matching_field to use a custom event property
    • For event_received sequences, step content can use {{event.amount}}, {{event.order.id}}, or other {{event.*}} merge tags from the event payload that enrolled the subscriber
  • update_sequence - Modify a sequence, targeting a specific step with the emailId or nodeId returned by get_sequence, or update enrollmentMode / enrollmentFieldPath
  • enable_sequence / disable_sequence - Control status

Transactional

  • send_email - Send a single email (template or HTML)

Segments

  • list_segments - List saved segments
  • create_segment - Create a segment from explicit filters, including nested AND/OR groups, event filters, segment filters, Stripe product purchase filters, and optional filterJoinOperator
  • get_segment_count - Preview how many active subscribers match a segment
For Stripe product segments, use field: "stripeProduct". The supported shapes are:
  • {"id":"filter-1","field":"stripeProduct","operator":"is","value":"prod_pro"} for “bought product”
  • {"id":"filter-1","field":"stripeProduct","operator":"is_not","value":"prod_pro"} for “didn’t buy product”
  • {"id":"filter-1","field":"stripeProduct","operator":"at_least","value":"prod_pro:3"} for “at least 3 payments”
  • {"id":"filter-1","field":"stripeProduct","operator":"less_than_count","value":"prod_pro:3"} for “fewer than 3 payments”
For engagement filters (emailSent, emailOpened, emailClicked, emailBounced, emailComplained), the value can either be a rolling time window (7d, 30d, 90d, 180d, all) or a specific sent campaign via campaign:<campaign_id>. Combine two campaign-specific filters to express rules like “bounced campaign A but not campaign B”:
  • {"id":"filter-1","field":"emailBounced","operator":"is","value":"campaign:cmp_abc"}
  • {"id":"filter-2","field":"emailBounced","operator":"is_not","value":"campaign:cmp_xyz"}
Use list_campaigns to look up the campaign IDs. By default, segment filters use AND logic. To match any filter instead of all of them, pass filterJoinOperator: "or" when calling create_segment. For nested logic, pass a v2 root group instead of filters:
{
  "name": "Active non-buyers",
  "root": {
    "kind": "group",
    "id": "root",
    "joinOperator": "and",
    "children": [
      {
        "kind": "filter",
        "id": "filter-1",
        "field": "attribute",
        "operator": "lte",
        "value": "last_login_days_ago:90"
      },
      {
        "kind": "group",
        "id": "group-1",
        "joinOperator": "or",
        "children": [
          {
            "kind": "filter",
            "id": "filter-2",
            "field": "event",
            "operator": "is_not",
            "value": "saas.purchase:30d"
          },
          {
            "kind": "filter",
            "id": "filter-3",
            "field": "segment",
            "operator": "is_not",
            "value": "seg_paying_customers"
          }
        ]
      }
    ]
  }
}
Event filter values use eventName:range for is / is_not and eventName:count:range for at_least / less_than_count. Segment filter values are saved segment IDs. list_segments returns both:
  • subscriberCount - all matched contacts, including unsubscribed or bounced contacts
  • activeSubscriberCount - contacts eligible for campaigns
get_segment_count returns the active count, because campaigns and most send flows only target active subscribers.

Templates

  • list_templates - List all email templates with localization status by locale
  • get_template - Get a template’s details, content, and localized variants
  • create_template - Create a template from raw HTML or Sequenzy blocks
  • update_template - Update a template with raw HTML or Sequenzy blocks
When you need recipient-specific content, prefer Sequenzy blocks instead of raw HTML. Campaign and template MCP tools accept a blocks array where each block can include a condition, for example:
{
  "name": "Launch",
  "subject": "Big update",
  "blocks": [
    {
      "id": "intro",
      "type": "text",
      "content": "<p>Hello there</p>",
      "variant": "paragraph"
    },
    {
      "id": "pro-offer",
      "type": "text",
      "content": "<p>Your Pro upgrade is ready.</p>",
      "variant": "paragraph",
      "condition": {
        "variable": "plan",
        "operator": "equals",
        "value": "pro"
      }
    }
  ]
}
Use merge-tag variable names without {{ }} inside condition.variable.

Analytics

  • get_stats - Overview stats (7d/30d/90d)
  • get_campaign_stats - Campaign performance
  • get_sequence_stats - Sequence performance
  • get_subscriber_activity - Individual activity

AI Generation

  • generate_email - Create email from prompt
  • generate_sequence - Create multi-email sequence from goal
  • generate_subject_lines - Generate A/B subject variants
Generated content is returned as draft content for review. Sequence generation supports up to 10 emails.

Example Conversations

Set up email for a new SaaS

You: "Set up email sequences for my SaaS that has a 14-day trial"

Claude: I'll help set that up. First, let me check your current sequences...
[Uses list_sequences]

You don't have any sequences yet. I'll create three for you:
1. Welcome sequence (triggered on signup)
2. Trial nurture (days 1, 3, 7, 10, 13)
3. Trial ending reminder (day 12)

[Uses generate_sequence and create_sequence for each]

Done! I've created 3 sequences with 8 emails total.

Add a subscriber

You: "Add john@example.com as a VIP subscriber"

Claude: [Uses add_subscriber]
Added john@example.com with the VIP tag.

Create a Stripe product segment

You: "Create a segment for subscribers who bought Stripe product prod_pro at least 3 times"

Claude: [Uses create_segment with filters:
{"id":"filter-1","field":"stripeProduct","operator":"at_least","value":"prod_pro:3"}]
Done. I created the segment and saved it for future campaigns.

Create a match-any segment

You: "Create a segment for VIP contacts or anyone on Gmail"

Claude: [Uses create_segment with:
{"filterJoinOperator":"or","filters":[{"id":"filter-1","field":"tag","operator":"contains","value":"vip"},{"id":"filter-2","field":"email","operator":"contains","value":"@gmail.com"}]}]
Done. I created a segment that matches either condition.

Check performance

You: "How did my last campaign perform?"

Claude: [Uses list_campaigns then get_campaign_stats]
Your "Product Launch" campaign sent yesterday had:
- 2,451 sent
- 67.2% open rate
- 12.3% click rate
That's above your average!

Create a sequence with specific content

You: "Create a 3-email welcome sequence with specific content.
Email 1 (immediate): Subject 'Welcome!' - 'Thanks for joining us.'
Email 2 (1 day later): Subject 'Getting Started' - 'Here's how to begin.'
Email 3 (3 days later): Subject 'Pro Tips' - 'Unlock advanced features.'"

Claude: [Uses create_sequence with steps]
Done! I've created the welcome sequence with 3 emails:
1. "Welcome!" - sends immediately
2. "Getting Started" - sends after 1 day
3. "Pro Tips" - sends after 3 days

The sequence is in draft mode. Would you like me to enable it?

Migrate a sequence from another platform

You: "I have these React Email templates for my onboarding sequence.
Can you create a sequence that sends them?"

[Pastes HTML content]

Claude: [Uses create_sequence with steps using html field]
Done! I've created your onboarding sequence with the HTML content
you provided. The HTML was automatically converted to Sequenzy's
block format so you can edit it in the visual editor later.

The sequence is ready in draft mode with 3 emails.

Event-Personalized Sequences

When your AI assistant creates a sequence with trigger: "event_received", it can place {{event.*}} merge tags directly into step subjects or body content. Those values come from the properties payload you send to POST /api/v1/subscribers/events. Example:
  • Trigger payload: {"event":"weather.wind_alert","properties":{"city":"Tel Aviv","alert":{"maxSpeed":75}}}
  • Sequence subject: Wind alert for {{event.city}}
  • Sequence body: Winds may reach {{event.alert.maxSpeed}} km/h.
Sequenzy stores that event snapshot on the sequence run, so delayed follow-up emails keep using the same original event values.

Resources

MCP also provides read-only resources that AI can access:
ResourceDescription
sequenzy://dashboardLive 7-day overview stats
sequenzy://companyCurrently selected company, including localization settings
sequenzy://campaigns/recentLast 10 campaigns
sequenzy://subscribers/recentRecently added subscribers
sequenzy://sequencesAll sequences with status
sequenzy://templatesAvailable email templates with localization status
sequenzy://segmentsDefined segments
sequenzy://tagsAll tags with counts

Security

  • Personal API keys are tied to your user account
  • Keys can only access companies you have access to
  • You can revoke keys anytime in Settings → API Keys
  • Keys are never shared between users

Troubleshooting

Sequenzy MCP failures now return a short explanation, a concrete recovery step, and a direct docs.sequenzy.com link so AI clients can self-correct more reliably.

”SEQUENZY_API_KEY environment variable is required”

Make sure your API key is set in the MCP config. Run npx @sequenzy/setup to configure automatically.

”Invalid API key”

Your key may have been revoked. Create a new one in Settings → API Keys.

Changes not appearing

Restart your AI client after modifying the MCP config.