Skip to main content
Glama

ping

Validate Mailchimp API credentials and retrieve account details including name, email, and subscriber count.

Instructions

Validate your Mailchimp API key and get account info (name, email, total subscribers).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'ping' tool is defined as an asynchronous function decorated with @mcp.tool(). It validates the Mailchimp API key by making a request to the '/ping' endpoint and returns formatted account information.
    @mcp.tool()
    async def ping() -> str:
        """Validate your Mailchimp API key and get account info (name, email, total subscribers)."""
        mc = get_client()
        try:
            await mc.get("/ping")
            root = await mc.get("/")
            return _fmt({
                "status": "connected",
                "account_name": root.get("account_name", ""),
                "email": root.get("email", ""),
                "account_id": root.get("account_id", ""),
                "total_subscribers": root.get("total_subscribers", 0),
                "data_center": mc.dc,
            })
        except MailchimpError as e:
            return f"Connection failed: {e}"

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

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