Skip to content

Connect Mailchimp to Claude: Sync Audience Lists and Member Info

Learn how to connect Mailchimp to Claude using a managed MCP server. Automate audience syncing, campaign drafting, and member profile updates using AI.

Nachi Raman Nachi Raman · · 10 min read
Connect Mailchimp to Claude: Sync Audience Lists and Member Info

If you need to connect Mailchimp to Claude to automate audience segmentation, sync subscriber lists, draft email campaigns, or manage marketing operations, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's tool calls and Mailchimp's REST APIs. You can either build 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-mailchimp-to-chatgpt-design-campaigns-and-email-templates/ or explore our broader architectural overview on /connect-mailchimp-to-ai-agents-orchestrate-files-and-media-folders/.

Giving a Large Language Model (LLM) read and write access to a sprawling marketing ecosystem like Mailchimp is an engineering challenge. You have to handle OAuth 2.0 token lifecycles, map massive JSON schemas to MCP tool definitions, and deal with Mailchimp's specific routing requirements. Every time Mailchimp updates an endpoint or deprecates a field, 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 Mailchimp, connect it natively to Claude, and execute complex workflows using natural language.

The Engineering Reality of the Mailchimp 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 Mailchimp's Marketing API is painful. You are not just integrating a standard REST API - you are navigating an API built around specific list-management paradigms, strict data validation, and unique authentication routing.

If you decide to build a custom MCP server for Mailchimp, you own the entire API lifecycle. Here are the specific challenges you will face:

The MD5 Hash Identity Problem Mailchimp's API design requires you to use the MD5 hash of a member's lowercase email address to interact with their specific record (e.g., retrieving, updating, or deleting a subscriber). LLMs are notoriously bad at generating accurate cryptographic hashes on the fly. If you expose the raw Mailchimp API to Claude, the model will constantly fail to fetch or update users because it cannot reliably compute MD5(user@domain.com). A managed MCP server abstracts this away. For example, Truto provides proxy operations like mailchimp_members_upsert that allow the LLM to simply pass the raw email address, while the underlying infrastructure handles the hashing logic before it hits Mailchimp.

Dynamic Data Center Routing Unlike most SaaS platforms that have a single global API base URL (like api.stripe.com), Mailchimp partitions its accounts across dozens of data centers. Your API requests must be routed to the specific data center assigned to that user's account (e.g., us19.api.mailchimp.com or us3.api.mailchimp.com). This prefix is dynamically returned during the OAuth handshake. Your custom MCP server must store this metadata alongside the access token and dynamically rewrite base URLs for every single tool call. Truto handles this automatically by extracting the server prefix from the OAuth metadata and routing the proxy requests seamlessly.

Handling Mailchimp Rate Limits Mailchimp enforces a maximum of 10 simultaneous connections per user account, along with strict request volume limits. When building an integration, it is critical to handle these gracefully. Factual note on rate limits: Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Mailchimp API returns an HTTP 429 error, Truto passes that error directly back to the caller. Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. The caller (or the orchestrating LLM framework) is strictly responsible for implementing retry and backoff logic.

sequenceDiagram
    participant Claude as Claude Desktop
    participant Truto as Truto MCP Server
    participant Upstream as Mailchimp API

    Claude->>Truto: Call mailchimp_members_upsert (email)
    Truto->>Truto: Validate MCP token
    Truto->>Truto: Hash email to MD5
    Truto->>Upstream: PUT /lists/{list_id}/members/{md5_hash}
    Upstream-->>Truto: 200 OK (Member Data)
    Truto-->>Claude: JSON-RPC Result

Generating a Managed Mailchimp MCP Server

To bridge Claude and Mailchimp, we need to spin up an MCP server. Truto generates these servers dynamically based on the Mailchimp API documentation and your connected tenant's OAuth credentials. You can provision this server either through the visual Truto UI or programmatically via the API.

Method 1: Via the Truto UI

For internal operations, IT administration, or rapid prototyping, generating the server via the UI is the fastest path.

  1. Log into your Truto dashboard and navigate to the integrated account page for your connected Mailchimp instance.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Select your desired configuration (e.g., name the server, filter by read/write methods, or restrict to specific tags).
  5. Click Generate, and copy the resulting MCP server URL (it will look like https://api.truto.one/mcp/a1b2c3d4e5f6...).

Method 2: Via the Truto API

If you are building an AI product and need to provision MCP servers for your end-users dynamically, you can use the Truto API. The API validates that tools are available, stores the configuration, and returns a secure, ready-to-use URL.

Make a POST request to /integrated-account/:id/mcp with your desired configuration:

curl -X POST https://api.truto.one/integrated-account/YOUR_ACCOUNT_ID/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Mailchimp Marketing Agent",
    "config": {
      "methods": ["read", "write"],
      "tags": ["lists", "campaigns"]
    }
  }'

