Skip to main content
Glama
pauliowest

Campaign Monitor MCP

by pauliowest
README.md
# Campaign Monitor MCP

A [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server that wraps the full [Campaign Monitor REST API v3.3](https://www.campaignmonitor.com/api/), giving Claude the ability to manage email campaigns, subscriber lists, journeys, segments, transactional email, and more via natural language.

## Quick install (Mac)

Open **Terminal** and run:

```bash
curl -fsSL https://raw.githubusercontent.com/pauliowest/cmon-mcp/main/install.sh | bash
```

The script will:
1. Check you have Node.js 18+ and Git (and tell you how to install them if not)
2. Download this repo to `~/claude-tools/cmon-mcp`
3. Build the server
4. Ask for your Campaign Monitor API key
5. Add the server to Claude Desktop automatically

Then **quit and relaunch Claude Desktop** — Campaign Monitor will appear as a connected integration.

> **API key:** find yours in Campaign Monitor under Account Settings → API Keys.  
> **Agency accounts:** leave the Client ID blank — the server discovers all your clients automatically at startup.

---

## Features

**113 tools covering the complete Campaign Monitor API:**

- 📧 **Campaigns** — create, send, schedule, preview, and pull stats (opens, clicks, bounces, spam)
- 👥 **Subscribers** — add, update, import in bulk, unsubscribe, delete, view history
- 📋 **Lists** — full CRUD, custom fields, webhooks, subscriber state queries
- 🔀 **Segments** — create and manage rule-based segments, query matching subscribers
- 🤖 **Journeys** — list automations, view per-email stats, publish trigger events
- 📄 **Templates** — create, update, copy templates across clients
- ⚡ **Transactional** — send classic and smart emails, view message timeline and stats
- 🏢 **Clients** — manage clients, people, suppression lists, sending domains, billing
- ⚙️ **Account** — admins, billing details, primary contact, timezones

## Requirements

- Node.js 18+
- A [Campaign Monitor API key](https://help.campaignmonitor.com/api-keys)

## Manual installation

If you prefer to set things up yourself:

1. Clone this repo and install dependencies:

```bash
git clone https://github.com/pauliowest/cmon-mcp.git
cd cmon-mcp
npm install
npm run build
```

2. Add to your `claude_desktop_config.json` (found at `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):

```json
{
  "mcpServers": {
    "Campaign Monitor": {
      "command": "node",
      "args": ["/path/to/cmon-mcp/dist/index.js"],
      "env": {
        "CM_API_KEY": "your_api_key_here",
        "CM_CLIENT_ID": ""
      }
    }
  }
}
```

3. Restart Claude Desktop.

## Environment Variables

| Variable | Required | Description |
|---|---|---|
| `CM_API_KEY` | ✅ | Your Campaign Monitor API key |
| `CM_CLIENT_ID` | Optional | Default client ID — tools fall back to this when no client is specified explicitly |

## Development

```bash
npm run build      # compile TypeScript → dist/
npm run dev        # watch mode
npm run inspector  # open MCP Inspector UI for manual tool testing
```

## Architecture

```
src/
  index.ts              # Entry point — wires up MCP server + stdio transport
  client.ts             # CampaignMonitorClient — all HTTP + Basic Auth
  tools/
    account.ts          # 11 tools — billing, admins, timezones
    campaigns.ts        # 17 tools — CRUD, send, stats
    clients.ts          # 19 tools — client management, people, domains
    journeys.ts         # 8 tools  — automations + stats
    lists.ts            # 20 tools — CRUD, custom fields, webhooks
    segments.ts         # 7 tools  — rule-based segments
    subscribers.ts      # 7 tools  — add, import, manage
    templates.ts        # 5 tools  — template management
    transactional.ts    # 9 tools  — classic + smart email
```

## License

MIT

TDQS

B3/5.0

Scored across 113 tools

Disambiguation5/5

Each tool targets a distinct resource and action, with clear descriptions that differentiate them. For example, bounce, click, open, and unsubscribe stats are separated per campaign or journey, avoiding ambiguity.

Naming Consistency3/5

Most tools use verb_noun pattern, but verbs are inconsistent: 'get' vs 'list' for similar operations (e.g., 'get_lists' vs 'list_campaigns'), and 'add' vs 'create' (e.g., 'add_subscriber' vs 'create_campaign'). This reduces predictability.

Tool Count1/5

With 113 tools, the count far exceeds the typical well-scoped range (3-15). Even for a full API, this is overwhelming and likely to cause confusion or tool selection errors.

Completeness5/5

The tool set covers all major Campaign Monitor features: clients, lists, subscribers, campaigns, journeys, templates, webhooks, sending domains, admins, billing, transactional email, and more. No obvious gaps in lifecycle or reporting.

Maintenance

ActivityInactive
ResponsivenessNo issues