# MoonMail MCP

> MoonMail MCP Server lets you manage your entire email marketing stack—from building subscriber lists to launching campaigns and checking stats—all through natural conversation with your AI agent. Stop jumping between dashboards; run analytics, segment audiences, and send newsletters directly from Claude or Cursor.

## Overview
- **Category:** marketing-automation
- **Price:** Free
- **Tags:** newsletter-campaigns, subscriber-management, email-analytics, audience-segmentation, campaign-delivery, marketing-automation

## Description

You connect MoonMail to your AI client and manage your entire email marketing stack right there in your chat window. You don't have to hop between dashboards; you just talk to your agent and get the job done.

*Building and Managing Lists*
Your agent lets you see all the mailing lists you keep, running `list_lists` gives you a summary of every group and how many folks are signed up. If you need targeted sends, you can use it to list defined audience segments with `list_segments`. You'll find that if you ask your agent for subscribers in a specific segment or list, it pulls those names using `list_subscribers`. Need to get a new contact added? Just tell it to run `add_subscriber`, and it adds a single person right into an existing MoonMail list.

*Drafting and Sending Campaigns*
You can check the status of every campaign you've ever created by having your agent run `list_campaigns`. For drafting, you simply ask it to `create_campaign`, and it initializes a brand-new email campaign in your account for you to review later. When you're ready to hit 'send,' you tell your agent to execute the `send_campaign` tool, launching the active email immediately to the audience you specify.

*Tracking Performance Data*
Don't waste time manually checking stats. To see how well a past or active campaign did, ask your agent for `get_campaign_stats`; it fetches all the key numbers like open rates and click-through rates. For deep dives into user behavior, you can run `get_events`, which pulls detailed records of specific actions—you'll know exactly who opened what and clicked on which links.

*Targeting Specific Recipients*
When you need to verify outreach scope, the agent runs `list_campaign_recipients` and finds the exact list of individual email addresses that received a specific campaign ID. You can also get a complete roster of everyone who got an email by listing all recipients associated with a particular campaign ID.

This means your AI agent handles everything: you ask it to build out your lists, check on your segments, draft up the content, send the final blast, and then instantly pulls the performance data for every single campaign. It’s one conversation handling your entire marketing flow.

## Tools

### add_subscriber
Adds a single person to an existing subscriber list in MoonMail.

### create_campaign
Drafts and initializes a new email campaign within your MoonMail account for later review.

### get_campaign_stats
Retrieves key performance numbers (opens, clicks) for any past or active campaign ID.

### get_events
Pulls detailed analytics records showing specific user actions and tracking events from campaigns.

### list_campaign_recipients
Fetches the complete list of individual email addresses that received a particular campaign ID.

### list_campaigns
Lists all campaigns you have created in MoonMail and shows their current status (draft, sent, etc.).

### list_subscribers
Retrieves a list of members belonging to a specific subscriber list or segment name.

### list_lists
Shows a summary of every mailing list you maintain and how many subscribers are currently on it.

### list_segments
Lists all defined audience segments, allowing you to see which groups exist for targeted sends.

### send_campaign
Sends an active email campaign immediately to the audience you specify in MoonMail.

## Prompt Examples

**Prompt:** 
```
List all my email campaigns and their status.
```

**Response:** 
```
I've retrieved your campaigns. You have 4 active campaigns: 'Weekly Newsletter' (Status: Sent), 'Summer Promo' (Status: Draft), and 2 others. Would you like to see the engagement stats for the Weekly Newsletter?
```

**Prompt:** 
```
How is my 'New Feature Announcement' campaign performing?
```

**Response:** 
```
Fetching stats for 'New Feature Announcement' (ID: cmp_123)... The campaign has a 32% open rate and a 5.4% click-through rate so far. Would you like to see the list of recipients who clicked the primary link?
```

**Prompt:** 
```
Add alex@example.com to the 'VIP Customers' list.
```

**Response:** 
```
Subscribing contact... I've successfully added alex@example.com to your 'VIP Customers' list (ID: lst_987). They are now ready to receive future campaigns sent to this list.
```

## Capabilities

### Build and manage subscriber lists
The agent lets you list all mailing groups, view current subscribers in segments, or add new contacts instantly.

### Draft and schedule email campaigns
You can use the tool to create a draft campaign, then trigger its delivery to any defined audience right from your chat.

### Track campaign performance data
The agent fetches key metrics like open rates and click-through rates for specific campaigns you run.

