Back to Blog

How to Set Up MCP for Email Marketing Step by Step

12 min read

This is the definitive setup guide for connecting AI tools to your email marketing platform via MCP (Model Context Protocol). By the end, your AI agent will have full access to campaign management, subscriber operations, content generation, and analytics - all through natural language.

Total time: about 5 minutes.

What You'll Need

Before starting:

  • A Sequenzy account - Sign up free (no credit card required, 2,500 emails/month on the free plan)
  • An AI tool that supports MCP - Claude Desktop, Cursor, Windsurf, Claude Code, OpenClaw, or Hermes
  • Node.js 18+ - Required for the setup wizard and CLI tools
  • A terminal - Any terminal works (Terminal.app, iTerm2, Windows Terminal, VS Code integrated terminal)

That's it. No Docker containers, no cloud infrastructure, no API gateway configuration.

Step 1: Create Your Sequenzy Account

If you don't have a Sequenzy account yet:

  1. Go to sequenzy.com/sign-up
  2. Create your account with email or GitHub
  3. Create your first company (this is your sending identity)
  4. Note your API key from the dashboard settings

The free plan includes full MCP access with 2,500 emails per month - more than enough to set up and test everything.

Step 2: Quick Setup (Recommended)

The fastest way to connect any supported AI tool:

npx @sequenzy/setup

The setup wizard:

  1. Detects your installed AI tools - It scans for Claude Desktop, Cursor, Windsurf, and Claude Code configurations
  2. Prompts for your API key - Enter the key from your Sequenzy dashboard
  3. Writes the MCP configuration - Adds Sequenzy to your AI tool's MCP server list
  4. Verifies the connection - Confirms your AI tool can reach Sequenzy

That's the entire process for most users. The wizard handles the config file locations, JSON formatting, and server registration.

What the Wizard Does Under the Hood

The setup wizard writes a configuration block to your AI tool's settings file. For Claude Desktop, that's ~/Library/Application Support/Claude/claude_desktop_config.json on macOS. For Cursor, it's in .cursor/mcp.json. The block looks like this:

{
  "mcpServers": {
    "sequenzy": {
      "command": "npx",
      "args": ["-y", "sequenzy"],
      "env": {
        "SEQUENZY_API_KEY": "your-api-key"
      }
    }
  }
}

The wizard merges this into your existing configuration without overwriting other MCP servers you may have configured.

Step 3: Manual Setup (Tool-by-Tool)

If the wizard doesn't detect your tool, or you prefer manual configuration, here's how to set up each one.

Claude Desktop

  1. Open Claude Desktop
  2. Go to Settings (gear icon) > Developer > Edit Config
  3. Add the Sequenzy MCP server:
{
  "mcpServers": {
    "sequenzy": {
      "command": "npx",
      "args": ["-y", "sequenzy"],
      "env": {
        "SEQUENZY_API_KEY": "your-api-key"
      }
    }
  }
}
  1. Save and restart Claude Desktop
  2. You should see "sequenzy" in the tools list when starting a new conversation

Cursor

  1. Open Cursor
  2. Go to Settings > MCP
  3. Click "Add MCP Server"
  4. Or manually edit .cursor/mcp.json in your project root:
{
  "mcpServers": {
    "sequenzy": {
      "command": "npx",
      "args": ["-y", "sequenzy"],
      "env": {
        "SEQUENZY_API_KEY": "your-api-key"
      }
    }
  }
}
  1. Restart Cursor or reload the MCP configuration

Windsurf

  1. Open Windsurf
  2. Navigate to Extensions > MCP Configuration
  3. Add the server configuration:
{
  "mcpServers": {
    "sequenzy": {
      "command": "npx",
      "args": ["-y", "sequenzy"],
      "env": {
        "SEQUENZY_API_KEY": "your-api-key"
      }
    }
  }
}
  1. Restart Windsurf to activate the MCP connection

Claude Code (CLI)

Claude Code supports MCP servers through its configuration:

claude mcp add sequenzy -- npx -y sequenzy

Or manually add to your Claude Code MCP configuration:

{
  "mcpServers": {
    "sequenzy": {
      "command": "npx",
      "args": ["-y", "sequenzy"],
      "env": {
        "SEQUENZY_API_KEY": "your-api-key"
      }
    }
  }
}

OpenClaw

OpenClaw supports MCP servers natively. Register Sequenzy in your agent's tool configuration:

npx @sequenzy/setup

