Mailchimp MCP server

Integrates with Mailchimp's marketing platform API to enable email campaign management, creation, sending, and automation workflow control through the FastMCP framework.
Back to servers
Provider
Bryan G Smith
Release date
Mar 12, 2025
Language
Python

This server facilitates Mailchimp API interactions using the Model Context Protocol (MCP), making it easier to integrate Mailchimp functionality into your applications. It acts as a middleware layer that transforms standard requests into properly formatted Mailchimp API calls.

Installation

To install the Mailchimp MCP server, follow these steps:

  1. Clone the repository:

    git clone https://github.com/yourusername/MailchimpMCP.git
    cd MailchimpMCP
    
  2. Install dependencies:

    npm install
    
  3. Configure your environment variables by creating a .env file in the root directory:

    MAILCHIMP_API_KEY=your_mailchimp_api_key
    MAILCHIMP_SERVER_PREFIX=us1 # or your specific server prefix
    PORT=3000 # optional, defaults to 3000
    

Usage

Starting the Server

To start the MCP server:

npm start

The server will run on port 3000 by default, or on the port specified in your environment variables.

Interacting with the Server

The server accepts requests in MCP format. Here are some common usage examples:

Getting Lists

To retrieve all Mailchimp lists (audiences):

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "actions": [
      {
        "name": "listLists",
        "parameters": {}
      }
    ]
  }'

Creating a Subscriber

To add a new subscriber to a specific list:

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "actions": [
      {
        "name": "addSubscriber",
        "parameters": {
          "list_id": "your_list_id",
          "email": "[email protected]",
          "status": "subscribed",
          "merge_fields": {
            "FNAME": "John",
            "LNAME": "Doe"
          }
        }
      }
    ]
  }'

API Reference

The MCP server supports the following actions:

  • listLists: Get all audience lists
  • getList: Get details of a specific list
  • addSubscriber: Add a subscriber to a list
  • getSubscriber: Get subscriber details
  • updateSubscriber: Update a subscriber's information
  • createCampaign: Create a new email campaign
  • sendCampaign: Send a previously created campaign

Troubleshooting

Common Errors

  • Authentication Errors: Check that your Mailchimp API key is correct in the .env file
  • Server Prefix Errors: Ensure your Mailchimp server prefix is correct (usually the last part of your API key after the dash)
  • Rate Limiting: Mailchimp API has rate limits; the server will return appropriate error messages if limits are exceeded

Logging

The server logs all requests and responses. Check the console output for debugging information when encountering issues.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later