create_audience
Create a new Mailchimp audience/list for email marketing campaigns by specifying audience name, sender email, and company details.
Instructions
Create a new audience/list. Requires name, sender email, and company name.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| from_email | Yes | ||
| company | Yes | ||
| permission_reminder | No | You signed up on our website. | |
| from_name | No | ||
| country | No | US |
Implementation Reference
- mcp_mailchimp/server.py:418-452 (handler)The implementation of the 'create_audience' tool, which takes audience details and posts to the Mailchimp '/lists' endpoint. The registration is implied by the @mcp.tool() decorator, although the decorator appears to be just above the function definition (line 417).
async def create_audience( name: str, from_email: str, company: str, permission_reminder: str = "You signed up on our website.", from_name: str = "", country: str = "US", ) -> str: """Create a new audience/list. Requires name, sender email, and company name.""" mc = get_client() body = { "name": name, "permission_reminder": permission_reminder, "email_type_option": True, "contact": { "company": company, "address1": "", "city": "", "state": "", "zip": "", "country": country, }, "campaign_defaults": { "from_name": from_name or company, "from_email": from_email, "subject": "", "language": "en", }, } a = await mc.post("/lists", json=body) return _fmt({ "id": a["id"], "name": a.get("name", ""), "message": "Audience created.", })