Back to Blog

How to Send Email with Hermes Agent and Sequenzy MCP

11 min read

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

  1. Log into your Sequenzy dashboard
  2. Go to Settings > API Keys
  3. Click "Create API Key"
  4. Copy the key (starts with seq_user_)

Or run the setup wizard which handles everything automatically:

npx @sequenzy/setup

Step 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/setup

The 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 npx command 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 sequenzy

The 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 login

Once 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 stats

The 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

ToolWhat It Does
create_campaignCreates a new email campaign
generate_emailAI-generates email content
send_emailSends a campaign to a list or segment
send_test_emailSends a preview to a test address

Managing Subscribers

ToolWhat It Does
add_subscriberAdds a subscriber with attributes and tags
update_subscriberModifies subscriber data
remove_subscriberRemoves a subscriber
search_subscribersFinds subscribers by any criteria
get_subscriber_activityViews engagement history

Sequences & Automation

ToolWhat It Does
generate_sequenceAI-generates a full email sequence
create_sequenceCreates with custom configuration
enable_sequence / disable_sequenceControls activation
get_sequence_statsPerformance metrics

Content & Analytics

ToolWhat It Does
generate_subject_linesAI-generates subject line variations
create_templateSaves reusable templates
get_campaign_statsCampaign performance data
get_statsOverall 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:

  1. Calls generate_email to draft the content with your brand context
  2. Calls send_test_email to preview the result
  3. Calls create_campaign to set up the campaign
  4. Calls send_email to 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:

  1. Calls generate_sequence with the goal description
  2. The MCP server generates 4 emails with subject lines, body copy, delays, and triggers
  3. Agent reviews the output and can iterate ("make email 2 shorter", "add a code example to email 3")
  4. Calls enable_sequence to 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:

  1. Calls get_stats for overall metrics
  2. Calls list_campaigns and get_campaign_stats for each recent campaign
  3. Calls list_sequences and get_sequence_stats for active sequences
  4. 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:

  1. Calls create_segment with inactivity filter
  2. Calls get_segment_count to report the number
  3. Calls generate_email to create a re-engagement email
  4. Calls create_campaign and send_email targeting the segment
  5. After 7 days, calls search_subscribers for non-openers and remove_subscriber for 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:

  1. Detects the Stripe webhook event
  2. Calls get_subscriber to find the customer
  3. Calls generate_email with the payment context
  4. Calls send_email to deliver immediately
  5. 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:

  1. Call send_test_email and verify the email arrives
  2. Check that personalization variables resolved correctly
  3. Verify all links are valid
  4. 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:

AspectHermesOpenClawDirect API
MCP SupportNativeNativeN/A
Autonomous operationStrongStrongManual
Multi-step workflowsBuilt-inBuilt-inCustom code
Content generationVia MCPVia MCPSeparate AI call
Setup complexityLow (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 npx can run sequenzy (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 env configuration
  • Try regenerating the key if it was recently rotated

Slow responses

  • MCP calls involve network latency (200-800ms per call)
  • Complex operations like generate_sequence take 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_subscribers with filters rather than iterating through all subscribers

What's Next

Once your Hermes agent is sending email reliably, consider:

  1. Scheduled reports - Have the agent generate weekly performance summaries
  2. Proactive optimization - Let the agent A/B test subject lines and suggest improvements
  3. Cross-channel coordination - Connect the email agent to your product analytics for behavior-triggered campaigns
  4. 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.