← Back to blog

Give Your AI Agent the Ability to Send Emails

PushMail Team··4 min read

MCP (Model Context Protocol) is the open standard for giving AI agents access to external tools. Anthropic created it, donated it to the Linux Foundation, and it's now supported by Claude, Cursor, Windsurf, GPT, and a growing list of AI clients. The idea is simple: instead of an AI describing what it would do, it actually does it — calling real APIs, reading real data, performing real actions.

PushMail ships an MCP server with 15 tools that give your AI agent full access to your email infrastructure. Create contacts, build sequences, send campaigns, check analytics — all through natural language conversation. No other ESP offers this.

What the MCP server can do

The 15 tools cover everything you'd normally do in the dashboard or through the REST API:

Account and sites

  • Get account info, credit balance, and usage stats
  • List and create sites

Contacts

  • List and search contacts with filters (status, email, pagination)
  • Create contacts with tags and list assignments
  • Update contact fields and status

Lists and tags

  • Create lists, add/remove contacts from lists
  • Create tags, tag/untag contacts

Templates

  • List all email templates
  • Create new templates with subject lines and HTML bodies

Sequences

  • List sequences with status and step counts
  • Create sequences with email and delay steps
  • Activate, pause, or enroll contacts in sequences

Campaigns

  • List campaigns with delivery stats
  • Create and send (or schedule) campaigns to lists or tags

Analytics

  • List email events — deliveries, opens, clicks, bounces, spam reports, unsubscribes

Your AI agent gets the same capabilities as a developer using the API directly.

Setup: under 5 minutes

Option 1: Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "pushmail": {
      "command": "npx",
      "args": ["-y", "@pushmail/mcp"],
      "env": {
        "PUSHMAIL_API_KEY": "pm_live_your_api_key_here"
      }
    }
  }
}

On macOS, the config file is at ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows, it's %APPDATA%\Claude\claude_desktop_config.json.

Option 2: Cursor

Add this to .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "pushmail": {
      "command": "npx",
      "args": ["-y", "@pushmail/mcp"],
      "env": {
        "PUSHMAIL_API_KEY": "pm_live_your_api_key_here"
      }
    }
  }
}

Option 3: CLI

Run it directly:

npx @pushmail/mcp --api-key pm_live_your_api_key_here

That's it. No OAuth flows, no webhook configuration, no server to deploy. The MCP server runs locally and communicates with PushMail's API using your key.

What you can ask your AI agent

Once connected, you talk to your agent in natural language and it calls the appropriate PushMail tools. Here are real examples:

Building a drip sequence:

"Create a welcome sequence with 3 emails. First email sends immediately with the subject 'Welcome to Acme'. Second email sends 2 days later about getting started. Third email sends 4 days after that about our premium features."

The agent will create three templates, then create a sequence with alternating email and delay steps — all in one conversation.

Checking analytics:

"How many emails bounced this week? Show me the addresses."

The agent calls pushmail_list_events filtered by bounce type and summarizes the results.

Managing contacts:

"Enroll all contacts tagged 'trial' in the onboarding sequence."

The agent lists contacts filtered by tag, gets the sequence ID, then enrolls them.

Sending a campaign:

"Send a campaign to the 'newsletter' list about our new API versioning feature. Use a professional tone, include a code example showing the version header."

The agent creates a template with the content, creates a campaign targeting the list, and sends it.

Operational tasks:

"Create a tag called 'churned' and apply it to all contacts with status 'unsubscribed'."

The agent creates the tag, lists unsubscribed contacts, and tags them in batch.

Why this matters

Email infrastructure work is repetitive. Creating templates, setting up sequences, segmenting contacts, scheduling campaigns — it's necessary but not where developers should be spending their time.

With MCP, the entire email operations layer becomes conversational. Instead of clicking through a dashboard or writing API integration code for a one-off campaign, you describe what you want and it happens. The agent handles the API calls, the parameter formatting, the multi-step orchestration.

This is particularly useful for:

  • Solo developers managing email alongside everything else. Ask your agent to handle the email ops while you ship features.
  • Agencies managing multiple client sites. "Set up the same welcome sequence on the new client's site" becomes a single conversation.
  • Prototyping email flows. Describe a sequence, see if it works, iterate — all without writing code or clicking through forms.

The agent also has read access to your analytics, so it can answer questions like "what's my open rate on the onboarding sequence?" or "which campaign had the highest click rate this month?" without you ever opening the dashboard.

No other ESP does this

Not SendGrid. Not Postmark. Not Resend. Not Amazon SES. Not ConvertKit. Not Mailchimp.

As of today, PushMail is the only email infrastructure platform shipping MCP tools. Every other ESP requires you to either use their dashboard manually or write custom API integration code. There's no middle ground — no way to delegate email operations to an AI agent that can reason about what you're asking and execute the right sequence of API calls.

MCP is the interface layer between AI and infrastructure. Email is one of the most obvious use cases. We built it because we use it ourselves — and because email ops shouldn't require a human in the loop for every campaign, every tag, every sequence step.

Get your API key from the dashboard, drop the config into Claude or Cursor, and start talking to your email infrastructure.