### Analyze subscriber engagement events
You retrieve detailed analytics, pulling records of actual user behavior—who opened it and what links they clicked.

### Identify campaign recipients
The agent finds the exact list of individual people who received a specific campaign ID, helping you track outreach.

## Use Cases

### Need to check performance after a big launch
A marketer just sent out a 'Product X Launch' email. Instead of logging into MoonMail and clicking through three pages, they ask their agent: 'What are the stats for Product X?' The agent runs `get_campaign_stats` and reports back the open rate and click-through rate immediately.

### Targeting a super specific group of users
A growth manager needs to re-engage only 'VIP Customers' who haven't opened an email in 30 days. They ask the agent to `list_segments` and filter, getting back the precise list of IDs needed before running a targeted send.

### Onboarding new leads quickly
A sales rep collects emails from a trade show roster. Instead of manually entering each address into MoonMail, they prompt their agent: 'Add these 50 contacts to the 'Trade Show Leads' list.' The agent calls `add_subscriber` for every contact.

### Verifying who got an old email
The team suspects a few key accounts didn't receive last week's update. Instead of checking the general recipient list, they use `list_campaign_recipients` with the specific campaign ID to confirm every single address hit.

## Benefits

- Saves time by eliminating dashboard hopping. Instead of visiting MoonMail to check stats, you just ask your agent for `get_campaign_stats` and get the numbers instantly.
- Ensures accurate targeting. Before sending, you can use `list_segments` to verify which audience groups exist, preventing accidental mass sends to the wrong people.
- Streamlines list growth. When a new lead comes in, you don't copy/paste; you just ask your agent to `add_subscriber`, and it handles the connection instantly.
- Full campaign lifecycle control. You can draft (`create_campaign`), review recipients (`list_campaign_recipients`), and deploy (`send_campaign`) all within a single conversation thread.
- Deep analytics access. The `get_events` tool goes beyond simple open rates, giving you granular data on actual user interactions that inform your next campaign.

## How It Works

The bottom line is that your AI client acts as a universal command center for all things email marketing.

1. Subscribe to the MoonMail MCP Server and enter your API key.
2. Ask your AI client (Claude, Cursor, etc.) to perform an action, like 'list my campaigns' or 'add a new subscriber'.
3. The agent calls the correct tool, retrieves the data from MoonMail, and delivers it back to you in plain language.

## Frequently Asked Questions

**How do I use MoonMail MCP Server to see campaign stats?**
You ask your agent for the stats using `get_campaign_stats`. You just need to give it the Campaign ID, and the server returns key performance metrics like opens and clicks.

**Can I add subscribers with MoonMail MCP Server?**
Yes. Just tell your agent which email you want added and which list they belong on. It runs the `add_subscriber` tool for you.

**Does MoonMail MCP Server handle segments?**
Absolutely. You can use `list_segments` to see all your defined groups, and then use those segments when calling other tools like `send_campaign`.

**What is the difference between list_subscribers and list_segments?**
Use `list_lists` first to see all physical lists. Then use `list_subscribers` on a specific list or segment ID for the member roster.

**How do I check who received an email with MoonMail MCP Server?**
You run `list_campaign_recipients`, providing the campaign ID. This gives you the definitive, individual list of every address that got the message.

**How does MoonMail MCP Server handle authentication when I use the `list_campaigns` tool?**
You authenticate using your dedicated MoonMail API key. Your AI client must pass this secure key to the server endpoint before making any calls, ensuring that only authorized agents can read or manage campaign data.

**If I use the `send_campaign` tool and it fails, how do I retrieve error details?**
The agent returns a detailed JSON object containing an error code and a message. Check this output immediately; it usually specifies if the campaign failed due to incorrect formatting or API limits.

**When using `add_subscriber`, what specific IDs must I provide to ensure the contact lands in the correct list?**
You need two primary pieces of information: the subscriber's email address and the unique ID for their target mailing list. Providing both ensures the contact is added accurately.

**How do I get a MoonMail API Key?**
Log in to MoonMail and navigate to Settings > API Keys to generate your key. This token is required for all API operations.

**Can I send a campaign through this server?**
Yes! Use the `send_campaign` tool with a valid Campaign ID to trigger the delivery process.

**How do I see how many people opened my email?**
Use the `get_campaign_stats` tool with the Campaign ID to retrieve the open rate, click rate, and other engagement metrics.