Skip to content

Connect Iterable to Claude: Optimize Experiments and Analytics

Learn how to connect Iterable to Claude using Truto's MCP Server. This guide covers setup, hero tools, and real-world marketing automation workflows.

Uday Gajavalli Uday Gajavalli · · 10 min read
Connect Iterable to Claude: Optimize Experiments and Analytics

If you need to connect Iterable to Claude to automate marketing experiments, synchronize user profiles, or orchestrate complex omnichannel campaigns, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's natural language tool calls and Iterable's extensive REST API. You can either build, host, and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL. If your team uses ChatGPT, check out our guide on /connect-iterable-to-chatgpt-manage-campaigns-and-user-profiles/ or explore our broader architectural overview on /connect-iterable-to-ai-agents-sync-catalogs-and-automate-flows/.

Giving a Large Language Model (LLM) read and write access to a sprawling customer engagement ecosystem like Iterable is an engineering challenge. You must handle strict token lifecycles, map massive JSON schemas to MCP tool definitions, and deal with Iterable's unique approach to user identification and bulk processing. Every time Iterable updates an endpoint or modifies a schema, you have to update your server code, redeploy, and test the integration.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Iterable, connect it natively to Claude Desktop, and execute complex growth marketing workflows using natural language.

The Engineering Reality of the Iterable API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against Iterable's APIs is painful. Iterable is designed to ingest massive amounts of event data and orchestrate messaging at scale. Its API reflects that high-throughput, data-heavy nature.

If you decide to build a custom Iterable MCP server, here are the specific integration challenges you will face:

The Dual Identity Problem (userId vs email) Iterable identifies users through two distinct primary keys: email and userId. Depending on how your Iterable project is configured (email-based, userId-based, or hybrid), endpoints require specific handling. If an LLM tries to update a user's email address via a standard profile update payload, it will fail or create a duplicate record. Instead, email updates require calling a dedicated endpoint (POST /api/users/updateEmail). A well-architected MCP server must expose strictly typed tools that force the LLM to supply the correct identifier based on the operation, preventing data corruption across your subscriber base.

Synchronous vs Asynchronous Bulk Operations Iterable provides single-record endpoints (like POST /api/users/update) and bulk endpoints (like POST /api/users/bulkUpdate). The bulk endpoints are processed asynchronously. If Claude triggers a bulk update of 1,000 users and immediately tries to query one of those users to verify the change, the data may not be there yet. Your MCP tools must provide clear contextual instructions (descriptions embedded in the JSON-RPC schema) telling the LLM that bulk operations are async and require a buffer time before dependent actions are executed.

Strict and Highly Variable Rate Limits Iterable enforces aggressive rate limits that vary drastically by endpoint. For example, updating a user profile allows 100 requests per second, while exporting campaign metrics allows only 10 requests per minute. If you exceed these limits, Iterable returns an HTTP 429 Too Many Requests response.

Crucial note on Truto's architecture: Truto does not retry, throttle, or apply backoff on rate limit errors. When Iterable returns an HTTP 429, Truto passes that error directly back to the calling client (Claude). However, Truto normalizes Iterable's specific rate limit headers into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). It is the responsibility of the MCP client or AI agent to read these headers, calculate the backoff window, and retry the tool call. Do not expect the proxy layer to silently absorb rate limit spikes.

How to Create the Iterable MCP Server

Truto dynamically generates MCP tools based on documentation records and the active resources available in your connected Iterable account. There are no hand-coded tool lists to maintain. If a tool has a documented schema, it is exposed to the LLM.

You can generate an MCP server for Iterable using either the Truto UI or the REST API.

Method 1: Via the Truto UI

For administrators and operators, the easiest way to provision a server is through the dashboard:

  1. Log into your Truto account and navigate to the specific Integrated Account page for your connected Iterable instance.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Define your configuration. You can filter the available tools by HTTP method (e.g., read, write, custom) or by specific tags (e.g., campaigns, users). You can also set an expiration date for the server.
  5. Click Create and immediately copy the generated MCP server URL. This URL contains a hashed token that acts as the primary authentication mechanism.

Method 2: Via the Truto API

For platform engineers building multi-tenant AI products, you can provision MCP servers programmatically. This is ideal for generating temporary, scoped access tokens for individual user sessions.

Make an authenticated POST request to the Truto API:

curl -X POST https://api.truto.one/api/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Iterable Growth Marketing Agent",
    "config": {
      "methods": ["read", "write", "custom"],
      "tags": ["campaigns", "experiments", "users"]
    },
    "expires_at": "2026-12-31T23:59:59Z"
  }'

The API returns a JSON payload containing the secure URL. Keep this URL secret; it is the endpoint Claude will use to interact with Iterable.

{
  "id": "mcp_b8d9e2a1",
  "name": "Iterable Growth Marketing Agent",
  "config": {
    "methods": ["read", "write", "custom"],
    "tags": ["campaigns", "experiments", "users"]
  },
  "expires_at": "2026-12-31T23:59:59Z",
  "url": "https://api.truto.one/mcp/abc123def456..."
}