Example Response:

{
  "id": "mcp_8a9b0c1d2e",
  "name": "Mailchimp Marketing Agent",
  "config": {
    "methods": ["read", "write"],
    "tags": ["lists", "campaigns"]
  },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}

This URL encapsulates the authentication, the routing data center prefix, and the specific tool filters. It is fully self-contained.

Connecting the MCP Server to Claude

Once you have your Truto MCP URL, you need to register it with your LLM client. The connection uses Server-Sent Events (SSE) over HTTP POST to transmit JSON-RPC 2.0 messages.

Method A: Via the Claude UI (or ChatGPT)

If you are using a modern AI chat interface that supports custom connectors:

For Claude:

  1. Open Claude and navigate to Settings -> Integrations.
  2. Click Add MCP Server.
  3. Paste the Truto MCP URL into the connection field.
  4. Click Add. Claude will immediately perform a handshake, fetch the tools/list, and make the Mailchimp capabilities available in your session.

For ChatGPT:

  1. Go to Settings -> Apps -> Advanced settings.
  2. Enable Developer mode.
  3. Under MCP servers, add a new server, name it "Mailchimp Integration", paste your Truto URL, and save.

Method B: Via Manual Config File (Claude Desktop)

If you are running Claude Desktop locally or managing headless agents in frameworks like Cursor, you can register the server via a JSON configuration file. You will use the standard @modelcontextprotocol/server-sse package to proxy the connection.

Edit your claude_desktop_config.json file (typically found in your local AppData or Application Support directory):

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

Restart Claude Desktop. The client will discover the server, pull down the Mailchimp tool schemas, and you can begin issuing natural language commands.

Security and Access Control

Giving an LLM unconstrained access to your marketing database is incredibly dangerous. A rogue prompt could delete a master subscriber list or blast an untested campaign to a million users. Truto MCP servers provide strict, configuration-level access controls:

  • Method Filtering: Restrict the server to safe operations. By setting methods: ["read"], Claude can only query lists and report on campaigns, preventing it from creating or deleting any data.
  • Tag Filtering: Limit the surface area of the API. Setting tags: ["campaigns"] ensures the LLM can manage email campaigns but cannot touch underlying subscriber lists or account billing data.
  • Require API Token Auth: By setting require_api_token_auth: true, possession of the MCP URL is no longer sufficient. The caller must also pass a valid Truto session token, adding a secondary layer of enterprise identity verification.
  • Ephemeral Servers: Set an expires_at ISO datetime to create temporary MCP access. The infrastructure will automatically tear down the server and revoke access when the time expires - perfect for one-off data cleanup tasks.

Hero Tools for Mailchimp Automation

Mailchimp's API surface is massive. Rather than dumping raw CRUD operations into the model's context window, Truto curates the most impactful endpoints into descriptive, snake_case tools. Here are the highest-leverage tools available in the Mailchimp MCP server.

list_all_mailchimp_lists

Retrieves all subscriber lists (audiences) within the Mailchimp account. This is almost always the first tool Claude will call, as nearly all member operations require a list_id.

Contextual Usage Notes: This tool handles standard pagination via limit and next_cursor. It returns crucial metadata including the id, name, campaign defaults, and list rating.

"Fetch all the audience lists in my Mailchimp account. Tell me the exact ID for the list named 'Q4 Webinar Registrants'."

list_all_mailchimp_members

Retrieves the members of a specific Mailchimp list. It can fetch active subscribers, unsubscribed users, or bounced emails.

Contextual Usage Notes: Requires the list_id. The response includes the email_address, status, merge_fields (which hold custom data like First Name and Last Name), and tags.

"Get the first 50 members from the 'Q4 Webinar Registrants' list who are currently active and format their names and emails into a markdown table."

mailchimp_members_upsert

Adds a new member to a list or updates an existing member. This is a critical abstraction because it handles the logic of checking if the user exists and applying the correct HTTP verb (PUT/POST) without requiring Claude to manage MD5 hashes.

Contextual Usage Notes: Requires list_id, email_address, and status_if_new (usually "subscribed" or "pending"). You can also pass a JSON object for merge_fields to update their name or demographic data.

"Add sarah.connor@example.com to the list ID 'abc123xyz' as a subscribed user. Set her First Name to Sarah and Last Name to Connor in the merge fields."

create_a_mailchimp_campaign

Drafts a new Mailchimp email campaign. It configures the campaign settings but does not send it.

Contextual Usage Notes: Requires the campaign type (usually 'regular'). You must provide a nested settings object containing the subject_line, title, from_name, and reply_to address. It returns the newly generated campaign id.

"Draft a new regular campaign titled 'November Product Update'. The subject line should be 'What is new this month', from 'The Product Team', replying to product@ourcompany.com."

get_single_mailchimp_campaign_by_id

