# An MCP server for your email marketing

Source: https://byomailer.com/mcp-server

![Alejandro Medina](/img/alejandro-medina.png)

Written by [Alejandro Medina](https://amedina.me/), who builds BYOMailer  
Last updated 2026-11-27. The full reference is in the [MCP docs](https://byomailer.com/docs/mcp/overview).

Short answer

Ask Claude how last week's newsletter did, or have it draft next week's. Each BYOMailer instance has an MCP server at `/mcp`. Claude Code, Cursor and Claude Desktop connect with an API token and get 44 tools: stats, drafts, sequences, automations and contacts. The agent writes drafts. Nothing goes live until you say yes.

## What can an agent do with it?

- "How did last week's newsletter do?" The agent reads the delivery, open, click and unsubscribe numbers.
- "Draft the December update for customers in Mexico." The agent reads the filters, counts the audience, writes the draft and sends you a test copy.
- "Build a 3-email onboarding sequence for new users." The agent creates the sequence and its steps as drafts, each with its own delay and filters.
- "Tag everyone who clicked the upgrade link." The agent finds the contacts and updates up to 100 of them in one call.

## How does it keep live campaigns safe?

- **Drafts only.** The create tools save newsletters and sequences as drafts and automations as paused. They have no status argument.
- **Two calls to go live.** To schedule a newsletter or start a sequence or an automation, the first call returns a preview of the change and the contacts it affects. The second call needs `confirm_live`, which the agent sends only after you say yes.
- **Read-only tokens.** A token with the **Read only** access sees only the tools that read data.
- **Your account only.** A token works only for its owner's account, with its owner's role.

## Step 1: Create an API token

1. In BYOMailer, open **Settings, API Tokens**.
2. Type a name for the client, for example `Claude Code`.
3. Choose **Read only** or **Read and write**, and an expiration.
4. Click **Create Token** and copy it. BYOMailer shows it only one time.

The examples below use `https://mail.example.com` as the host of your instance. Use your own host.

## Step 2: Connect your client

### Claude Code

Terminal

```
claude mcp add byomailer \
  --transport http https://mail.example.com/mcp \
  --header "Authorization: Bearer YOUR_API_TOKEN"
```

Then run `claude mcp list` and check that `byomailer` is connected.

### Cursor

Add this entry to the `mcpServers` block of Cursor's MCP config file, then reload the MCP servers.

JSON

```
{
  "mcpServers": {
    "byomailer": {
      "type": "http",
      "url": "https://mail.example.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}
```

### Claude Desktop

Claude Desktop's config file starts only local commands, so it connects through the `mcp-remote` bridge, which needs Node.js. Add this entry to `claude_desktop_config.json` and restart Claude Desktop. The token goes in `env`, because Windows splits arguments at spaces.

JSON

```
{
  "mcpServers": {
    "byomailer": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mail.example.com/mcp",
        "--header",
        "Authorization:${BYOMAILER_AUTH}"
      ],
      "env": {
        "BYOMAILER_AUTH": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}
```

Claude.ai won't work: its custom connectors sign in with OAuth, and the BYOMailer MCP server accepts only an API token. The [client setup docs](https://byomailer.com/docs/mcp/connect-clients) have a curl test and troubleshooting steps.

## The 44 tools

### Newsletters

`list-newsletters-tool`, `newsletter-stats-tool`, `newsletter-content-tool`, `view-newsletter-filters-tool`, `calculate-newsletter-contacts-tool`, `create-newsletter-tool`, `update-newsletter-tool`, `send-newsletter-test-mail-tool`, `schedule-newsletter`

### Sequences

`list-sequences-tool`, `create-sequence-tool`, `update-sequence-tool`, `create-sequence-step-tool`, `update-sequence-step-tool`, `set-sequence-status`, `set-sequence-step-status`, `send-sequence-step-test-mail-tool`, `sequence-stats-tool`, `sequence-content-tool`, `sequence-step-content-tool`, `sequence-step-stats-tool`, `list-sequence-step-contact-mails-tool`, `export-sequence-step-contact-mails-tool`

### Contacts

`find-contact`, `list-contacts`, `create-contact`, `add-contact-to-list`, `add-tags-to-contact`, `remove-contact-from-list`, `bulk-update-contacts`, `create-tag-tool`, `list-contact-mails-tool`, `contact-mail-details-tool`

### Sender identities

`list-email-identities-tool`, `email-identity-details-tool`, `create-email-identity-tool`, `refresh-email-identity-status-tool`, `update-email-identity-tracking-tool`

### Automations

`list-automations`, `automation-details`, `view-automation-options`, `create-automation`, `update-automation`, `set-automation-status`

The [tools reference](https://byomailer.com/docs/mcp/tools-reference) lists the arguments of each tool.

## Questions

### Can an AI agent send a newsletter through BYOMailer by mistake?

The create tools save drafts only, and a new automation starts paused. To schedule a newsletter or make a sequence or an automation live, the agent calls the tool twice. The first call returns a preview. The second call needs confirm\_live set to true, which the agent sends only after you say yes.

### Does the BYOMailer MCP server work with Claude.ai?

No. Claude.ai custom connectors sign in with OAuth, and the BYOMailer MCP server accepts only an API token in the Authorization header. Use Claude Code, Cursor, or Claude Desktop with the mcp-remote bridge.

### Can I give an agent read-only access?

Yes. Create an API token with the Read only access. The server then shows only the tools that read data, such as the list, stats and content tools. A viewer on the team also gets only those tools.

### Is there a rate limit?

Yes. The MCP server accepts 60 requests each minute for each user.

## Keep reading

- [MCP docs](https://byomailer.com/docs/mcp/overview)
- [REST API](https://byomailer.com/docs/api/overview)
- [When not to use BYOMailer](https://byomailer.com/when-not-to-use-byomailer)

## Give your agent an email list

Install BYOMailer, create a token, and your agent can read stats and write drafts. Live campaigns still wait for your yes.

[Install in 1 minute](https://byomailer.com/docs/getting-started/installation-docker) [View on GitHub](https://github.com/amedina068/byomailer)

- No fee per contact
- No account to create
- Your list stays in your database
- Open source, AGPL-3.0

Terminal

```bash
docker run -d --name byomailer -p 8080:8080 -v byomailer:/data ghcr.io/amedina068/byomailer
docker logs -f byomailer
```

Installs in 1 minute, up to your login. Connecting Amazon SES is a separate step, and AWS says it answers a production access request within 96 hours.
