list_newslettersscope: readREST: GET /api/v1/newslettersList the newsletters in this workspace with their id, name, slug and number of active subscribers. Call this first to get a newsletter_id for the other tools.
No fields.
MailClanker · Docs · REST API
Run your newsletter from Claude, Cursor or any client that speaks the Model Context Protocol: “draft this week's issue from my changelog”, “how did the last issue do?”, “add these three beta users”.
In API keys, create a key for the agent with only read (to look) and write (to draft, test, manage subscribers and ask for sends). The server is at:
https://mailclanker.com/api/mcp
Never give an agent a key with the send scope. A send-scoped key can email your subscribers through the REST API with no approval step, so the MCP server refuses it (403 send_scope_not_allowed). Agents ask for sends with request_send and a person approves them.
Streamable HTTP transport, authenticated with Authorization: Bearer pk_live_… (the same keys, scopes and 60 requests a minute as the REST API).
claude mcp add --transport http newsletter https://mailclanker.com/api/mcp --header "Authorization: Bearer pk_live_xxx"
Add a custom connector with the URL above if your plan supports remote connectors with headers. Otherwise add this to claude_desktop_config.json (Settings → Developer → Edit config):
{
"mcpServers": {
"newsletter": {
"type": "http",
"url": "https://mailclanker.com/api/mcp",
"headers": {
"Authorization": "Bearer pk_live_xxx"
}
}
}
}Older Desktop versions that only run local servers can bridge with mcp-remote:
{
"mcpServers": {
"newsletter": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mailclanker.com/api/mcp",
"--header",
"Authorization:Bearer ${API_KEY}"
],
"env": {
"API_KEY": "pk_live_xxx"
}
}
}
}In ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"newsletter": {
"url": "https://mailclanker.com/api/mcp",
"headers": {
"Authorization": "Bearer pk_live_xxx"
}
}
}
}Any client with Streamable HTTP and custom headers works. To try the tools by hand:
npx @modelcontextprotocol/inspector --cli https://mailclanker.com/api/mcp --transport http \ --header "Authorization: Bearer pk_live_xxx" --method tools/list
Agents can be tricked by text they read (prompt injection) or simply make mistakes, so an agent can never send to your subscribers on its own:
request_send does not send. It checks the post and emails your workspace's owners and admins a link to review it, with the subject, a preview, the number of recipients and the credit cost. It also shows under Approvals.Posts an agent created or edited also can't be scheduled or put on the public web archive with an API key until a person has approved them. API keys and agents can never change sending domains, delete newsletters, export subscriber lists, change billing or safety settings.
Every call is logged in your workspace's audit log. Results are compact JSON plus a one-line summary. Resource: newsletter://{newsletter_id}/posts/{post_id} (Markdown). Prompts: write_weekly_issue, repurpose_blog_post.
list_newslettersscope: readREST: GET /api/v1/newslettersList the newsletters in this workspace with their id, name, slug and number of active subscribers. Call this first to get a newsletter_id for the other tools.
No fields.
get_accountscope: readREST: GET /api/v1/accountAccount status (trial, active, review, suspended), credit balance (1 credit = 1 email; AI features cost credits) and how many campaign emails can still be sent today.
No fields.
list_postsscope: readREST: GET /api/v1/newsletters/{id}/postsRecent posts (issues) of a newsletter, newest first, with status (draft, scheduled, sending, sent, …), approval status and key stats for sent posts. Use get_post for the content.
| Field | Type | Notes |
|---|---|---|
| newsletter_id * | string (uuid) | |
| status | "draft" | "scheduled" | "sending" | "paused" | "sent" | "cancelled" | "failed" | Only posts with this status |
| limit | integer (1–100) | Default: 20. |
| cursor | string (max 300 chars) | next_cursor from a previous call |
get_postscope: readREST: GET /api/v1/posts/{id}One post: title, subject, preview text, Markdown content, status, approval status, the latest pre-send check and stats totals.
| Field | Type | Notes |
|---|---|---|
| post_id * | string (uuid) |
create_draftscope: writeREST: POST /api/v1/newsletters/{id}/postsCreate a draft post from Markdown. Nothing is sent. Returns the post and a dashboard_url where a person can review it. Content: Markdown (CommonMark + ~~strike~~; no raw HTML). Extra blocks on their own line: ::button[Label](https://url) and ::embed[Title](https://url "https://thumbnail"). Merge tags: {{first_name|fallback}}, {{name}}, {{email}}, {{custom.field}}.
| Field | Type | Notes |
|---|---|---|
| newsletter_id * | string (uuid) | |
| title * | string | Internal title; also used for the web archive URL |
| subject * | string | Email subject line |
| preview_text | string | Inbox preview text |
| content_markdown * | string | The email body as Markdown |
| slug | string | Web archive URL slug (generated from the title if omitted) |
| publish_to_web | boolean | Put it on the public archive once sent |
update_draftscope: writeREST: PATCH /api/v1/posts/{id}Change a draft (drafts only). Send only the fields to change. Any change cancels an open send request; ask again with request_send. Content: Markdown (CommonMark + ~~strike~~; no raw HTML). Extra blocks on their own line: ::button[Label](https://url) and ::embed[Title](https://url "https://thumbnail"). Merge tags: {{first_name|fallback}}, {{name}}, {{email}}, {{custom.field}}.
| Field | Type | Notes |
|---|---|---|
| post_id * | string (uuid) | |
| title | string | |
| subject | string | |
| preview_text | string | |
| content_markdown | string | |
| slug | string | |
| publish_to_web | boolean | |
| revision | integer | The revision you last read; refused if the post changed since |
generate_draftscope: writeWrite a draft with the built-in AI writer from notes or a public web page (e.g. a changelog or blog post) and save it as a draft. Costs 500 credits. Nothing is sent. Give either notes or source_url.
| Field | Type | Notes |
|---|---|---|
| newsletter_id * | string (uuid) | |
| notes | string | Bullet points or rough notes to write from |
| source_url | string | A public http(s) page to write from |
| tone | string (max 200 chars) | e.g. friendly, concise, technical |
run_precheckscope: writeREST: POST /api/v1/posts/{id}/precheckRun the pre-send check on a post's saved content: compliance (footer, postal address), spam and phishing patterns, links, merge tags. Returns pass/warn/blocked, a score and issues with fixes. The AI part costs 20 credits; re-running on unchanged content is free.
| Field | Type | Notes |
|---|---|---|
| post_id * | string (uuid) |
send_testscope: writeREST: POST /api/v1/posts/{id}/testEmail a test of the post (subject prefixed [Test]) to workspace members only. Without emails it goes to the person who created this API key. Max 5 recipients per call, 50 per day. Free.
| Field | Type | Notes |
|---|---|---|
| post_id * | string (uuid) | |
| emails | string[] | Workspace members' addresses; default: the API key creator |
request_sendscope: writeAsk a person to approve sending a draft to the newsletter's subscribers. This does NOT send. It checks the post (pre-send check, sending domain, audience), then emails the workspace owners and admins an approval link and returns that link, the recipient count and the credit cost. The send starts only after an owner or admin approves it. Any later edit cancels the request.
| Field | Type | Notes |
|---|---|---|
| post_id * | string (uuid) | |
| send_at | string (date-time) | ISO 8601 time to send once approved; omit to send as soon as it's approved |
get_post_statsscope: readREST: GET /api/v1/posts/{id}/statsResults of a sent post: totals (sent, delivered, bounced, complaints, unsubscribes, unique opens and clicks), rates, clicks per link and a plain-English summary. Opens are approximate.
| Field | Type | Notes |
|---|---|---|
| post_id * | string (uuid) |
summarize_performancescope: readAI summary of a newsletter's subscriber growth and engagement over the last `days` days (default 30), with one suggestion. Costs 120 credits.
| Field | Type | Notes |
|---|---|---|
| newsletter_id * | string (uuid) | |
| days | integer (7–365) | Default: 30. |
add_subscriberscope: writeREST: POST /api/v1/newsletters/{id}/subscribersAdd one subscriber. Always uses double opt-in: they get a confirmation email and only receive the newsletter after confirming. The newsletter needs a verified sending domain (the confirmation is sent from it), and confirmation emails have a daily limit per workspace. Adding an existing address returns it unchanged; suppressed addresses (unsubscribed, bounced, complained) are refused.
| Field | Type | Notes |
|---|---|---|
| newsletter_id * | string (uuid) | |
| email * | string | |
| first_name | string | |
| tags | string[] |
search_subscribersscope: readREST: GET /api/v1/newsletters/{id}/subscribersFind subscribers of a newsletter by a text query (matches email and names), status and/or tag. At most 50 results; this is not an export.
| Field | Type | Notes |
|---|---|---|
| newsletter_id * | string (uuid) | |
| query | string (max 200 chars) | |
| status | "pending" | "active" | "unsubscribed" | "bounced" | "complained" | |
| tag | string (max 100 chars) | |
| limit | integer (1–50) | Default: 20. |
unsubscribe_subscriberscope: writeREST: POST /api/v1/subscribers/{id}/unsubscribeUnsubscribe someone (they stop receiving the newsletter and are added to its suppression list). Give subscriber_id, or newsletter_id and email.
| Field | Type | Notes |
|---|---|---|
| subscriber_id | string (uuid) | |
| newsletter_id | string (uuid) | |
| string |