Skip to main content
Glama
AgentX-ai

Mailchimp MCP Server

by AgentX-ai

list_members

Retrieve all subscribers from a Mailchimp email list by providing the list ID to manage and analyze your audience data.

Instructions

List all members in a specific list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYesThe list ID

Implementation Reference

  • Handler for the 'list_members' tool call: extracts list_id from args, calls service.listMembers, maps members to summary fields, and returns formatted JSON text response.
    case "list_members": const members = await service.listMembers(args.list_id); return { content: [ { type: "text", text: JSON.stringify( members.members.map((m) => ({ id: m.id, email_address: m.email_address, status: m.status, member_rating: m.member_rating, last_changed: m.last_changed, })), null, 2 ), }, ], };
  • Tool schema definition for 'list_members': defines name, description, and input schema requiring 'list_id' string.
    { name: "list_members", description: "List all members in a specific list", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "The list ID", }, }, required: ["list_id"], },
  • Helper method in MailchimpService that implements listMembers by making a paginated API request to Mailchimp's /lists/{listId}/members endpoint.
    async listMembers(listId: string): Promise<{ members: MailchimpMember[] }> { return await this.makePaginatedRequest( `/lists/${listId}/members`, "timestamp_signup", "DESC" ); }

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/AgentX-ai/mailchimp-mcp'

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