The wizard detects OpenClaw and configures the MCP server in the correct location. Your OpenClaw agent gets access to all 40+ Sequenzy tools.

Hermes

Hermes agents use MCP tools through their toolkit registration. Run the setup wizard:

npx @sequenzy/setup

For Hermes-specific configuration details, see our Hermes integration guide.

Step 4: Install the Sequenzy Skill

The Sequenzy skill gives your AI agent structured guidance on how to use email marketing tools effectively. It teaches the agent the right patterns - when to use MCP vs CLI, which flows need the dashboard, and how to handle common email marketing scenarios.

npx skills add Sequenzy/skills --skill sequenzy

This installs a versioned workflow reference that your agent can access during conversations. Think of it as a playbook - the agent knows how to call the tools, and the skill teaches it the best patterns for combining them.

What the Skill Provides

  • Workflow templates for common email marketing tasks
  • Decision logic for choosing between MCP tools, CLI commands, and dashboard operations
  • Best practices for send safety, content generation, and subscriber management
  • Error handling patterns for common failure modes

The skill is optional but recommended. Without it, your agent will still have access to all MCP tools, but the skill improves the quality of multi-step workflows.

Step 5: Install the Sequenzy CLI

The CLI complements MCP by handling scripted and batch operations. While MCP is conversational (you describe what you want), the CLI is programmatic (you run specific commands).

npm install -g @sequenzy/cli
sequenzy login

When to Use CLI vs MCP

Use CaseMCPCLI
Conversational workflowsYesNo
Content generationYesNo
Multi-step analysisYesNo
CI/CD pipeline sendsNoYes
Cron job automationNoYes
Bulk importsNoYes
Shell scriptsNoYes

Your agent can use both. During a conversation, it calls MCP tools. When it needs to run a scripted operation, it executes CLI commands.

Key CLI Commands

# Check your connection
sequenzy whoami
 
# Subscriber management
sequenzy subscribers add user@example.com --tag premium
sequenzy subscribers list --tag active
sequenzy subscribers remove bounced@example.com
 
# Sending
sequenzy send user@example.com --template welcome --var name=John
sequenzy campaigns list
sequenzy campaigns create --name "Weekly Update"
 
# Analytics
sequenzy stats
sequenzy campaigns stats --id camp_123

Step 6: Verify the Connection

After setup, verify everything works. Open your AI tool and start a new conversation.

Test 1: Check Account Access

"What's my Sequenzy account status?"

The agent should return your account name, email, plan, and usage stats. If this works, MCP is connected.

Test 2: List Subscribers

"How many subscribers do I have?"

The agent calls the search_subscribers tool and returns a count. This verifies read access to your data.

Test 3: Check Available Tools

"What Sequenzy tools do you have access to?"

The agent should list 40+ tools covering campaigns, subscribers, sequences, templates, analytics, and content generation.

If any test fails, see the Troubleshooting section below.

Step 7: Your First Real Workflow

Now that everything is connected, try a real workflow:

Send a Test Email

"Send a test email to my-email@example.com with the subject 'MCP Connection Test' and a simple body confirming the connection works."

The agent uses the send_test_email tool. Check your inbox - if the email arrives, you're fully operational.

Generate Your First AI Email

"Generate a welcome email for new subscribers to a developer newsletter about API best practices."

The agent calls the generate_email tool and produces a complete email with subject line, preview text, and body copy.

Create a Simple Sequence

"Create a 3-email onboarding sequence for new users. Email 1: welcome and quick start guide (send immediately). Email 2: key features they should try (send after 2 days). Email 3: ask for feedback (send after 5 days)."

The agent uses generate_sequence to create the full sequence with content, then create_sequence to deploy it.

Troubleshooting

"MCP server not found" or "No tools available"

Cause: The AI tool hasn't loaded the MCP configuration.

Fix:

  1. Restart your AI tool completely (not just reload)
  2. Verify the config file exists in the correct location
  3. Check that the JSON is valid (no trailing commas, matching brackets)
  4. Run npx @sequenzy/setup again to regenerate the config

"Authentication failed" or "Invalid API key"

Cause: The API key is missing, expired, or incorrect.

Fix:

  1. Go to your Sequenzy dashboard > Settings > API Keys
  2. Copy the full API key
  3. Update the SEQUENZY_API_KEY in your MCP config
  4. If using environment variables, verify they're set: echo $SEQUENZY_API_KEY
  5. Restart your AI tool

"Connection refused" or "Server not responding"

Cause: The MCP server process isn't starting.

