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.
To install the Mailchimp MCP server, follow these steps:
Clone the repository:
git clone https://github.com/yourusername/MailchimpMCP.git
cd MailchimpMCP
Install dependencies:
npm install
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
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.
The server accepts requests in MCP format. Here are some common usage examples:
To retrieve all Mailchimp lists (audiences):
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{
"actions": [
{
"name": "listLists",
"parameters": {}
}
]
}'
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"
}
}
}
]
}'
The MCP server supports the following actions:
.env
fileThe server logs all requests and responses. Check the console output for debugging information when encountering issues.
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.
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"
]
}
}
}
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.
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.