How to Send Email with Hermes Agent and Sequenzy MCP

Hermes is an autonomous agent framework that lets you build agents capable of reasoning, planning, and executing multi-step tasks. One of the most valuable capabilities you can give a Hermes agent is email marketing - the ability to send campaigns, manage subscribers, build sequences, and analyze performance.
This guide walks you through connecting Hermes to Sequenzy via MCP, from initial setup to production-ready email workflows.
Why Hermes + Sequenzy
Hermes agents are designed for autonomous operation. They reason about goals, break them into steps, and execute using available tools. Email marketing is a natural fit because it involves:
- Multi-step workflows - Creating a campaign requires drafting content, selecting an audience, configuring settings, and scheduling. Hermes excels at chaining these steps.
- Data-driven decisions - Hermes agents can analyze subscriber data, engagement metrics, and past performance to make informed decisions about what to send and when.
- Repetitive operations - Monthly newsletters, onboarding sequences, performance reports - these are exactly the tasks Hermes agents automate best.
Sequenzy's MCP server exposes 40+ email marketing tools that Hermes can call natively. No custom API wrapper needed.
Setup
Prerequisites
- A Hermes agent environment set up and running
- A Sequenzy account (sign up free)
- Node.js installed (for the MCP server)
Step 1: Create a Sequenzy API Key
- Log into your Sequenzy dashboard
- Go to Settings > API Keys
- Click "Create API Key"
- Copy the key (starts with
seq_user_)
Or run the setup wizard which handles everything automatically:
npx @sequenzy/setupStep 2: Configure the MCP Server
Add Sequenzy as an MCP server in your Hermes configuration:
{
"mcpServers": {
"sequenzy": {
"command": "npx",
"args": ["-y", "sequenzy"],
"env": {
"SEQUENZY_API_KEY": "seq_user_your_key_here"
}
}
}
}Or if you're using the CLI setup approach:
npx @sequenzy/setupThe setup wizard detects your environment and configures the MCP connection automatically.
Step 3: Verify the Connection
Once configured, your Hermes agent should see Sequenzy's tools. Test with a simple query:
"What's my current subscriber count?"
If the agent returns a number, the connection is working. If it fails, check:
- API key is valid and not expired
- The
npxcommand is available in your PATH - Network connectivity to Sequenzy's API
Step 4: Install the Sequenzy Skill
For agents that support the skills ecosystem, install the Sequenzy skill to give your Hermes agent a versioned workflow guide instead of relying on ad hoc prompting:
npx skills add Sequenzy/skills --skill sequenzyThe skill teaches your agent how to authenticate, manage subscribers, send emails, read stats, and recognize when a workflow should move to the dashboard or API. It's a stable command reference your agent can rely on.
Step 5: Install the Sequenzy CLI
The Sequenzy CLI gives your Hermes agent direct terminal access to email operations - useful for scripted workflows, CI/CD pipelines, or when your agent prefers shell commands over MCP tool calls:
npm install -g @sequenzy/cli
sequenzy loginOnce authenticated, your agent can run commands directly:
# Add a subscriber
sequenzy subscribers add user@example.com --tag premium --attr name=John
# Send a transactional email
sequenzy send user@example.com --template welcome --var name=John
# List campaigns
sequenzy campaigns list
# Check stats
sequenzy account statsThe CLI is particularly valuable for Hermes agents that chain email operations into shell scripts or integrate with deployment pipelines. For example, your agent can run sequenzy send as part of a post-deploy script to announce new features automatically.
MCP vs CLI: Use MCP tools when your agent needs to reason about email operations within a conversation (content generation, multi-step workflows). Use the CLI when your agent executes email commands as part of scripted automation (CI/CD, cron jobs, batch operations).
Available Tools
Your Hermes agent now has access to these MCP tools:
Sending Email
| Tool | What It Does |
|---|---|
create_campaign | Creates a new email campaign |
generate_email | AI-generates email content |
send_email | Sends a campaign to a list or segment |
send_test_email | Sends a preview to a test address |
Managing Subscribers
| Tool | What It Does |
|---|---|
add_subscriber | Adds a subscriber with attributes and tags |
update_subscriber | Modifies subscriber data |
remove_subscriber | Removes a subscriber |
search_subscribers | Finds subscribers by any criteria |
get_subscriber_activity | Views engagement history |
Sequences & Automation
| Tool | What It Does |
|---|---|
generate_sequence | AI-generates a full email sequence |
create_sequence | Creates with custom configuration |
enable_sequence / disable_sequence | Controls activation |
get_sequence_stats | Performance metrics |
Content & Analytics
| Tool | What It Does |
|---|---|
generate_subject_lines | AI-generates subject line variations |
create_template | Saves reusable templates |
get_campaign_stats | Campaign performance data |
get_stats | Overall account statistics |
Practical Workflows
Workflow 1: Send a Product Update Email
This is the most common use case - your Hermes agent ships a feature and announces it via email.
Give your agent this goal:
"Send a product update email to all active subscribers. We just launched webhook support for real-time event notifications. Highlight that it works with Stripe, Shopify, and custom events. Include a code example."
What the agent does:
- Calls
generate_emailto draft the content with your brand context - Calls
send_test_emailto preview the result - Calls
create_campaignto set up the campaign - Calls
send_emailto send to all active subscribers
Time saved: ~30 minutes vs doing it manually in a dashboard.
Workflow 2: Build an Onboarding Sequence
"Create a 4-email onboarding sequence for new free trial users. Focus on getting them to complete their first API integration. Space emails 2 days apart. Start with a welcome email and end with a trial expiration reminder."
What the agent does:
- Calls
generate_sequencewith the goal description - The MCP server generates 4 emails with subject lines, body copy, delays, and triggers
- Agent reviews the output and can iterate ("make email 2 shorter", "add a code example to email 3")
- Calls
enable_sequenceto activate
Workflow 3: Weekly Performance Report
Set up a recurring task where your Hermes agent generates a performance summary:
"Every Monday, check last week's email metrics. Report: total sent, average open rate, best campaign, and any sequences with declining engagement."
What the agent does:
- Calls
get_statsfor overall metrics - Calls
list_campaignsandget_campaign_statsfor each recent campaign - Calls
list_sequencesandget_sequence_statsfor active sequences - Compiles a summary with highlights and action items
Workflow 4: Subscriber Cleanup
"Find all subscribers who haven't opened an email in 90 days. Create a segment for them. Send a final re-engagement email. If they don't open within 7 days, remove them."
What the agent does:
- Calls
create_segmentwith inactivity filter - Calls
get_segment_countto report the number - Calls
generate_emailto create a re-engagement email - Calls
create_campaignandsend_emailtargeting the segment - After 7 days, calls
search_subscribersfor non-openers andremove_subscriberfor each
Workflow 5: Event-Driven Transactional Emails
Your Hermes agent can respond to business events in real-time:
"When a Stripe payment fails, send a dunning email to the customer. Include the amount, last 4 digits of the card, and a link to update payment. If they don't pay within 3 days, send a follow-up."
What the agent does:
- Detects the Stripe webhook event
- Calls
get_subscriberto find the customer - Calls
generate_emailwith the payment context - Calls
send_emailto deliver immediately - Schedules a follow-up check in 3 days
Guardrails and Best Practices
Send Limits
Configure your Hermes agent with sending guardrails:
- Daily cap: Limit total emails per day (start with 1,000, increase as you build trust)
- Segment threshold: Require human approval for sends to segments larger than 500 subscribers
- Test-first policy: Always send a test email before any campaign
Content Validation
Before your agent sends, it should:
- Call
send_test_emailand verify the email arrives - Check that personalization variables resolved correctly
- Verify all links are valid
- Confirm the subject line length is under 60 characters
Audit Trail
Every MCP tool call is logged in your Sequenzy dashboard. You can see:
- What the agent created, when, and with what parameters
- Email content generated by the agent
- Send operations with delivery stats
- Subscriber modifications
This audit trail is essential for GDPR compliance and debugging.
Separate Sending Domain
Until you're confident in your agent's output quality, use a separate sending domain for agent-generated emails. This protects your primary domain's reputation while you validate the agent's work.
Hermes vs. Other Agent Frameworks
If you're evaluating agent frameworks for email marketing, here's how Hermes compares:
| Aspect | Hermes | OpenClaw | Direct API |
|---|---|---|---|
| MCP Support | Native | Native | N/A |
| Autonomous operation | Strong | Strong | Manual |
| Multi-step workflows | Built-in | Built-in | Custom code |
| Content generation | Via MCP | Via MCP | Separate AI call |
| Setup complexity | Low (MCP config) | Low (MCP config) | High (custom integration) |
Both Hermes and OpenClaw work well with Sequenzy's MCP server. The choice between them depends on your broader agent architecture, not the email integration. For more on how AI agents are transforming email marketing, see our agent landing page and the guide on how AI agents are replacing dashboards.
Debugging Common Issues
"Tool not found" errors
Your Hermes agent can't see Sequenzy's tools:
- Verify the MCP server configuration is correct
- Restart your Hermes environment after config changes
- Check that
npxcan runsequenzy(try manually:npx -y sequenzy)
Authentication failures
- Verify your API key in the Sequenzy dashboard (Settings > API Keys)
- Check the key is set in the MCP server's
envconfiguration - Try regenerating the key if it was recently rotated
Slow responses
- MCP calls involve network latency (200-800ms per call)
- Complex operations like
generate_sequencetake 3-5 seconds - Large subscriber searches may take longer - use specific filters
Rate limiting
Sequenzy's API handles agent-speed access well, but if you're chaining many operations:
- The agent should naturally pause between operations
- Batch subscriber updates when possible
- Use
search_subscriberswith filters rather than iterating through all subscribers
What's Next
Once your Hermes agent is sending email reliably, consider:
- Scheduled reports - Have the agent generate weekly performance summaries
- Proactive optimization - Let the agent A/B test subject lines and suggest improvements
- Cross-channel coordination - Connect the email agent to your product analytics for behavior-triggered campaigns
- Autonomous sequences - Let the agent create and optimize sequences based on conversion data
The combination of Hermes's autonomous capabilities and Sequenzy's full email marketing toolkit gives you a system that handles the repetitive work of email marketing while you focus on strategy.
For a broader look at AI agent workflows for email marketing, check our dedicated guide with 10 copy-paste workflows.
Get started with Sequenzy and connect your Hermes agent today.