Skip to main content
Glama
dazanza
by dazanza

list_audiences

Retrieve all Mailchimp audiences to obtain list IDs required for creating email campaigns.

Instructions

List all Mailchimp audiences/lists. Returns list IDs needed for campaign creation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of results to return (default 10, max 1000)

Implementation Reference

  • server.js:23-41 (handler)
    The definition and handler implementation for the list_audiences tool. It uses mailchimp.lists.getAllLists to retrieve audience data and formats it for the MCP response.
    server.tool(
      "list_audiences",
      "List all Mailchimp audiences/lists. Returns list IDs needed for campaign creation.",
      {
        count: z.number().optional().describe("Number of results to return (default 10, max 1000)"),
      },
      async ({ count }) => {
        const response = await mailchimp.lists.getAllLists({ count: count || 10 });
        const lists = response.lists.map((l) => ({
          id: l.id,
          name: l.name,
          member_count: l.stats.member_count,
          unsubscribe_count: l.stats.unsubscribe_count,
          open_rate: l.stats.open_rate,
          click_rate: l.stats.click_rate,
        }));
        return { content: [{ type: "text", text: JSON.stringify(lists, null, 2) }] };
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dazanza/mailchimp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server