AI Assistants (MCP)
PostBeagle has a built-in Model Context Protocol (MCP) server. Connect an AI assistant such as Claude and it can read your campaign and audience reports and prepare campaign drafts, templates and automations — in plain language, from the assistant you already use.
Requirements
- A PostBeagle account (any plan, including free).
- An AI assistant that supports remote MCP servers: Claude (web, desktop and mobile), ChatGPT, Claude Code, Cursor and others.
Connect by signing in (Claude, ChatGPT, Claude Code)
- In your assistant, add a custom connector (also called an MCP server or app) with the URL
https://api.postbeagle.com/mcp. Leave any key or header fields empty. - Connect it. PostBeagle opens in your browser: log in if asked, check which app is asking, and click Allow.
- You are sent back to the assistant, connected.
In Claude Code, run:
claude mcp add --transport http postbeagle https://api.postbeagle.com/mcp
then run /mcp inside Claude Code and choose PostBeagle to sign in.
Assistants you connect this way are listed under AI Assistant → Connected assistants, where you can disconnect them.
Connect with a key (Cursor and other clients)
For assistants that can't sign in, use a key instead:
- In PostBeagle, open AI Assistant.
- Enter a name for the key (for example, "Cursor on my laptop") and click Create key.
- Copy the key. It starts with
pbmcp_and is shown only once. - Add PostBeagle to your assistant using one of the snippets below. The same snippets, with your key filled in, are shown next to the new key.
Claude Code with a key
claude mcp add --transport http postbeagle https://api.postbeagle.com/mcp --header "Authorization: Bearer pbmcp_YOUR_KEY"
Cursor and other clients (JSON config)
{
"mcpServers": {
"postbeagle": {
"url": "https://api.postbeagle.com/mcp",
"headers": {
"Authorization": "Bearer pbmcp_YOUR_KEY"
}
}
}
}
Connection details
| Endpoint | https://api.postbeagle.com/mcp |
| Transport | Streamable HTTP (POST), stateless |
| Authentication | OAuth 2.1 sign-in, or Authorization: Bearer pbmcp_… |
Things to ask
- "How did my last campaign do?"
- "Which of this month's campaigns earned the most revenue, and which links got clicked?"
- "Which of my lists has the most unsubscribes?"
- "Draft a newsletter about our autumn sale for the Customers list."
- "Build an email about our newest Compressport products."
- "Make the intro shorter and change the button text to 'Shop the sale'."
- "Send me a test of that draft."
- "Set up a three-email welcome series for new subscribers to the Newsletter list."
- "Make an abandoned-cart flow: one reminder after an hour, and a second a day later if they haven't clicked."
- "How is my welcome series doing? Which email in it earns the most?"
- "How much revenue did email bring in last month, and from which campaigns and automations?"
- "Make a segment of customers who bought shoes in the last year but haven't ordered in 90 days."
After creating or changing a draft, the assistant gives you a link that opens it in the email builder.
Tools
Reports
| Tool | What it returns |
|---|---|
get_account_overview | Sending status and reputation (score, tier, daily limit and usage), audience totals, contact growth over the last 30 days, and the default sender. |
list_campaigns | Campaigns, newest first, with headline results: sent, opens, clicks, unsubscribes, bounces, attributed revenue. Can be filtered by status. |
get_campaign_report | Full results for one campaign, including delivery, complaints, coupons, attributed revenue and its most-clicked links. |
list_lists | Email lists with total, active, unsubscribed and bounced subscriber counts. |
list_segments | Saved segments with their rules and member counts. |
get_audience_growth | Contacts added and removed, and the net change, over a date range. |
list_automations | Automations with their trigger, whether they are on, how many contacts entered and finished, and this month's sends and revenue. |
get_automation_report | Full results for one automation: contacts entered, finished and failed, sends, opens, clicks, attributed revenue, and revenue per email. |
get_revenue_overview | Revenue attributed to email over a date range: campaigns in total, each automation, and the top campaigns sent in that period. |
search_products | Products in your connected store's catalog, found by words in the name, SKU or category, or listed newest first. Returns the IDs an assistant puts in a Products block. |
All reports are aggregate. No tool returns a contact, a recipient list or an export.
Drafts
| Tool | What it does |
|---|---|
create_campaign_draft | Creates a new campaign as a draft, with a subject, preview text, body and (optionally) the lists or segment to send to. |
get_campaign_content | Reads a campaign's subject, preview text and body as content blocks. |
update_campaign_draft | Changes a draft's name, subject, preview text, body or lists. Only drafts can be changed. |
send_test_email | Emails a test copy to the account owner's address. Limited to 25 tests per hour. |
Templates and automations
| Tool | What it does |
|---|---|
list_templates | Your saved email templates. |
create_template | Saves a new email template, built from the same blocks as a draft. It appears under Templates. |
get_template_content | Reads a template as content blocks, and which automations send it. |
update_template | Changes a template's name, description or content. |
create_automation | Creates an automation: a trigger, then emails, waits and yes/no conditions. Each email is a saved template. The automation is created switched off. |
get_automation | Reads an automation's trigger and steps. |
update_automation | Changes a switched-off automation's name, trigger or steps. |
An assistant-made automation opens in the automation builder like any other. Nothing is sent until you review it and turn it on.
An assistant cannot change an automation that is switched on, or the content of a template a switched-on automation sends: either would change live emails without your review. Switch the automation off first. When an assistant edits an automation, steps it cannot express (webhooks, tag and list steps, branded emails, field conditions) are carried over untouched, and the builder lays the flow out afresh.
Triggers an assistant can use: a contact subscribing (to any list or one list), a manual trigger, and the store events order placed, first purchase, repeat purchase, product purchased, cart abandoned and customer win-back. Conditions can check whether a contact can still be mailed, has opened or clicked, hasn't opened their last few emails, or joined more than a number of days ago. Webhook, tag, list and contact-field steps are added in the builder.
Segments
| Tool | What it does |
|---|---|
create_segment | Saves a segment of one list and returns how many contacts match. |
Segment rules an assistant can use: tags, engagement, contact status, signup source, double opt-in, date added, campaign opens and clicks, link clicks, open and click counts, and purchase history (order count, total spent, average order value, first and last order date, products and categories bought). Rules that match one person by email, name, phone or a custom field are left out, so an assistant can't use a segment's size to check whether someone is on your list.
How drafts are built
An assistant does not write HTML. It sends an ordered list of content blocks, and PostBeagle turns them into the same blocks the email builder uses. A draft made by an assistant therefore opens in the builder like any other campaign: you can restyle, rewrite, reorder and add blocks.
Blocks an assistant can write:
| Block | Notes |
|---|---|
| Heading | Text, with optional alignment. |
| Text | Paragraphs with simple inline formatting and links. Merge tags such as {{first_name}} work. |
| Image | By public URL, with optional alt text and link. Without a URL, a placeholder is left for you to fill in. |
| Button | Text and link. Uses your brand colour. |
| Article | An image beside a block of text. |
| Columns | Two or three columns of headings, text, images and buttons. |
| Quote | A pull quote with an optional author. |
| List | Bullet points. |
| Products | A grid of product cards from your connected store: specific products the assistant found with search_products (up to 8 per block), or your best sellers or newest products. Images, names, prices and links are filled in from your catalog at send time. |
| Divider / Spacer | For deliberate separation. |
Every draft also gets:
- your brand logo as a header, when one is set under Settings → Brand;
- the standard footer with your company address and the unsubscribe link. The footer is always present, even if the assistant leaves it out.
Editing a draft you have already styled
When an assistant updates a draft, it reads the current blocks first and sends the full list back.
- Blocks it does not change are kept exactly as you left them.
- Blocks it rewrites keep their styling (colours, spacing, alignment).
- Blocks it cannot write itself — coupons, product cards, social icons, custom HTML, the header and the footer — are carried over untouched.
A few things are left to the app:
- Campaigns built from imported custom HTML cannot be edited by an assistant.
- The designs of A/B test variants are edited in the builder.
- Scheduled and sent campaigns are read-only.
Keys, connections and security
-
Signing in from an assistant gives it the same tools as a key, nothing more. Disconnect it under AI Assistant → Connected assistants and it loses access immediately.
-
MCP keys are separate from your API key. Creating one does not affect your API key or your WooCommerce connection.
-
An MCP key is accepted only by the MCP server, not by the REST API. Whoever holds a key can use the tools listed above and nothing else.
-
You can have up to 10 keys. Use one per assistant or device so you can revoke them individually.
-
To revoke a key, open AI Assistant and click the bin icon next to it. It stops working immediately.
-
PostBeagle stores only a hash of each key, which is why a key cannot be shown again after it is created.
Reports an assistant reads are sent to that assistant's provider. Review your provider's data terms before connecting it.
Troubleshooting
The assistant asks you to sign in again The connection was disconnected under AI Assistant, or it was not used for 90 days. Connect again from the assistant.
"Missing or invalid MCP key" (401)
The key is wrong, was revoked, or the header is missing. The header must be exactly
Authorization: Bearer pbmcp_…. A REST API key does not work here.
The assistant says it cannot send the campaign or turn on the automation That is by design. Open it from the link it gave you, review it, and send it or switch it on in PostBeagle.
"Only draft campaigns can be changed" The campaign is scheduled, sending or sent. Duplicate it in PostBeagle to get an editable draft.
"This campaign uses custom HTML rather than builder blocks" The campaign was built from imported HTML. Edit it in the builder's HTML view.
A products block is missing from the email Product grids need a connected WooCommerce store with a synced catalog. Without one, the block is left out of the email.
"Test email limit reached" (429) Test sends are limited to 25 per hour per account, across the app and all assistants.