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 — in plain language, from the assistant you already use.
Requirements
- A PostBeagle account (any plan, including free).
- An MCP client that supports remote servers (Streamable HTTP) with a bearer token, such as Claude Code or Cursor.
One-click connectors inside the Claude and ChatGPT apps use OAuth sign-in, which PostBeagle does not support yet.
Connect an assistant
- In PostBeagle, open Settings → AI assistant (MCP).
- Enter a name for the key (for example, "Claude 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
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 | 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."
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. |
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. |
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 and security
- 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 Settings → AI assistant (MCP) 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
"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 That is by design. Open the draft from the link it gave you and send it 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.