How to Set Up MCP for Email Marketing Step by Step

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:
- Go to sequenzy.com/sign-up
- Create your account with email or GitHub
- Create your first company (this is your sending identity)
- 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/setupThe setup wizard:
- Detects your installed AI tools - It scans for Claude Desktop, Cursor, Windsurf, and Claude Code configurations
- Prompts for your API key - Enter the key from your Sequenzy dashboard
- Writes the MCP configuration - Adds Sequenzy to your AI tool's MCP server list
- 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
- Open Claude Desktop
- Go to Settings (gear icon) > Developer > Edit Config
- Add the Sequenzy MCP server:
{
"mcpServers": {
"sequenzy": {
"command": "npx",
"args": ["-y", "sequenzy"],
"env": {
"SEQUENZY_API_KEY": "your-api-key"
}
}
}
}- Save and restart Claude Desktop
- You should see "sequenzy" in the tools list when starting a new conversation
Cursor
- Open Cursor
- Go to Settings > MCP
- Click "Add MCP Server"
- Or manually edit
.cursor/mcp.jsonin your project root:
{
"mcpServers": {
"sequenzy": {
"command": "npx",
"args": ["-y", "sequenzy"],
"env": {
"SEQUENZY_API_KEY": "your-api-key"
}
}
}
}- Restart Cursor or reload the MCP configuration
Windsurf
- Open Windsurf
- Navigate to Extensions > MCP Configuration
- Add the server configuration:
{
"mcpServers": {
"sequenzy": {
"command": "npx",
"args": ["-y", "sequenzy"],
"env": {
"SEQUENZY_API_KEY": "your-api-key"
}
}
}
}- Restart Windsurf to activate the MCP connection
Claude Code (CLI)
Claude Code supports MCP servers through its configuration:
claude mcp add sequenzy -- npx -y sequenzyOr 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/setupThe 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/setupFor 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 sequenzyThis 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 loginWhen to Use CLI vs MCP
| Use Case | MCP | CLI |
|---|---|---|
| Conversational workflows | Yes | No |
| Content generation | Yes | No |
| Multi-step analysis | Yes | No |
| CI/CD pipeline sends | No | Yes |
| Cron job automation | No | Yes |
| Bulk imports | No | Yes |
| Shell scripts | No | Yes |
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_123Step 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:
- Restart your AI tool completely (not just reload)
- Verify the config file exists in the correct location
- Check that the JSON is valid (no trailing commas, matching brackets)
- Run
npx @sequenzy/setupagain to regenerate the config
"Authentication failed" or "Invalid API key"
Cause: The API key is missing, expired, or incorrect.
Fix:
- Go to your Sequenzy dashboard > Settings > API Keys
- Copy the full API key
- Update the
SEQUENZY_API_KEYin your MCP config - If using environment variables, verify they're set:
echo $SEQUENZY_API_KEY - Restart your AI tool
"Connection refused" or "Server not responding"
Cause: The MCP server process isn't starting.
Fix:
- Verify Node.js is installed:
node --version(need 18+) - Test the MCP server manually:
npx -y sequenzy - Check for firewall or proxy issues
- 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:
- Check your API key's permission scope in the Sequenzy dashboard
- For full MCP access, use a key with read and write permissions
- If you intentionally created a read-only key, some tools (send, create, delete) won't work
CLI Login Issues
If sequenzy login fails:
- Check your internet connection
- Try
sequenzy login --verbosefor detailed error output - If using SSO, ensure your browser can open the authentication URL
- 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:
- Start with read-only operations (analytics, subscriber queries)
- Move to supervised sends (agent drafts, you approve)
- Set daily send limits in your Sequenzy dashboard
- Use a separate sending domain for agent-generated emails initially
- 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:
- Create a shared
.cursor/mcp.jsonin your project repository - Use environment variables for API keys (never commit keys)
- Each team member sets their own
SEQUENZY_API_KEYlocally - 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:
- Try the workflows in our 10 AI Agent Workflows guide - copy-paste prompts for immediate use
- Read the MCP deep dive in The Complete Guide to MCP for Email Marketing
- Set up safety guardrails with our Best Practices for Autonomous Email Agents
- 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
- How AI Agents Are Replacing Email Marketing Dashboards - The paradigm shift in email marketing
- The Complete Guide to MCP for Email Marketing - Protocol deep dive
- 10 AI Agent Workflows That Save Hours - Ready-to-use workflows
- Best Practices for Autonomous Email Agents - Safety and operational guidelines
- AI Agent vs Traditional Email Automation - When to use which approach