How to Use the Mailchimp MCP in Mastra AI
Build resilient email marketing workflows in Mastra AI using this Mailchimp MCP Server.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Mailchimp MCP to Mastra AI
Create your Vinkius account to connect Mailchimp to Mastra AI and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Sync Mailchimp contacts with Mastra AI
`list_members` and `add_member` form the backbone of your audience management pipelines. Mastra AI can fetch your current subscriber base, compare it against an external database, and push missing records automatically. If an API call fails, the framework's built-in exponential backoff tries again. You dictate exactly how the workflow handles bad data. Set up conditional branching to tag bounced emails or clean dead contacts. The MCP Server runs these hygiene tasks reliably in the background without manual oversight.
Draft and configure email campaigns
`create_campaign` lets your agent draft entire newsletters from scratch. You can build a workflow that scrapes a blog, summarizes the posts, and generates an email draft. The tool returns the new campaign ID for the next step in your sequence. Before anything goes out, you can run `get_campaign` to verify the merge fields and subject lines. This MCP Server handles the payload formatting while your workflow engine manages the execution logic.
Enforce approvals on live sends
`send_campaign` fires emails to real people immediately. Because this action is permanent, you can use the `requireToolApproval` flag in your setup. The agent will pause the workflow and wait for a human to click approve before triggering the send. This keeps your marketing velocity high while preventing disastrous automated mistakes. You get the speed of AI drafting combined with the safety of manual verification.
Set up Mailchimp MCP in Mastra AI
Prerequisites
- Node.js 18+ and a TypeScript project
-
@mastra/mcp+@mastra/corepackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
npm install @mastra/mcp @mastra/coreplus your preferred model provider (e.g.@ai-sdk/openai). - 2
Configure the MCPClient
Create an
MCPClientwith your Vinkius endpoint as aURLobject. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Discover and inject tools
Call
mcpClient.listTools()and spread the result into your agent'stoolsobject. All Mailchimp tools become native Mastra tools. - 4
Run with any model
Swap
openai("gpt-4o")for any AI SDK-compatible provider. Callagent.generate()and the agent routes tool calls through MCP automatically.
import { MCPClient } from "@mastra/mcp";
import { Agent } from "@mastra/core/agent";
import { openai } from "@ai-sdk/openai";
const mcpClient = new MCPClient({
id: "mailchimp-mcp-client",
servers: {
"mailchimp-mcp": {
url: new URL(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
),
},
},
});
const agent = new Agent({
name: "Mailchimp Agent",
model: openai("gpt-4o"),
instructions: "You have access to Mailchimp tools.",
tools: {
...(await mcpClient.listTools()),
},
});
const result = await agent.generate(
"List recent Mailchimp transactions"
);
console.log(result.text); Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Mailchimp. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Mailchimp MCP in Mastra AI
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Mailchimp MCP today
We host it, we monitor it, we maintain it. You just paste one token.