How to Connect the MCP Server to Claude

Once you have your Truto MCP server URL, you must register it with your LLM client. MCP operates over a JSON-RPC 2.0 protocol using HTTP POST. Because Truto manages the protocol translation and hosts the endpoint, no local server installation is required.

Method 1: Via the Claude UI (Custom Connectors)

If you are using an Enterprise or Team tier of Claude that supports remote MCP connections:

  1. Open Claude and navigate to Settings - Integrations (or Connectors depending on your plan).
  2. Click Add MCP Server or Add custom connector.
  3. Paste the Truto MCP URL (https://api.truto.one/mcp/...) into the configuration.
  4. Click Add.

Claude will immediately send an initialize request to the URL, discover the Iterable tools, and populate them in the UI. (Note: If your team uses ChatGPT Developer Mode, the process is nearly identical: Settings - Apps - Advanced settings - Developer mode - Custom connectors).

Method 2: Via Manual Configuration File (Claude Desktop)

If you are testing locally using the Claude Desktop app, you connect to the remote Truto server using the standard MCP SSE (Server-Sent Events) transport wrapper provided by the MCP community.

Locate your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the Truto URL as a remote server:

{
  "mcpServers": {
    "iterable_production": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/abc123def456..."
      ]
    }
  }
}

Restart Claude Desktop. The application will read the config, fetch the remote tools, and make them available in your chat sessions.

High-Leverage Tools for Iterable Automation

Truto automatically generates descriptive, snake_case tool names based on Iterable's resource models. The tools share a flat input namespace, meaning the LLM passes all arguments in a single object, and Truto intelligently maps them to query parameters or JSON body payloads based on the underlying schema.

Here are the highest-leverage hero tools available for Iterable:

create_a_iterable_campaign

This tool allows the agent to spin up a new blast or triggered campaign from an existing template. It requires detailed parameters like name, templateId, and target list arrays. This is the cornerstone of automated marketing operations.

"I need to launch a new promotional email campaign. Please use template ID 98765, name the campaign 'Q4 Flash Sale - VIPs', and target list ID 1029. Do not attach global suppression lists yet."

create_a_iterable_experiment

This tool creates a draft A/B test (experiment) on an existing campaign. It designates the campaign's current template as the control variant. The LLM can use this to rapidly set up multivariate tests across subject lines, preheader text, or sender names without logging into the Iterable dashboard.

"Set up a new draft experiment for campaign ID 44321. Name it 'Subject Line Test - Urgency vs Discount'. Leave the control variant as is for now."

create_a_iterable_user

This tool updates existing user profile data or creates a new user if one does not exist. It requires email or userId and accepts arbitrary JSON in the dataFields property. Because of the flat input namespace, the LLM provides the payload and Truto formats it for Iterable.

"Update the user profile for 'sarah.connor@example.com'. Add her to the dataFields object with 'lifecycle_stage': 'advocate' and 'last_purchase_date': '2026-10-14'."

iterable_users_bulk_update

When dealing with large cohorts, single updates will quickly trigger Iterable's rate limits. This tool accepts an array of up to 1,000 user objects for asynchronous processing. The agent should use this when applying tags to segments resulting from data analysis.

"I have a list of 450 churn-risk users. Please use the bulk update tool to set their 'churn_risk_score' to 'high' and 'requires_intervention' to true. Ensure you pass the array correctly into the users object."

create_a_iterable_event

This tool records custom behavioral events (like a purchase, a login, or a feature usage) to a user's timeline. It requires the eventName and user identifier, and accepts nested properties in the dataFields object. This is essential for agents that bridge product databases with marketing systems.

"Track a custom event called 'Subscription_Upgraded' for userId 'usr_88392'. In the dataFields, include 'plan_tier': 'enterprise' and 'mrr_increase': 500."

list_all_iterable_campaign_metrics

This tool pulls analytical data for one or more campaigns. Iterable natively returns this data as a CSV string; Truto's proxy layer parses it into standard JSON rows, allowing the LLM to easily read, aggregate, and analyze open rates, click-through rates, and conversions.

"Fetch the performance metrics for campaign IDs 5543, 5544, and 5545. Analyze the click-to-open rates across the three campaigns and tell me which one performed best."

create_a_iterable_email_template_preview

Before sending an email, this tool renders a preview of the HTML template using mock data fields. The LLM can use this to verify that dynamic Handlebars logic (e.g., {{firstName}}) compiles correctly without throwing render errors.

"Run a template preview for email template ID 7721. Pass in mock data with 'firstName': 'Alex' and 'cart_total': '149.99' to ensure the dynamic block renders correctly."

For a complete list of all Iterable tools, their exact schemas, and required parameters, visit the Iterable integration page.

Workflows in Action

To understand how an AI agent uses these tools in the real world, let's look at two concrete workflows executed via Claude.

Scenario 1: Launching and Evaluating a Subject Line A/B Test

A Growth Marketing Manager wants to rapidly deploy an A/B test for an upcoming newsletter and check the initial metrics.

