@cyanheads/mailchimp-mcp-server
Allows drafting, testing, and sending Mailchimp campaigns, managing audiences, subscribers, segments, templates, files, and reports, with safe-by-default send gates.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@cyanheads/mailchimp-mcp-serverDraft a campaign for the upcoming webinar"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Overview
Mailchimp campaign management over the Mailchimp Marketing API v3. Draft, test, and send email campaigns, manage audiences and subscribers, and review post-send analytics from any MCP client, with optional local image and template directories for authoring. Runs as a stdio process or a local Streamable HTTP server.
Tools
Tool | Description |
| Account profile, plan, data center, and the Chimp Chatter activity feed |
| Read, create, and update audiences (lists), with per-audience analytics and signup-form config |
| One-call audience digest: info, stats, growth history, top email clients, merge-field schema |
| Subscriber reads, updates, archive, tags, notes, and engagement history |
| Add or update one subscriber idempotently, with status, merge fields, tags, and a note |
| Locate a subscriber by email in one audience or across the account |
| Batch add or update up to 500 subscribers per call, |
| Segment CRUD (saved, static, fuzzy), member listing, and batch add/remove |
| Read, create, and update custom subscriber attributes |
| Campaign records, content, send checklist, and RSS/resend controls |
| Compose a campaign and leave it as a draft, test it, send it, or schedule it in one call |
| Duplicate a campaign with overrides, then draft, test, send, or schedule |
| Campaign reports: the index, one report, or one of ten report dimensions |
| Post-send digest: headline metrics plus top links, locations, and unsubscribes |
| Mailchimp-hosted templates; reads work on free plans, writes need a paid plan |
| File Manager uploads, listing, renames, and deletes on Mailchimp's CDN |
| Search members or campaigns across the account |
| Inspect and pre-warm uploads for |
| Author and render local |
| Procedural playbooks merged with live account state; advice only |
Resources
Resource | Description |
| Account snapshot: profile, plan, data center, total subscribers |
| Audience snapshot: name, contact, stats, double opt-in status |
| Campaign snapshot: status, settings, recipients |
| Post-send headline metrics for a campaign |
All resource data is also reachable through tools; audiences and campaigns are listed with each tool's list operation.
Prompts
Prompt | Description |
| Compose an editorial newsletter from a URL or brief, then walk it through draft, test, and send |
Design reference: docs/email-design-playbook.md.
Related MCP server: Mailchimp MCP Server
Capability reference
mailchimp_account tool
operation: inforeturns profile, plan, data center, total subscribers, and industry benchmarks;operation: activity-feedreturns Chimp Chatter events, paged bycount(max 100, default 20) andoffsetAn empty activity feed carries a
notenaming the likely causes
mailchimp_audiences tool
Operations:
list,get,create,update, the analytics readslist-activity,list-growth,list-clients,list-abuse-reports,list-locations, andget-signup-forms/customize-signup-forms(takessignupFormConfig); every operation exceptlistandcreateneedsaudienceIdcreaterequiresname,contact(company,address1,city,state,zip,country),permissionReminder, andcampaignDefaults(fromName,fromEmail,language)
mailchimp_audience_overview tool
audienceIdplusgrowthMonths(1–36, default 12); returns info, stats, contact, campaign defaults, growth history, top email clients, and the merge-field schemanotes[]explains empty growth or email-client arrays, separating "no data yet" from zero engagement
mailchimp_subscribers tool
audienceIdon every call andemailon every operation exceptlist(filterable bystatus); operations:list,get,update,archive,list-tags,set-tags,list-notes/add-note/update-note/delete-note(bynoteId), andlist-activity/list-events/list-goalsset-tagsis declarative:tagsbecomes the full active set and every other tag is removed unless named inpreserveTags. Mailchimp stores static-segment membership as a tag, so an unguarded sync drops it. ReturnstagsAdded,tagsRemoved, andtagsActive
mailchimp_upsert_subscriber tool
audienceId,email, andstatusrequired; optionalmergeFields,tags+preserveTags(same declarative sync asset-tags),note,vip,language;updateExistingStatus: falseappliesstatusto new records onlyReturns
isNew, the resultingstatus,tagsAdded/tagsRemoved/tagsFinal,noteAttached, andwebUrlstatus: "pending"sends Mailchimp's double opt-in email;"subscribed"needs documented consent
mailchimp_find_subscriber tool
email, scoped to oneaudienceIdor, when omitted, every audience on the account (echoed assearchedAcross)Returns
exactMatchesandfuzzyMatcheswith merge fields and stats;includeTags(defaulttrue) adds each match's tags at one extra call per match
mailchimp_import_subscribers tool
audienceIdand 1–500subscribersrows per call;statusdefaults topending(double opt-in) and a per-rowstatusoverrides it;updateExistingdefaults tofalse, so existing records are skippedReturns
totalCreated,totalUpdated,errorCount, and per-rowsucceededandfailedentries, failures carrying Mailchimp'serrorCode
mailchimp_segments tool
audienceIdon every call andsegmentIdon every operation exceptlist(filterable bytype:saved,static,fuzzy) andcreate;create/updatetakename,staticEmails, or saved-segmentoptionsbatch-update-membersappliesmembersToAdd/membersToRemoveto a static segment and returnsadded,removed, and per-emailerrorsFree plans get static and basic saved segments; advanced conditions need Premium and fail as
mailchimp_forbidden
mailchimp_merge_fields tool
list,get,create,update;createrequiresname,tag(10 characters max), andtype;get/updatetakemergeIdoptionscarries type-specific config:choicesfordropdown/radio,date_formatfordate/birthday,phone_formatforphone
mailchimp_campaigns tool
Operations:
list(filter bystatus,listId,sinceSendTime/beforeSendTime),get,create(typeofregular/plaintext/rss, plusrecipientsandsettings),update,replicate,get-content,set-content,get-checklist,cancel-send,create-resend,pause-rss,resume-rss; all butlistandcreatetakecampaignIdset-contentacceptshtml,plainText,templateId+templateSections,archiveContent,url, orlocalTemplate(exclusive withhtmlandtemplateId);get-checklistreturnsisReadyand typed itemsNo send, test, schedule, or delete here; dispatch goes through
mailchimp_send_campaignormailchimp_replicate_campaign
mailchimp_send_campaign tool
audienceId,subject,fromName,replyTo, andcontent(at least one ofhtml,plainText,templateId,localTemplate) required;modeisdraft(default),test(needstestEmails, max 50),send, orschedule(needsscheduleTimeat least 15 minutes out)Returns
campaignId, the effectivemode,status,recipientCount,webUrl, and non-blockingchecklistWarnings; blocking checklist errors throwpre_send_checklist_failedoutsidedraft, andcleanupOnError(defaulttrue) deletes the draft after a mid-flow failuresendandschedulerequireconfirmSend: true, then a confirmation prompt before any campaign is created; declining leaves a draft and setscancelledByUser
mailchimp_replicate_campaign tool
sourceCampaignIdplus optionalsubjectOverride,previewTextOverride,fromNameOverride,replyToOverride,titleOverride,audienceOverride,segmentOverride, andcontentOverride;mode,testEmails,scheduleTime, andcleanupOnErrorwork as inmailchimp_send_campaignReturns the new
campaignId,overridesApplied[], and the same status, checklist, andcancelledByUserfieldsSame
confirmSend: trueplus confirmation-prompt gate forsendandschedule
mailchimp_reports tool
list(filter bytype,sinceSendTime/beforeSendTime),get, orslicewith acampaignIdand adimension:abuse-reports,advice,click-details(one URL vialinkId),open-details(one member viasubscriberHash),domain-performance,eepurl,email-activity,locations,sent-to,unsubscribedslicereturnsrowsshaped by the dimension plustotalItems;getthrowscampaign_not_sentfor a campaign with no send
mailchimp_campaign_report tool
campaignIdplusincludeTopN(1–100, default 10) rows per sliceReturns
delivery(delivered, bounces by type, abuse reports),engagement(opens, clicks, unsubscribes),topClickedLinks,topLocations,recentUnsubscribes, andindustryBenchmarkswhen Mailchimp has them; throwscampaign_not_sentfor a campaign with no send
mailchimp_templates tool
list(filter bytypeofuser/base/gallery,category,folderId),get,get-default-content,create,update, anddelete;updateaccepts onlyname,html, andfolderId, so per-section edits go through a campaign'stemplateSectionsReads of
baseandusertemplates work on free plans; writes andgalleryreads need a paid plan and fail asmailchimp_forbidden.mailchimp_local_templatesis the authoring path on every plan
mailchimp_files tool
list(filter bytype,folderId,sinceCreatedAt/beforeCreatedAt),get,upload(namewith extension plus base64fileData, nodata:prefix),update(rename, or move withfolderId,0for root),delete, and read-onlylist-folders/get-folder; uploads cap at 1 MB per image and 10 MB per other file, and.webp/.avifare not accepteduploadandgetreturnfullSizeUrl, the public CDN URL to embed in campaign HTML;listaddstotalFileSizeInBytes
mailchimp_search tool
scope(membersorcampaigns) andquery;audienceIdnarrows a member search;includeTopN(1–100, default 10) caps each result arrayMembers return as
exactandfuzzywith upstreamtotalExact/totalFuzzy; campaigns asmatcheswith asnippetandtotalMatches; an empty result carries anote
mailchimp_assets tool
list,info(byrelPath; returnssha256and anycachedupload),sync(uploads uncached files ahead of a send; returnsuploaded,cached, andskippedwith reasons), andclear-cache@assets/<path>references in content passed tomailchimp_send_campaign,mailchimp_replicate_campaign, ormailchimp_campaignsset-contentupload to File Manager and are rewritten to CDN URLs. Uploads are cached by SHA-256 in<assetsDir>/.mailchimp-cache.json; oversize files and paths outside the directory are rejected before uploadListed only when
MAILCHIMP_ASSETS_DIRis set
mailchimp_local_templates tool
list,get(source plus parsed metadata),render-preview(nameplusvars; returns HTML, sends nothing), andseed-from-mailchimp(writes Mailchimp templatemailchimpTemplateIdto disk asname)Templates are
.etafiles with optional YAML frontmatter forsubject,previewText, andvars; a declared var left unsupplied fails the render. Campaign tools render one viacontent.localTemplate+content.localTemplateVars, exclusive withhtmlandtemplateId. Example templatesListed only when
MAILCHIMP_TEMPLATES_DIRis set
mailchimp_playbook tool
topic:send,post-send-review,deliverability,list-hygiene,onboarding,subscriber-triage, ordesign-campaign;audienceIdforsend/list-hygiene/design-campaign,campaignIdforpost-send-review,emailforsubscriber-triageReturns markdown
instructionstuned to live numbers, aliveStatesnapshot, andnextToolSuggestionswith pre-filled inputs; makes no writes
mailchimp://account resource
No parameters;
application/jsonwith profile, plan, data center, total subscribers, andfetchedAtSame data as
mailchimp_accountoperation: info
mailchimp://audiences/{audienceId} resource
Name, contact, stats, campaign defaults, permission reminder, double opt-in status, and subscribe URL
audienceIdcomes frommailchimp_audiencesoperation: list
mailchimp://campaigns/{campaignId} resource
Status, settings, recipients, tracking, and report summary
campaignIdcomes frommailchimp_campaignsoperation: list
mailchimp://campaigns/{campaignId}/report resource
Emails sent, bounces, opens, clicks, unsubscribes, abuse reports, and industry stats
Fails with a validation error until the campaign has been sent
newsletter_from_source prompt
Arguments:
source(URL or free-form brief) required;audienceIdandseasonalContextoptionalReturns one user message that chains
mailchimp_playbook(topic: design-campaign) into an HTML draft, then draft, test, and send viamailchimp_send_campaign
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Mailchimp-specific:
Marketing API v3 client that derives the API host and data center from the key's
-<dc>suffix, with retries, a process-wide concurrency limit (MAILCHIMP_CONCURRENCY_LIMIT), and a cooldown after a 429Send gates: campaign workflows default to
draft,send/scheduleneedconfirmSend: trueplus a confirmation prompt, and bulk imports default topendingNo irreversible deletes: removing audiences, merge fields, or campaigns, and permanently deleting subscribers, stay in the Mailchimp UI;
archiveis the strongest subscriber removalLocal authoring:
@assets/<path>files upload and rewrite at send time, and.etatemplates render locally, which covers free plans where the Templates API is read-onlyList operations page with
count(max 1000) andoffset
Agent-friendly output:
Explained empties:
note/notes[]on empty activity feeds, audience overviews, and searches say whether data is missing or genuinely zeroPartial failure:
mailchimp_import_subscribersandmailchimp_segmentsbatch-update-membersreturn per-row successes and errors instead of failing the batchDiscriminated outputs:
operation,dimension, andmodesay which fields are populated;isNewandcancelledByUserreport what actually happenedTyped errors: every declared reason (
campaign_not_sent,pre_send_checklist_failed,mailchimp_forbidden, …) carries a recovery hint for the caller's next move
Getting started
Add the following to your MCP client configuration file. See docs/api-key.md for how to generate a Mailchimp API key.
{
"mcpServers": {
"mailchimp-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/mailchimp-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"MAILCHIMP_API_KEY": "your-key-with-dc-suffix-e.g.-us22"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"mailchimp-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/mailchimp-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"MAILCHIMP_API_KEY": "your-key-with-dc-suffix-e.g.-us22"
}
}
}
}Or with Docker:
{
"mcpServers": {
"mailchimp-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-e", "MAILCHIMP_API_KEY=your-key-with-dc-suffix-e.g.-us22",
"ghcr.io/cyanheads/mailchimp-mcp-server:latest"
]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 MAILCHIMP_API_KEY=... bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.0 or higher (or Node.js v24+).
A Mailchimp Marketing API key. Its
-dcsuffix (e.g.-us22) identifies your data center and is parsed at startup.
Installation
Clone the repository:
git clone https://github.com/cyanheads/mailchimp-mcp-server.gitNavigate into the directory:
cd mailchimp-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# edit .env and set MAILCHIMP_API_KEYConfiguration
Variable | Description | Default |
| Required. Marketing API key, including the | none |
| API base URL override, for mock servers or tests. |
|
| Per-request timeout, in ms. |
|
| Retry attempts for transient upstream failures (0–10). |
|
| Max in-flight upstream requests across the process (1–10). |
|
| Absolute path to a local assets directory. Enables | none |
| Absolute path to a local templates directory. Enables | none |
| Transport: |
|
| HTTP server port. |
|
| Explicitly |
|
| Authentication: |
|
| Log level ( |
|
| Directory for log files (Node.js only). |
|
| Enable OpenTelemetry. |
|
| Base URL for traces and metrics; appends | none |
| Opt-in OTLP log endpoint, used as-is. The base endpoint does not enable log export. | none |
| Log failed-call arguments and results, redacted by key name and capped at |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Watch mode (transport via
MCP_TRANSPORT_TYPE):bun run dev # stdio (default) MCP_TRANSPORT_TYPE=http bun run dev # httpBuild and run:
bun run rebuild bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t mailchimp-mcp-server .
docker run --rm -e MAILCHIMP_API_KEY=your-key-us22 -p 3010:3010 mailchimp-mcp-serverThe Dockerfile defaults to HTTP transport, stateful session mode, and logs to /var/log/mailchimp-mcp-server. OpenTelemetry peer dependencies are installed by default; build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
|
|
| Tool definitions ( |
| Resource definitions ( |
| Prompt definitions ( |
| Mailchimp API client: HTTP, request pacing, retries, response normalization. |
| Local assets: discovery, hashing, upload cache, |
| Local templates: Eta rendering, frontmatter parsing, seeding from Mailchimp. |
| Example |
| API key guide and the email design playbook. |
| Vitest suites for config, services, tools, and the prompt. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped loggingRegister new tools and resources via the barrels in
src/mcp-server/*/definitions/index.tsWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Mailchimp MCP Pack — manage audiences, campaigns, and members via Mailchimp Marketing API.
Send transactional email and manage domains, audiences, and broadcasts from any MCP client.
Read audiences, members, campaigns and reports; add, update, tag and archive subscribers.
Read subscribers, groups, campaigns, fields, segments, automations, webhooks; safe additive writes.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that interfaces with the Mailchimp Marketing API to manage audiences, email campaigns, and subscribers. It enables users to create and schedule campaigns, handle member lists, and send test or live emails through natural language commands.1326 npmMIT
- AlicenseBqualityCmaintenanceA production-grade MCP server that integrates with the Mailchimp Marketing API to manage campaigns, audiences, members, and reports. It provides 28 specialized tools for automating marketing tasks such as sending emails, managing subscriber tags, and analyzing performance data.7117 PyPI1MIT
- FlicenseNot gradedqualityDmaintenanceEnables interaction with the Mailchimp API for managing campaigns, lists, templates, reports, and automations through natural language.3-
- AlicenseNot gradedqualityBmaintenanceManage Mailchimp audiences, campaigns, and members via the Mailchimp Marketing API through natural language queries.72 npmMIT