Retrieves the complete state and configuration of a specific campaign.

Contextual Usage Notes: Requires the campaign id. Use this to check the status (e.g., drafted, scheduled, sent) or to review the tracking settings and delivery stats.

"Check the status of the campaign with ID '987def654'. If it has been sent, tell me how many total emails were delivered."

list_all_mailchimp_templates

Fetches the saved email templates in the Mailchimp account, which are necessary for associating HTML designs with campaigns.

Contextual Usage Notes: Returns the template id, name, type, and date_created. You can filter by category or creator. Claude can use this to find the correct design ID before creating a campaign.

"List all custom email templates created in the last 6 months. Find the ID for the template named 'Monthly Newsletter Master'."

To view the full inventory of available tools, complete schema definitions, and required parameters, visit the Mailchimp integration page.

Workflows in Action

When connected via MCP, Claude stops being a simple text generator and becomes an active participant in your marketing stack. By chaining these tools together, Claude can execute complex, multi-step orchestration workflows entirely through natural language.

Workflow 1: The Audience Segmentation Sweep

Persona: Marketing Operations Manager

"Find the master 'Customer Directory' list. Search for anyone who has an empty 'Company' merge field. Update their records based on the domain in their email address (e.g., if the email is bob@acmecorp.com, set the Company merge field to 'acmecorp')."

Execution Steps:

  1. Claude calls list_all_mailchimp_lists to locate the ID for "Customer Directory".
  2. Claude calls list_all_mailchimp_members using that ID, fetching the subscriber records and examining their merge_fields.
  3. Claude identifies the users with missing company data, parses their email domains internally, and formats the update payload.
  4. Claude repeatedly calls mailchimp_members_upsert for each identified user, passing their email address and the updated merge_fields object.

Result: The LLM autonomously performs a data-cleansing loop, enriching your subscriber database without writing a single Python script or using a clunky spreadsheet export.

graph TD
    A["Claude analyzes<br>user prompt"] --> B["list_all_mailchimp_lists"]
    B --> C["list_all_mailchimp_members<br>(Find missing fields)"]
    C --> D["Parse domains<br>internally"]
    D --> E["mailchimp_members_upsert<br>(Loop per user)"]
    E --> F["Return summary<br>to user"]

Workflow 2: Automated Campaign Drafting

Persona: Content Marketer

"Draft a new regular campaign for the 'Q4 Promos' list. The subject line should be 'Black Friday Early Access'. Use the template named 'Promo 2024 Base'. Once drafted, read back the campaign ID so I can review it in the Mailchimp dashboard."

Execution Steps:

  1. Claude calls list_all_mailchimp_lists to find the ID for "Q4 Promos".
  2. Claude calls list_all_mailchimp_templates to search for "Promo 2024 Base" and extracts its template ID.
  3. Claude calls create_a_mailchimp_campaign, passing the list ID into the recipients object, the subject line into the settings object, and the template ID into the layout payload.
  4. Claude receives the successful response and reads back the new campaign ID.

Result: A fully structured, ready-to-review campaign is generated in seconds, with all lists and design assets properly linked by the AI agent.

Wrapping Up

Integrating Mailchimp into your AI strategy requires more than just knowing the API endpoints. You have to handle fragmented data center routing, bypass MD5 hash requirements for member updates, and enforce strict security boundaries so models cannot accidentally destroy critical audience data.

A managed MCP server completely abstracts this infrastructure. By configuring a Truto MCP endpoint, you give Claude Desktop, ChatGPT, or your custom AI agents secure, normalized access to your marketing ecosystem. You ship faster, avoid maintaining OAuth middleware, and unlock autonomous marketing operations with zero code.

FAQ

How does Truto handle Mailchimp's MD5 hashing requirement for member records?
Truto abstracts the MD5 hashing requirement via proxy endpoints like `mailchimp_members_upsert`. Instead of forcing the LLM to generate an MD5 hash of an email address, Claude can pass the raw email address. The underlying Truto infrastructure handles the hashing logic before routing the request to Mailchimp.
Does Truto automatically retry Mailchimp API rate limit errors?
No. Truto does not retry, throttle, or apply backoff on rate limit errors. When Mailchimp returns an HTTP 429 error, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller is responsible for implementing retry logic.
How do I prevent Claude from deleting Mailchimp lists or campaigns?
You can restrict the MCP server's capabilities using method filtering. By configuring the MCP server with `methods: ["read"]`, you limit the server strictly to GET and LIST operations, mathematically preventing the LLM from executing any create, update, or delete commands.
Can I use this MCP server with ChatGPT?
Yes. While MCP was pioneered by Anthropic, you can connect the Truto MCP server URL to ChatGPT by enabling Developer mode in your ChatGPT settings and adding the server URL as a Custom Connector.

More from our Blog