"I need to run an A/B test for our weekly newsletter (Campaign ID 10998). First, create a new experiment named 'Newsletter Q3 - Emojis vs Plain'. Then, start the experiment. Finally, check the campaign metrics to see the current open counts."

Tool Execution Sequence:

sequenceDiagram
    participant Claude as Claude Desktop
    participant Truto as Truto MCP Server
    participant Iterable as Iterable API

    Claude->>Truto: Call create_a_iterable_experiment
    Truto->>Iterable: POST /api/experiments/create
    Iterable-->>Truto: HTTP 200 (Experiment ID 992)
    Truto-->>Claude: JSON-RPC Result (Experiment ID)
    
    Claude->>Truto: Call create_a_iterable_experiment_start
    Truto->>Iterable: POST /api/experiments/start (ID 992)
    Iterable-->>Truto: HTTP 200 Success
    Truto-->>Claude: JSON-RPC Result (Started)
    
    Claude->>Truto: Call list_all_iterable_campaign_metrics
    Truto->>Iterable: GET /api/campaigns/metrics
    Iterable-->>Truto: HTTP 200 (CSV Data)
    Truto-->>Claude: JSON-RPC Result (Parsed JSON Rows)

Outcome: Claude creates the draft experiment, issues the command to start it, and subsequently retrieves the analytical data. Because Truto handles the CSV-to-JSON parsing on the metrics endpoint, Claude easily reads the rows and summarizes the current open rates for the user.

Scenario 2: Migrating VIP Users and Logging Events

A Support Engineer needs to tag a list of users as VIPs after a major platform outage and log an apology event to their timelines so the marketing team knows to exclude them from standard promotional blasts.

"I have three users who experienced the outage: alice@example.com, bob@example.com, and charlie@example.com. Please bulk update their profiles to set 'is_vip': true. Then, log a custom event for each of them called 'Outage_Apology_Sent'."

Tool Execution Sequence:

  1. iterable_users_bulk_update: Claude constructs a single JSON array containing the three email addresses and the updated dataFields, issuing one bulk request to update the profiles efficiently without hitting rate limits.
  2. create_a_iterable_event (Alice): Claude fires the first custom event payload.
  3. create_a_iterable_event (Bob): Claude fires the second custom event payload.
  4. create_a_iterable_event (Charlie): Claude fires the third custom event payload.

Outcome: The agent leverages the asynchronous bulk endpoint for data modification (saving network overhead) and loops through the single event endpoint to write the individual timeline behaviors. Claude confirms to the user once all four API requests successfully return HTTP 200s.

Security and Access Control

Giving an AI agent direct access to your customer engagement platform carries risk. If a prompt injection occurs, an agent with excessive permissions could accidentally trigger a blast email or delete catalogs. Truto provides four mechanisms to lock down MCP server configurations:

  • Method Filtering (config.methods): You can restrict the server to specific HTTP methods. Passing ["read"] ensures the agent can only pull metrics and read user data, effectively disabling tools like create_a_iterable_campaign or iterable_users_bulk_update.
  • Tag Filtering (config.tags): You can scope access to specific resource domains. By passing ["metrics"], the server will only generate tools related to campaign analytics, hiding all user modification endpoints.
  • Expiration (expires_at): You can assign a strict time-to-live for the server. Once the timestamp passes, the underlying Cloudflare KV records are purged, and the URL immediately returns a 401 Unauthorized. This is perfect for temporary agent sessions.
  • API Token Authentication (require_api_token_auth): By default, the cryptographically hashed URL acts as the sole authentication. By setting this flag to true, the MCP client must also pass a valid Truto API token in the Authorization header, adding a required second layer of identity verification.

Moving Faster with Managed MCP

Connecting Claude to Iterable manually requires deep knowledge of the Iterable API quirks, from managing the userId versus email routing logic to parsing CSV analytics into LLM-friendly JSON formats. It requires setting up web servers, managing OAuth lifecycles, and constantly updating schemas when Iterable adds new functionality.

By generating a Truto MCP server, you abstract away the infrastructure. The tools are derived dynamically from live API documentation, meaning they are always accurate, strongly typed, and ready for agent consumption. Your engineers stop writing boilerplate proxy code and start focusing on the actual agent logic and orchestration pipelines.

FAQ

How does Truto handle Iterable API rate limits?
Truto does not automatically retry or throttle requests when hitting Iterable's rate limits. Instead, it passes the HTTP 429 error directly to the caller and normalizes Iterable's specific rate limit headers into standardized IETF headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`). The MCP client or AI agent must handle the backoff.
How do I update an email address via the Iterable MCP server?
Iterable requires specific handling for user identifiers. You cannot simply update an email address via a standard profile update payload. The LLM must use a dedicated email update tool or pass the exact required schema for email modifications to prevent duplicate records or errors.
Can I restrict what the Claude agent can do in Iterable?
Yes. When creating the Truto MCP server, you can apply method filters (e.g., restricting to only `read` operations) and tag filters (e.g., only exposing `metrics` tools). You can also enforce an expiration date and require additional API token authentication.

More from our Blog