Fix:

  1. Verify Node.js is installed: node --version (need 18+)
  2. Test the MCP server manually: npx -y sequenzy
  3. Check for firewall or proxy issues
  4. If behind a corporate proxy, configure npm: npm config set proxy http://your-proxy:port

"Tool call failed" or "Permission denied"

Cause: Your API key doesn't have the required permissions.

Fix:

  1. Check your API key's permission scope in the Sequenzy dashboard
  2. For full MCP access, use a key with read and write permissions
  3. If you intentionally created a read-only key, some tools (send, create, delete) won't work

CLI Login Issues

If sequenzy login fails:

  1. Check your internet connection
  2. Try sequenzy login --verbose for detailed error output
  3. If using SSO, ensure your browser can open the authentication URL
  4. Try setting the API key directly: sequenzy config set apiKey your-key

Security Best Practices

API Key Management

  • Create dedicated keys for MCP access. Don't reuse your dashboard login key.
  • Scope permissions appropriately. If you only need analytics, create a read-only key.
  • Rotate keys periodically. Delete old keys from the dashboard when creating new ones.
  • Never commit keys to version control. Use environment variables or the setup wizard.

Audit Trail

Every action your AI agent takes through MCP is logged in your Sequenzy dashboard. You can see:

  • Which tools were called and when
  • What parameters were passed
  • The result of each operation
  • Which API key was used

Review the audit trail regularly, especially when first using agent-managed email.

Send Safety

Before enabling autonomous sends:

  1. Start with read-only operations (analytics, subscriber queries)
  2. Move to supervised sends (agent drafts, you approve)
  3. Set daily send limits in your Sequenzy dashboard
  4. Use a separate sending domain for agent-generated emails initially
  5. Monitor the audit trail for the first few weeks

See our full best practices guide for detailed safety recommendations.

Advanced Configuration

Multiple Sequenzy Accounts

If you manage multiple companies in Sequenzy, you can configure multiple MCP servers:

{
  "mcpServers": {
    "sequenzy-company-a": {
      "command": "npx",
      "args": ["-y", "sequenzy"],
      "env": {
        "SEQUENZY_API_KEY": "key-for-company-a"
      }
    },
    "sequenzy-company-b": {
      "command": "npx",
      "args": ["-y", "sequenzy"],
      "env": {
        "SEQUENZY_API_KEY": "key-for-company-b"
      }
    }
  }
}

Your agent will have tools from both accounts available and can work with either.

Environment Variables

Instead of hardcoding the API key in config, use environment variables:

# Add to ~/.bashrc or ~/.zshrc
export SEQUENZY_API_KEY="your-api-key"

Then reference it in your MCP config:

{
  "mcpServers": {
    "sequenzy": {
      "command": "npx",
      "args": ["-y", "sequenzy"]
    }
  }
}

The MCP server reads SEQUENZY_API_KEY from the environment automatically.

Team Setup

For teams sharing MCP configurations:

  1. Create a shared .cursor/mcp.json in your project repository
  2. Use environment variables for API keys (never commit keys)
  3. Each team member sets their own SEQUENZY_API_KEY locally
  4. The MCP configuration file can be committed to version control safely

What's Available Through MCP

Once connected, your agent has access to 40+ tools organized by category:

Campaign Management

  • Create, update, and send campaigns
  • Schedule sends for specific dates and times
  • Get campaign statistics and performance data

Subscriber Operations

  • Add, update, and remove subscribers
  • Search subscribers by email, tags, or attributes
  • Manage tags and custom attributes

Sequence Management

  • Create and manage email sequences
  • Enable/disable sequences
  • Get sequence performance statistics

Content Generation

  • Generate complete emails with AI
  • Generate subject line variations
  • Create full email sequences with AI-written content

Templates

  • Create, update, and manage reusable templates
  • List available templates

Analytics

  • Get account-wide statistics
  • Get campaign-specific metrics
  • Get sequence performance data
  • Get individual subscriber activity

Account Management

  • Check account status
  • Manage API keys
  • Configure sending domains

Next Steps

Now that you're set up:

  1. Try the workflows in our 10 AI Agent Workflows guide - copy-paste prompts for immediate use
  2. Read the MCP deep dive in The Complete Guide to MCP for Email Marketing
  3. Set up safety guardrails with our Best Practices for Autonomous Email Agents
  4. Explore the agent landing page at sequenzy.com/agent for use cases and examples

The setup takes 5 minutes. The time savings compound every day after that.

Further Reading