Mailchimp MCP Server: Read-Only API for AI
Enable AI agents to access Mailchimp data via the MCP server read-only API for secure, seamless insights and integrations.
npx -y @AgentX-ai/mailchimp-mcpOverview
This MCP (Model Context Protocol) server provides a read-only bridge between AI agents and Mailchimp account data. It implements the MCP tool pattern to expose Mailchimp resources (audiences, campaigns, reports, templates, etc.) as structured, machine-readable endpoints so LLMs and automated agents can fetch contextual data without storing credentials or writing direct API integrations.
By keeping the server read-only, the project minimizes risk: AI agents can retrieve and analyze campaign metrics, audience segments, and subscriber details while preventing modifications to the Mailchimp account. This makes the server useful for analytics, prompt augmentation, RAG (retrieval-augmented generation), and agent-based automation workflows that require Mailchimp context.
Features
- Read-only access to Mailchimp data for safe AI consumption
- MCP-compatible endpoints that present Mailchimp resources as tools
- Lightweight server suitable for local, containerized, or cloud deployment
- Simple API key or environment-based authentication for the server itself
- Pluggable: add or extend resource handlers to expose additional Mailchimp endpoints
- JSON responses optimized for LLM consumption (compact, structured)
Installation / Configuration
Clone the repository and run the server locally or in Docker. The examples below assume a Node.js implementation; the project includes a Dockerfile for containerized runs.
- Clone and install
- Configure environment variables
Create a .env file (or set environment variables in your deployment):
MAILCHIMP_API_KEY=your-mailchimp-api-key-usX
MAILCHIMP_SERVER_PREFIX=usX # the datacenter prefix from your API key
MCP_SERVER_PORT=3000
MCP_API_KEY=local-mcp-secret # protects the MCP endpoints
LOG_LEVEL=info
- Run locally
# or
- Run with Docker
Notes
- MAILCHIMP_API_KEY should be a Mailchimp API key with read access.
- MCP_API_KEY secures requests to the MCP server; configure your agent to present this key when calling the tools.
Available Resources
The server exposes a set of read-only MCP tools representing common Mailchimp resources. Each tool returns JSON that’s normalized for AI consumption.
| Tool name (example) | Endpoint (example) | Returns |
|---|---|---|
| mailchimp.audiences | GET /mcp/tools/audiences | Audience metadata, counts, tags |
| mailchimp.members | GET /mcp/tools/audiences/:id/members | Subscribers for an audience (paged) |
| mailchimp.campaigns | GET /mcp/tools/campaigns | Campaign list and metadata |
| mailchimp.reports | GET /mcp/tools/campaigns/:id/report | Performance metrics and summary |
| mailchimp.templates | GET /mcp/tools/templates | Available templates and metadata |
| mailchimp.segments | GET /mcp/tools/audiences/:id/segments | Segment definitions and counts |
These endpoints are read-only and typically support pagination and basic filtering. Responses are JSON with concise field names to simplify prompt retrieval and reasoning.
Example requests
Fetch campaign summaries:
Get report for a campaign:
From Node.js (fetch):
;
;
Use Cases
- Agent-assisted analytics: An LLM agent can call the campaigns and reports tools to generate a natural-language performance summary (“Top 3 campaigns by open rate in the last 90 days”) without direct access to Mailchimp credentials.
- Contextual prompt augmentation: On-demand audience and segment data can be appended to prompts for personalized content generation (subject lines, email bodies) with accurate audience sizes and engagement metrics.
- Automated reporting: Scheduled agents can pull campaign reports and produce executive summaries or send aggregated results to dashboards.
- Subscriber research: Agents can query audience members and segments to identify trends, churn signals, or high-engagement cohorts for marketing analysis.
- Compliance and audit workflows: Because the server is read-only, auditors can safely run queries to verify subscriber counts, unsubscribes, and campaign sends without risk of state changes.
Resources & Links
- GitHub: https://github.com/AgentX-ai/mailchimp-mcp
- Mailchimp API docs: https://mailchimp.com/developer/
- MCP (Model Context Protocol): follow the MCP pattern used by your agent framework; this server exposes its tools in a compatible JSON format
If you need to expose additional Mailchimp endpoints or customize the tool schema, extend the tool handlers in the repository and follow the existing normalization patterns so LLMs can consume the results predictably.