@iterable/mcp 1.4.2 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Greg Methvin
3
+ Copyright (c) 2025-2026 Iterable, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -44,35 +44,77 @@ By default, the setup wizard configures the server in a safe, read‑only mode (
44
44
  npx @iterable/mcp setup --advanced
45
45
  ```
46
46
 
47
- What you’ll choose (optional):
48
- - Enable access to user PII (`ITERABLE_USER_PII`)
49
- - Enable writes (create/update/delete actions) (`ITERABLE_ENABLE_WRITES`)
50
- - Enable sends (campaigns/journeys/events) (`ITERABLE_ENABLE_SENDS`) — requires writes
47
+ What you'll choose (optional):
48
+ - **User PII** (`ITERABLE_USER_PII`): access user profile data, including email addresses, phone numbers, and custom data fields.
49
+ - **Writes** (`ITERABLE_ENABLE_WRITES`): create, update, and delete resources such as templates, lists, catalogs, campaigns, snippets, and user profiles.
50
+ - **Sends** (`ITERABLE_ENABLE_SENDS`): send messages (email, SMS, push, in-app, WhatsApp), trigger campaigns and journeys, schedule and abort campaigns, and track events. Requires writes to be enabled. *Note: creating a blast campaign will schedule it for delivery, matching the behavior of the underlying Iterable API; there is no way to create a draft campaign. If you only need to draft content, you can do so with sends disabled by working with templates instead.*
51
51
 
52
- Safety notes:
53
- - Enabling sends requires writes to be enabled.
54
- - Permission settings are saved per key (see key management section below).
55
- - Prompts are generated from read‑only tools for extra safety.
52
+ **IMPORTANT: Enabling writes and sends allows the AI agent to take real, potentially irreversible actions against your Iterable project, including sending messages to real users and deleting data. If you do not have the technical knowledge to properly review the agent's tool calls before they are executed, you should avoid enabling these flags, especially in production environments. It is entirely your choice to accept this risk. If you enable these capabilities, it is your responsibility to carefully review each action before allowing the agent to proceed.**
56
53
 
57
- ## Prefer a global install?
54
+ Note that permission settings are saved per key (see key management section below), allowing you to enable different permissions for different projects, e.g. only enable writes and sends for a sandbox project and disable them in production.
55
+
56
+ ## What you can do
57
+
58
+ See the [available tools](TOOLS.md) for all tools with descriptions. All tools map directly to [Iterable API endpoints](https://api.iterable.com/api/docs).
59
+
60
+ Try these prompts:
61
+ - *"Get details on campaign 12345"*
62
+ - *"What email templates are available?"*
63
+ - *"Show me all my product catalogs"*
64
+ - *"What journeys are currently active?"*
65
+ - *"Show me events for user@example.com from the last 30 days"*
66
+ - *"Create a campaign called 'Holiday Sale' using template 456"*
67
+ - *"Export all user data from January 2024"*
68
+ - *"List users in my 'VIP Customers' list"*
69
+
70
+ ## API Key Management
71
+
72
+ **Key Storage:**
73
+
74
+ API keys are stored in the `~/.iterable-mcp/keys.json` file and managed via the `npx @iterable/mcp keys` commands. On macOS the actual API key values are stored in the system Keychain. On Windows, API key values are encrypted using the Windows Data Protection API (DPAPI). On Linux, the API key values are stored directly in the file with restricted permissions (0o600).
75
+
76
+ Each key is tied to its API endpoint (US, EU, or custom) and to its permissions (view PII, write operations, send messages).
77
+
78
+ **How Key Selection Works:**
79
+ - You can store multiple API keys with different names (e.g., "production", "staging", "dev")
80
+ - Only ONE key is marked as **active** at a time
81
+ - The MCP server automatically uses whichever key is currently active
82
+ - Your first key is automatically set as active
83
+ - Switch between keys using the `activate` command
58
84
 
59
85
  ```bash
60
- pnpm add -g @iterable/mcp
61
- iterable-mcp setup
86
+ # List stored keys (shows which one is active with ● ACTIVE badge)
87
+ npx @iterable/mcp keys list
88
+
89
+ # Add a new key (interactive: prompts for name, region/endpoint, and API key)
90
+ # Your first key becomes active automatically
91
+ npx @iterable/mcp keys add
92
+
93
+ # Switch to a different key by name or ID (also switches endpoint)
94
+ npx @iterable/mcp keys activate production
95
+ npx @iterable/mcp keys activate staging
96
+
97
+ # Update an existing key (interactive: prompts for new values)
98
+ npx @iterable/mcp keys update <name-or-id>
99
+
100
+ # Delete a key by ID (requires ID for safety)
101
+ # Note: Cannot delete the currently active key - activate another first
102
+ npx @iterable/mcp keys delete <key-id>
62
103
  ```
63
104
 
64
- **Note:** The setup command automatically configures the correct command path.
105
+ ## Advanced setup
65
106
 
66
- Throughout this guide, commands are shown as `iterable-mcp` for brevity. If not globally installed, use `npx @iterable/mcp` instead (e.g., `npx @iterable/mcp keys list`).
107
+ ### Prefer a global install?
67
108
 
68
- ### Install from source
109
+ If you'd rather not use `npx`, you can install globally. This lets you use `iterable-mcp` as a shorthand for `npx @iterable/mcp`.
69
110
 
70
111
  ```bash
71
- git clone https://github.com/iterable/mcp-server.git
72
- cd mcp-server
73
- pnpm install-dev:cursor # or install-dev:claude-desktop, install-dev:claude-code, or install-dev:gemini-cli
112
+ pnpm add -g @iterable/mcp
113
+ iterable-mcp setup
74
114
  ```
75
115
 
116
+ **Note:** The setup command automatically configures the correct command path.
117
+
76
118
  ### Claude Code
77
119
 
78
120
  The `setup --claude-code` command automatically configures Claude Code by running `claude mcp add` for you.
@@ -80,20 +122,14 @@ The `setup --claude-code` command automatically configures Claude Code by runnin
80
122
  Alternatively, you can configure it manually:
81
123
 
82
124
  ```bash
83
- # Add your API key first (see API Key Management section below)
84
- iterable-mcp keys add
125
+ # Add your API key first (see API Key Management section above)
126
+ npx @iterable/mcp keys add
85
127
 
86
128
  # Then configure Claude Code
87
129
  claude mcp add iterable -- npx -y @iterable/mcp
88
130
 
89
131
  # Verify it was added
90
132
  claude mcp list
91
-
92
- # Optional: Configure privacy settings
93
- claude mcp add iterable \
94
- --env ITERABLE_USER_PII=false \
95
- --env ITERABLE_ENABLE_WRITES=false \
96
- -- npx -y @iterable/mcp
97
133
  ```
98
134
 
99
135
  If you have already configured Claude Desktop successfully, you can run this command to copy your MCP server settings to Claude Code:
@@ -120,7 +156,7 @@ All five use the same configuration format:
120
156
  **Recommended: Using key manager:**
121
157
  ```bash
122
158
  # First, add your API key (interactive prompts)
123
- iterable-mcp keys add
159
+ npx @iterable/mcp keys add
124
160
  ```
125
161
 
126
162
  Then edit your config file:
@@ -181,69 +217,19 @@ Alternatively, you can manually edit your configuration file (after adding your
181
217
 
182
218
  No `env` section is needed if using the key manager.
183
219
 
184
- ## What you can do
185
-
186
- See [TOOLS.md](TOOLS.md) for all available tools with descriptions. All tools map directly to [Iterable API endpoints](https://api.iterable.com/api/docs).
187
-
188
- Try these prompts:
189
- - *"How many campaigns do I have running?"*
190
- - *"Get details on campaign 12345"*
191
- - *"Show me events for user@example.com from the last 30 days"*
192
- - *"Create a campaign called 'Holiday Sale' using template 456"*
193
- - *"What email templates are available?"*
194
- - *"Export all user data from January 2024"*
195
- - *"List users in my 'VIP Customers' list"*
196
- - *"Show me all my product catalogs"*
197
- - *"What journeys are currently active?"*
198
- - *"Send a welcome email to new-user@company.com"*
199
-
200
- ## Configuration & security
201
-
202
- ### API Key Management
203
-
204
- **Key Storage:**
205
-
206
- API keys are stored in the `~/.iterable-mcp/keys.json` file and managed via the `iterable-mcp keys` commands. On macOS the actual API key values are stored in the system Keychain. On Linux, the API key values are stored directly in the file with restricted permissions (0o600). On Windows, the file is protected by default NTFS home directory permissions.
207
-
208
- Each key is tied to its API endpoint (US, EU, or custom) and to its permissions (view PII, write operations, send messages).
209
-
210
- **How Key Selection Works:**
211
- - You can store multiple API keys with different names (e.g., "production", "staging", "dev")
212
- - Only ONE key is marked as **active** at a time
213
- - The MCP server automatically uses whichever key is currently active
214
- - Your first key is automatically set as active
215
- - Switch between keys using the `activate` command
216
-
217
- ```bash
218
- # List stored keys (shows which one is active with ● ACTIVE badge)
219
- iterable-mcp keys list
220
-
221
- # Add a new key (interactive: prompts for name, region/endpoint, and API key)
222
- # Your first key becomes active automatically
223
- iterable-mcp keys add
224
-
225
- # Switch to a different key by name or ID (also switches endpoint)
226
- iterable-mcp keys activate production
227
- iterable-mcp keys activate staging
228
-
229
- # Delete a key by ID (requires ID for safety)
230
- # Note: Cannot delete the currently active key - activate another first
231
- iterable-mcp keys delete <key-id>
232
-
233
- # To update a key: delete the old one and add a new one with the same name
234
- ```
235
-
236
220
  ### Environment variables
237
221
 
238
- | Variable | Required | Description |
239
- |----------|----------|-------------|
240
- | `ITERABLE_API_KEY` | No* | Your Iterable API key (*Optional if using key manager, otherwise required) |
241
- | `ITERABLE_BASE_URL` | No** | Base URL for the Iterable API (**Not needed when using key manager - URL is stored with each key) |
242
- | `ITERABLE_DEBUG` | No | Set to `true` for API request logging |
243
- | `LOG_LEVEL` | No | Set to `debug` for troubleshooting |
244
- | `ITERABLE_USER_PII` | No | Set to `true` to enable tools that access user PII data (default: `false`) |
245
- | `ITERABLE_ENABLE_WRITES` | No | Set to `true` to enable tools that perform write operations (default: `false`) |
246
- | `ITERABLE_ENABLE_SENDS` | No | Set to `true` to enable tools that can send messages (default: `false`). Requires writes to be enabled |
222
+ Variables marked as **managed** are automatically configured by the key manager. They take precedence over environment variables when both are present. Setting environment variables directly is useful for CI/CD pipelines, Docker containers, or other non-interactive environments where the key manager isn't available.
223
+
224
+ | Variable | Managed | Description |
225
+ |----------|-------------|-------------|
226
+ | `ITERABLE_API_KEY` | ✅ | Your Iterable API key. Required if not using key manager |
227
+ | `ITERABLE_BASE_URL` | ✅ | Base URL for the Iterable API (default: `https://api.iterable.com`) |
228
+ | `ITERABLE_USER_PII` | ✅ | Set to `true` to enable tools that access user PII data (default: `false`) |
229
+ | `ITERABLE_ENABLE_WRITES` | ✅ | Set to `true` to enable tools that perform write operations (default: `false`) |
230
+ | `ITERABLE_ENABLE_SENDS` | ✅ | Set to `true` to enable tools that can send messages (default: `false`). Requires writes to be enabled |
231
+ | `ITERABLE_DEBUG` | | Set to `true` for API request logging |
232
+ | `LOG_LEVEL` | | Set to `debug` for troubleshooting |
247
233
 
248
234
  ### Custom endpoints
249
235
 
@@ -253,117 +239,65 @@ iterable-mcp keys delete <key-id>
253
239
  - Not allowed: plain `http://` on non-local hosts (use `https://` instead)
254
240
  - When a non-`*.iterable.com` domain is provided, the CLI will ask for confirmation.
255
241
 
256
- ## Development
257
-
258
- ### Running tests
259
-
260
- The project includes both unit and integration tests:
261
-
262
- ```bash
263
- # Run all tests
264
- pnpm test
265
-
266
- # Run only unit tests (no API key required)
267
- pnpm test:unit
268
-
269
- # Run only integration tests (requires valid API key)
270
- pnpm test:integration
271
- ```
272
-
273
- ### Integration tests
274
-
275
- Integration tests make real API calls to Iterable and require a valid API key.
276
-
277
- **Setup:**
278
-
279
- 1. Set your API key as an environment variable:
280
- ```bash
281
- export ITERABLE_API_KEY=your_actual_api_key
282
- ```
283
-
284
- 2. Or add a key to key manager (interactive):
285
- ```bash
286
- iterable-mcp keys add
287
- ```
288
-
289
- **Note:** The key name can be anything (e.g., "dev", "test", "staging"). The system automatically uses whichever key is marked as **active**. Your first key is automatically set as active. If you have multiple keys, use `iterable-mcp keys activate <name>` to switch between them.
290
-
291
- 3. Run the integration tests:
292
- ```bash
293
- pnpm test:integration
294
- ```
295
-
296
- **Note:** Integration tests require a valid API key (env var or active key manager key). The suite fails fast if none is found.
297
-
298
- ### Development workflow
299
-
300
- ```bash
301
- # Install dependencies
302
- pnpm install
303
-
304
- # Build the project
305
- pnpm build
306
-
307
- # Build and watch for changes
308
- pnpm build:watch
309
-
310
- # Run in development mode
311
- pnpm dev
312
-
313
- # Install locally for testing
314
- pnpm run install-dev
315
- ```
316
-
317
242
  ## Troubleshooting
318
243
 
319
- - Claude CLI missing: install `claude` CLI, then re-run `iterable-mcp setup --claude-code`.
244
+ - Claude CLI missing: install `claude` CLI, then re-run `npx @iterable/mcp setup --claude-code`.
320
245
  - macOS Keychain issues: Ensure Keychain is accessible and re-run setup if needed.
321
246
 
322
247
  ### Client-specific limitations
323
248
 
324
249
  #### Windsurf (Codeium)
325
250
 
326
- **Tool limit:** Windsurf has a [maximum limit of 100 tools](https://docs.windsurf.com/windsurf/cascade/mcp) that Cascade can access at any given time. When all permissions are enabled (`ITERABLE_USER_PII=true`, `ITERABLE_ENABLE_WRITES=true`, `ITERABLE_ENABLE_SENDS=true`), the Iterable MCP server exposes **104 tools**, which exceeds this limit.
251
+ **Tool limit:** Windsurf has a [maximum limit of 100 tools](https://docs.windsurf.com/windsurf/cascade/mcp) that Cascade can access at any given time. When all permissions are enabled (`ITERABLE_USER_PII=true`, `ITERABLE_ENABLE_WRITES=true`, `ITERABLE_ENABLE_SENDS=true`), the Iterable MCP server exposes **105 tools**, which exceeds this limit.
327
252
 
328
253
  **Workaround:** Use restricted permissions to stay under the 100-tool limit:
329
254
  - With default permissions (all disabled): 26 tools ✅
330
255
  - With PII only: 37 tools ✅
331
- - With PII + writes: 86 tools ✅
332
- - With all permissions: 104 tools ❌ (exceeds Windsurf limit)
256
+ - With PII + writes: 87 tools ✅
257
+ - With all permissions: 105 tools ❌ (exceeds Windsurf limit)
333
258
 
334
259
  You can configure permissions when adding a key:
335
260
  ```bash
336
- iterable-mcp keys add --advanced
261
+ npx @iterable/mcp keys add --advanced
337
262
  ```
338
263
 
339
264
  Or update an existing key's permissions:
340
265
  ```bash
341
- iterable-mcp keys update <key-name> --advanced
266
+ npx @iterable/mcp keys update <key-name> --advanced
342
267
  ```
343
268
 
344
269
  **Process persistence:** After switching API keys with `keys activate`, you must **fully restart Windsurf** (quit and reopen the application). Windsurf keeps MCP server processes running in the background, and they don't automatically reload when you switch keys.
345
270
 
346
271
  #### Antigravity
347
272
 
348
- **Tool limit:** Antigravity has a maximum limit of 100 tools per MCP server. When all permissions are enabled (`ITERABLE_USER_PII=true`, `ITERABLE_ENABLE_WRITES=true`, `ITERABLE_ENABLE_SENDS=true`), the Iterable MCP server exposes **104 tools**, which exceeds this limit.
273
+ **Tool limit:** Antigravity has a maximum limit of 100 tools per MCP server. When all permissions are enabled (`ITERABLE_USER_PII=true`, `ITERABLE_ENABLE_WRITES=true`, `ITERABLE_ENABLE_SENDS=true`), the Iterable MCP server exposes **105 tools**, which exceeds this limit.
349
274
 
350
275
  **Workaround:** Use restricted permissions to stay under the 100-tool limit:
351
276
  - With default permissions (all disabled): 26 tools ✅
352
277
  - With PII only: 37 tools ✅
353
- - With PII + writes: 86 tools ✅
354
- - With all permissions: 104 tools ❌ (exceeds Antigravity limit)
278
+ - With PII + writes: 87 tools ✅
279
+ - With all permissions: 105 tools ❌ (exceeds Antigravity limit)
355
280
 
356
281
  You can configure permissions when adding a key:
357
282
  ```bash
358
- iterable-mcp keys add --advanced
283
+ npx @iterable/mcp keys add --advanced
359
284
  ```
360
285
 
361
286
  Or update an existing key's permissions:
362
287
  ```bash
363
- iterable-mcp keys update <key-name> --advanced
288
+ npx @iterable/mcp keys update <key-name> --advanced
364
289
  ```
365
290
 
291
+ ## Contributing
292
+
293
+ See the [contributing guidelines](CONTRIBUTING.md) for development setup, building from source, and running tests.
294
+
295
+ ## Security
296
+
297
+ See the [security policy](SECURITY.md) for reporting vulnerabilities.
298
+
366
299
  ## Beta Feature Reminder
300
+
367
301
  Iterable's MCP server is currently in beta. MCP functionality may change, be
368
302
  suspended, or be discontinued at any time without notice. This software is
369
303
  provided "as is" and is open source and ready for you to experiment with. For
@@ -371,4 +305,4 @@ more information, refer to [Iterable Beta Terms](https://iterable.com/trust/beta
371
305
 
372
306
  ## License
373
307
 
374
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
308
+ This project is licensed under the MIT License. See the [license](LICENSE.md) for details.
package/TOOLS.md CHANGED
@@ -1,4 +1,4 @@
1
- # Available Iterable MCP Tools (104 tools)
1
+ # Available Iterable MCP Tools (108 tools)
2
2
 
3
3
  **Legend:**
4
4
  - 🔒 = Requires enabling user PII access
@@ -6,12 +6,13 @@
6
6
  - ✉️ = Requires enabling sends
7
7
 
8
8
 
9
- ## Campaigns (13 tools)
9
+ ## Campaigns (14 tools)
10
10
  - **abort_campaign** ✏️: Abort a campaign that is currently running
11
11
  - **activate_triggered_campaign** ✏️✉️: Activate a triggered campaign (requires API triggered campaign activation enabled)
12
12
  - **archive_campaigns** ✏️: Archive one or more campaigns. Scheduled/recurring campaigns will be cancelled, running campaigns will be aborted.
13
13
  - **cancel_campaign** ✏️: Cancel a scheduled or recurring campaign
14
- - **create_campaign** ✏️✉️: Create a new blast or triggered campaign from an existing template. If listIds are provided, the campaign will be a blast campaign; it is created in Scheduled state and will be sent at the given sendAt time, which is required. If listIds are not provided, the campaign will be a triggered campaign in Ready state that must be activated before it can send.
14
+ - **create_blast_campaign** ✏️✉️: Create a new blast campaign from an existing template. By default, the campaign is created without being scheduled. Set scheduleSend to true to immediately schedule it for delivery at the given sendAt time.
15
+ - **create_triggered_campaign** ✏️: Create a new triggered campaign from an existing template. The campaign is created in Ready state and must be activated before it can send.
15
16
  - **deactivate_triggered_campaign** ✏️: Deactivate a triggered campaign (requires API triggered campaign deactivation enabled)
16
17
  - **get_campaign**: Get detailed information about a specific campaign
17
18
  - **get_campaign_metrics**: Get campaign performance metrics
@@ -48,8 +49,11 @@
48
49
  - **track_bulk_events** 🔒✏️✉️: Track multiple events in a single request for better performance
49
50
  - **track_event** 🔒✏️✉️: Track a custom event for a user
50
51
 
51
- ## Experiments (1 tools)
52
+ ## Experiments (4 tools)
53
+ - **get_experiment**: Get detailed information about a specific experiment by ID, including variants summary and constraints
52
54
  - **get_experiment_metrics**: Get experiment metrics for A/B testing analysis (currently supports email experiments only)
55
+ - **get_experiment_variants**: Get variant content for an experiment, including subject lines, preheaders, HTML source, and plain text
56
+ - **list_experiments**: List experiments with optional filtering by campaign, status, and date range. Supports pagination.
53
57
 
54
58
  ## Journeys (2 tools)
55
59
  - **get_journeys**: Get journeys (workflows) with optional pagination and state filtering
@@ -1 +1 @@
1
- {"version":3,"file":"tool-filter.d.ts","sourceRoot":"","sources":["../src/tool-filter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,MAAM,CA2DpC,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,MAAM,CAsCtC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,MAAM,CA0BjC,CAAC;AAEH;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,EAAE,CAO1E"}
1
+ {"version":3,"file":"tool-filter.d.ts","sourceRoot":"","sources":["../src/tool-filter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,MAAM,CA+DpC,CAAC;AAEH,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,MAAM,CAyCtC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,GAAG,CAAC,MAAM,CA0BjC,CAAC;AAEH;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,eAAe,GAAG,IAAI,EAAE,CAO1E"}
@@ -8,7 +8,8 @@ export const NON_PII_TOOLS = new Set([
8
8
  "archive_campaigns",
9
9
  "bulk_delete_catalog_items",
10
10
  "cancel_campaign",
11
- "create_campaign",
11
+ "create_blast_campaign",
12
+ "create_triggered_campaign",
12
13
  "create_catalog",
13
14
  "create_list",
14
15
  "create_snippet",
@@ -28,7 +29,9 @@ export const NON_PII_TOOLS = new Set([
28
29
  "get_channels",
29
30
  "get_child_campaigns",
30
31
  "get_email_template",
32
+ "get_experiment",
31
33
  "get_experiment_metrics",
34
+ "get_experiment_variants",
32
35
  "get_inapp_template",
33
36
  "get_journeys",
34
37
  "get_list_size",
@@ -42,6 +45,7 @@ export const NON_PII_TOOLS = new Set([
42
45
  "get_templates",
43
46
  "get_user_fields",
44
47
  "get_webhooks",
48
+ "list_experiments",
45
49
  "partial_update_catalog_item",
46
50
  "preview_email_template",
47
51
  "preview_inapp_template",
@@ -74,7 +78,9 @@ export const READ_ONLY_TOOLS = new Set([
74
78
  "get_child_campaigns",
75
79
  "get_email_template",
76
80
  "get_embedded_messages",
81
+ "get_experiment",
77
82
  "get_experiment_metrics",
83
+ "get_experiment_variants",
78
84
  "get_export_files",
79
85
  "get_export_jobs",
80
86
  "get_in_app_messages",
@@ -98,6 +104,7 @@ export const READ_ONLY_TOOLS = new Set([
98
104
  "get_user_events_by_user_id",
99
105
  "get_user_fields",
100
106
  "get_webhooks",
107
+ "list_experiments",
101
108
  "preview_email_template",
102
109
  "preview_inapp_template",
103
110
  ]);
@@ -110,8 +117,8 @@ export const SEND_TOOLS = new Set([
110
117
  "send_campaign",
111
118
  "trigger_campaign",
112
119
  "schedule_campaign",
113
- // Creating a blast campaign schedules a send (sendAt is required when listIds is provided)
114
- "create_campaign",
120
+ // Creating a blast campaign schedules a send
121
+ "create_blast_campaign",
115
122
  // Triggered campaigns can cause sends upon activation; block unless explicitly allowed
116
123
  "activate_triggered_campaign",
117
124
  // Journey triggers enqueue users which may send
@@ -1 +1 @@
1
- {"version":3,"file":"tool-filter.js","sourceRoot":"","sources":["../src/tool-filter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,CAAC,MAAM,aAAa,GAAgB,IAAI,GAAG,CAAC;IAChD,gBAAgB;IAChB,6BAA6B;IAC7B,mBAAmB;IACnB,2BAA2B;IAC3B,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;IAChB,aAAa;IACb,gBAAgB;IAChB,+BAA+B;IAC/B,gBAAgB;IAChB,qBAAqB;IACrB,aAAa;IACb,gBAAgB;IAChB,kBAAkB;IAClB,cAAc;IACd,sBAAsB;IACtB,eAAe;IACf,4BAA4B;IAC5B,kBAAkB;IAClB,mBAAmB;IACnB,cAAc;IACd,cAAc;IACd,qBAAqB;IACrB,oBAAoB;IACpB,wBAAwB;IACxB,oBAAoB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B,+CAA+C;IAC/C,aAAa;IACb,mBAAmB;IACnB,kCAAkC;IAClC,YAAY;IACZ,UAAU;IACV,eAAe;IACf,eAAe;IACf,WAAW;IACX,aAAa;IACb,yDAAyD;IACzD,2BAA2B;IAC3B,yBAAyB;IACzB,0BAA0B;IAC1B,2BAA2B;CAC5B,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,MAAuB;IAChE,OAAO,KAAK,CAAC,MAAM,CACjB,CAAC,IAAI,EAAE,EAAE,CACP,CAAC,MAAM,CAAC,YAAY,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC,MAAM,CAAC,WAAW,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CACpD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"tool-filter.js","sourceRoot":"","sources":["../src/tool-filter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,CAAC,MAAM,aAAa,GAAgB,IAAI,GAAG,CAAC;IAChD,gBAAgB;IAChB,6BAA6B;IAC7B,mBAAmB;IACnB,2BAA2B;IAC3B,iBAAiB;IACjB,uBAAuB;IACvB,2BAA2B;IAC3B,gBAAgB;IAChB,aAAa;IACb,gBAAgB;IAChB,+BAA+B;IAC/B,gBAAgB;IAChB,qBAAqB;IACrB,aAAa;IACb,gBAAgB;IAChB,kBAAkB;IAClB,cAAc;IACd,sBAAsB;IACtB,eAAe;IACf,4BAA4B;IAC5B,kBAAkB;IAClB,mBAAmB;IACnB,cAAc;IACd,cAAc;IACd,qBAAqB;IACrB,oBAAoB;IACpB,gBAAgB;IAChB,wBAAwB;IACxB,yBAAyB;IACzB,oBAAoB;IACpB,cAAc;IACd,eAAe;IACf,WAAW;IACX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;IAChD,iBAAiB;IACjB,+CAA+C;IAC/C,aAAa;IACb,mBAAmB;IACnB,kCAAkC;IAClC,YAAY;IACZ,UAAU;IACV,eAAe;IACf,eAAe;IACf,WAAW;IACX,aAAa;IACb,yDAAyD;IACzD,2BAA2B;IAC3B,yBAAyB;IACzB,0BAA0B;IAC1B,2BAA2B;CAC5B,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa,EAAE,MAAuB;IAChE,OAAO,KAAK,CAAC,MAAM,CACjB,CAAC,IAAI,EAAE,EAAE,CACP,CAAC,MAAM,CAAC,YAAY,IAAI,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,CAAC,MAAM,CAAC,WAAW,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CACpD,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"campaigns.d.ts","sourceRoot":"","sources":["../../src/tools/campaigns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAgBpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAI/D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CAwFlE"}
1
+ {"version":3,"file":"campaigns.d.ts","sourceRoot":"","sources":["../../src/tools/campaigns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAiBpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAI/D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CA+FlE"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * MCP tools for Iterable campaign operations
3
3
  */
4
- import { AbortCampaignParamsSchema, ActivateTriggeredCampaignParamsSchema, ArchiveCampaignsParamsSchema, CancelCampaignParamsSchema, CreateCampaignParamsSchema, DeactivateTriggeredCampaignParamsSchema, GetCampaignMetricsParamsSchema, GetCampaignParamsSchema, GetCampaignsParamsSchema, GetChildCampaignsParamsSchema, ScheduleCampaignParamsSchema, SendCampaignParamsSchema, TriggerCampaignParamsSchema, } from "@iterable/api";
4
+ import { AbortCampaignParamsSchema, ActivateTriggeredCampaignParamsSchema, ArchiveCampaignsParamsSchema, CancelCampaignParamsSchema, CreateBlastCampaignParamsSchema, CreateTriggeredCampaignParamsSchema, DeactivateTriggeredCampaignParamsSchema, GetCampaignMetricsParamsSchema, GetCampaignParamsSchema, GetCampaignsParamsSchema, GetChildCampaignsParamsSchema, ScheduleCampaignParamsSchema, SendCampaignParamsSchema, TriggerCampaignParamsSchema, } from "@iterable/api";
5
5
  import { createTool } from "../schema-utils.js";
6
6
  export function createCampaignTools(client) {
7
7
  return [
@@ -24,10 +24,16 @@ export function createCampaignTools(client) {
24
24
  execute: (params) => client.getCampaignMetrics(params),
25
25
  }),
26
26
  createTool({
27
- name: "create_campaign",
28
- description: "Create a new blast or triggered campaign from an existing template. If listIds are provided, the campaign will be a blast campaign; it is created in Scheduled state and will be sent at the given sendAt time, which is required. If listIds are not provided, the campaign will be a triggered campaign in Ready state that must be activated before it can send.",
29
- schema: CreateCampaignParamsSchema,
30
- execute: (params) => client.createCampaign(params),
27
+ name: "create_blast_campaign",
28
+ description: "Create a new blast campaign from an existing template. By default, the campaign is created without being scheduled. Set scheduleSend to true to immediately schedule it for delivery at the given sendAt time.",
29
+ schema: CreateBlastCampaignParamsSchema,
30
+ execute: (params) => client.createBlastCampaign(params),
31
+ }),
32
+ createTool({
33
+ name: "create_triggered_campaign",
34
+ description: "Create a new triggered campaign from an existing template. The campaign is created in Ready state and must be activated before it can send.",
35
+ schema: CreateTriggeredCampaignParamsSchema,
36
+ execute: (params) => client.createTriggeredCampaign(params),
31
37
  }),
32
38
  createTool({
33
39
  name: "get_child_campaigns",
@@ -1 +1 @@
1
- {"version":3,"file":"campaigns.js","sourceRoot":"","sources":["../../src/tools/campaigns.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,yBAAyB,EACzB,qCAAqC,EACrC,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,uCAAuC,EACvC,8BAA8B,EAC9B,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,4BAA4B,EAC5B,wBAAwB,EACxB,2BAA2B,GAC5B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,UAAU,mBAAmB,CAAC,MAAsB;IACxD,OAAO;QACL,UAAU,CAAC;YACT,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,oBAAoB;YACjC,MAAM,EAAE,wBAAwB;YAChC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC;SACjD,CAAC;QAEF,UAAU,CAAC;YACT,IAAI,EAAE,cAAc;YACpB,WAAW,EAAE,oDAAoD;YACjE,MAAM,EAAE,uBAAuB;YAC/B,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;SAChD,CAAC;QAEF,UAAU,CAAC;YACT,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,kCAAkC;YAC/C,MAAM,EAAE,8BAA8B;YACtC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC;SACvD,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,iBAAiB;YACvB,WAAW,EACT,qWAAqW;YACvW,MAAM,EAAE,0BAA0B;YAClC,OAAO,EAA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CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC;SACjD,CAAC;KACH,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../src/tools/experiments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAI/D,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CAUpE"}
1
+ {"version":3,"file":"experiments.d.ts","sourceRoot":"","sources":["../../src/tools/experiments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAOpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAI/D,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,CA+BpE"}
@@ -1,10 +1,28 @@
1
1
  /**
2
2
  * MCP tools for Iterable experiment operations
3
3
  */
4
- import { GetExperimentMetricsParamsSchema } from "@iterable/api";
4
+ import { GetExperimentMetricsParamsSchema, GetExperimentParamsSchema, GetExperimentVariantsParamsSchema, ListExperimentsParamsSchema, } from "@iterable/api";
5
5
  import { createTool } from "../schema-utils.js";
6
6
  export function createExperimentTools(client) {
7
7
  return [
8
+ createTool({
9
+ name: "list_experiments",
10
+ description: "List experiments with optional filtering by campaign, status, and date range. Supports pagination.",
11
+ schema: ListExperimentsParamsSchema,
12
+ execute: (params) => client.listExperiments(params),
13
+ }),
14
+ createTool({
15
+ name: "get_experiment",
16
+ description: "Get detailed information about a specific experiment by ID, including variants summary and constraints",
17
+ schema: GetExperimentParamsSchema,
18
+ execute: (params) => client.getExperiment(params),
19
+ }),
20
+ createTool({
21
+ name: "get_experiment_variants",
22
+ description: "Get variant content for an experiment, including subject lines, preheaders, HTML source, and plain text",
23
+ schema: GetExperimentVariantsParamsSchema,
24
+ execute: (params) => client.getExperimentVariants(params),
25
+ }),
8
26
  createTool({
9
27
  name: "get_experiment_metrics",
10
28
  description: "Get experiment metrics for A/B testing analysis (currently supports email experiments only)",
@@ -1 +1 @@
1
- {"version":3,"file":"experiments.js","sourceRoot":"","sources":["../../src/tools/experiments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC;AAGjE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,UAAU,qBAAqB,CAAC,MAAsB;IAC1D,OAAO;QACL,UAAU,CAAC;YACT,IAAI,EAAE,wBAAwB;YAC9B,WAAW,EACT,6FAA6F;YAC/F,MAAM,EAAE,gCAAgC;YACxC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC;SACzD,CAAC;KACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"experiments.js","sourceRoot":"","sources":["../../src/tools/experiments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,gCAAgC,EAChC,yBAAyB,EACzB,iCAAiC,EACjC,2BAA2B,GAC5B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,UAAU,qBAAqB,CAAC,MAAsB;IAC1D,OAAO;QACL,UAAU,CAAC;YACT,IAAI,EAAE,kBAAkB;YACxB,WAAW,EACT,oGAAoG;YACtG,MAAM,EAAE,2BAA2B;YACnC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC;SACpD,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,gBAAgB;YACtB,WAAW,EACT,wGAAwG;YAC1G,MAAM,EAAE,yBAAyB;YACjC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC;SAClD,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,yBAAyB;YAC/B,WAAW,EACT,yGAAyG;YAC3G,MAAM,EAAE,iCAAiC;YACzC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC,MAAM,CAAC;SAC1D,CAAC;QACF,UAAU,CAAC;YACT,IAAI,EAAE,wBAAwB;YAC9B,WAAW,EACT,6FAA6F;YAC/F,MAAM,EAAE,gCAAgC;YACxC,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,MAAM,CAAC;SACzD,CAAC;KACH,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iterable/mcp",
3
- "version": "1.4.2",
3
+ "version": "1.6.0",
4
4
  "description": "Model Context Protocol server for Iterable API",
5
5
  "keywords": [
6
6
  "mcp",
@@ -38,7 +38,8 @@
38
38
  "minimumReleaseAge": 4320,
39
39
  "minimumReleaseAgeExclude": [
40
40
  "@iterable/*"
41
- ]
41
+ ],
42
+ "overrides": {}
42
43
  },
43
44
  "scripts": {
44
45
  "build": "pnpm lint:fix && tsc --project tsconfig.build.json && pnpm update-tools && chmod +x dist/index.js",
@@ -75,7 +76,7 @@
75
76
  },
76
77
  "dependencies": {
77
78
  "@alcyone-labs/zod-to-json-schema": "4.0.10",
78
- "@iterable/api": "0.6.1",
79
+ "@iterable/api": "0.8.1",
79
80
  "@modelcontextprotocol/sdk": "1.18.1",
80
81
  "@primno/dpapi": "2.0.1",
81
82
  "@types/json-schema": "7.0.15",