Skip to content

How to run a newsletter with Claude Code

Claude Code can draft, test and schedule a FlockStack newsletter through the MCP server, and stop at the send until you approve it. This guide makes a key that can't send on its own, connects Claude Code with one command and walks through a first issue. It says what Claude Code does, what FlockStack checks and what stays your decision.

By FlockStackPublished

To run a newsletter with Claude Code, give it a FlockStack API key at the send with approval level, add FlockStack as an MCP server with one command, and ask it to draft an issue. Claude Code can write the issue, check it and send you a test. The send waits for you on FlockStack's Approvals page.

What you need

  • A FlockStack account. The MCP server comes with every plan, the Free plan included. See pricing for what your plan sends.
  • Claude Code, installed and signed in.
  • Your region. A US account connects to https://flockstack.io/mcp, an EU account to https://eu.flockstack.io/mcp. A key only works in its own region.

Who does what

Five different jobs get called "AI for newsletters". Here they are, so you know which one you are setting up.

Job Who does it here Notes
Writing the words Claude, in your Claude Code session FlockStack has a few small writing helpers of its own, such as suggest_subject_lines. They run on Cloudflare Workers AI against a daily allowance that get_ai_usage reports
Doing the steps in your account Claude Code, calling FlockStack's MCP tools One tool for each of the dashboard's actions your key may run
Running without you after setup FlockStack's automations A welcome series runs on its own once it is switched on. Switching it on is a send, so it waits for approval too
Publishing from code The REST API The same actions, called by a program you wrote. MCP or API explains when to pick which
Approving the send You In the dashboard, signed in. No key, app or tool can do it for you

Step 1: make a key that can't send on its own

Open the API keys page in the dashboard and create a key.

  1. Name it Claude Code.
  2. Pick the level send with approval. It does the work, then asks you before anything goes out or can't be undone: sends, schedules, deletes and large imports wait for your OK.
  3. Optional, and worth it: a key can also be limited to one newsletter, given a cap on calls a day and set to expire. The agent safety guide shows the API call that sets them.
  4. Copy the key. It starts with mc_ (mc_eu_ in the EU) and is shown once.

Put it in your shell:

Terminal
export FLOCKSTACK_API_KEY="mc_your_key"

Don't use full access for this. It does everything the dashboard does with no review, sending included. The authentication guide describes all five levels.

Step 2: add FlockStack to Claude Code

Terminal
claude mcp add --transport http --scope user flockstack https://flockstack.io/mcp \
  --header "Authorization: Bearer $FLOCKSTACK_API_KEY"

--scope user makes the server available in every project. Without it, Claude Code adds the server to the current project only. The shell fills in the key when you run the command, so Claude Code stores the key itself in its settings: keep that file private. For an EU account, use https://eu.flockstack.io/mcp in place of the address.

Check that it connected:

Terminal
claude mcp get flockstack

Inside Claude Code, /mcp shows the same. A key only sees the tools its level can run, so a send with approval key will not list the tools that need full access, such as create_api_key.

Step 3: start by reading

Ask for something that changes nothing:

List my FlockStack newsletters. Then read the agent brief for the weekly one and tell me what is planned this week.

The tools involved are list_newsletters and get_agent_brief. The brief is built from the newsletter's real recent results, its scheduled sends and its content calendar. Where there is no evidence, it says so rather than guessing. Reading creates and publishes nothing.

If you run more than one newsletter, name the one you mean. An action that takes a newsletter uses the first one you created when it is left out. Managing several newsletters with agents covers keys that reach one newsletter only.

Step 4: draft and test an issue

Draft this week's issue from these three links, as a draft campaign in the weekly newsletter. Don't send or schedule anything. Run the pre-send check, then send a test to me.

What happens, and which tool does it:

  • create_campaign makes a draft. Nothing is sent. The body can be Markdown, rich text or an HTML email.
  • check_campaign runs the dashboard's ready-to-send check: subject and preview text, the unsubscribe link and postal address, the sender address, links, image alt text, merge tags, who it goes to and the plan's limits. It also runs the claim check, which flags figures in a paragraph that no page it links to supports.
  • send_test_email sends the campaign, with [Test] in the subject, to the account owner or to up to 10 addresses you name. Nobody on your list gets it.

Open the test in your inbox. The words are Claude's; whether they are right is yours to judge. The check tells you what is missing from the email, not whether your facts are true.

Step 5: schedule it, and approve it

Schedule it for Thursday at 9:00 in my time zone.

With a send with approval key, schedule_campaign does not schedule anything. It answers with a result, not an error, that starts like this (abridged from the agent safety guide, where the action is send_campaign):

JSON
{
  "status": "approval_required",
  "approvalId": "6650f1c2e9b1d4a0123456a1",
  "action": "send_campaign",
  "retryAfter": 30
}

Nothing has happened yet. FlockStack emails you and shows a banner in the dashboard. On the Approvals page you see the subject, who it goes to, how many contacts and the exact input, with a link to open the draft. Open the draft and read it, then approve or reject.

  • Approve: the stored action runs once, as the key that asked.
  • Reject: it does not run, and Claude Code reads your note.
  • Nothing for 24 hours: it expires and nothing runs.

Claude Code reads the outcome with get_approval_status, polling every retryAfter seconds. The request can't be edited after it is made. If the campaign changes after the request, approving asks you to look again. Only a signed-in person can approve; no key, connected app or MCP tool can, even with full access.

Once you approve a schedule, the issue goes out at its time without asking again, unless it is unscheduled first. Claude Code does not need to be running.

Claude Code's prompts are not the approval

Claude Code asks permission before it runs an MCP tool, and the tools that send are marked as ones that can't be undone, so most clients ask first. You can tell Claude Code to always allow a tool, and in its bypassPermissions mode it skips prompts altogether. That is your setting on your machine.

The approval above does not depend on it. It sits on the key, on FlockStack's side, so it holds when Claude Code is set to allow everything. You can also turn on Ask me before an agent sends for a newsletter on the Approvals page: then sends and deletes wait for you whatever the key's level, full access included.

What it does not do

  • It does not decide what is true. Claude writes the issue. Read it before you approve.
  • It does not run on its own. Claude Code works when you start it. What runs without you is FlockStack: an approved schedule, or an automation you switched on.
  • A send with approval key still changes things without asking. It can edit settings, pages, contacts and tags. Only sends, schedules, deletes and large changes of contacts wait for you: an import of more than 25 contacts in a call, or more than 100 changed in a day. Use a drafts key if that is too much.
  • Approvals have limits. A key can have at most 10 waiting at once, an account at most 50, and each expires after 24 hours. Past a limit, FlockStack tells the caller to wait.
  • Rate limits apply. A key gets 300 requests a minute across REST and MCP, and each send action has an hourly limit of its own, listed in the authentication guide.
  • The same checks apply as in the dashboard: plan limits, the from address, the postal address, and campaigns that pause when bounces or complaints climb.

Every call that changes something is in the activity log, with the key, the newsletter and how it ended. Calls that were refused are there too. The log is kept 90 days.

Other assistants

Claude, ChatGPT and Grok Bot connect by signing in to FlockStack, with no key to copy. Codex and Cursor use a key like Claude Code does. The MCP documentation has each one's steps, including ChatGPT and Claude.

Sources

  • Claude Code's MCP documentation: claude mcp add with --transport http and --header, the default local scope and --scope user, claude mcp get and list, and /mcp inside Claude Code: code.claude.com, checked
  • Claude Code's permissions documentation: MCP tools ask permission, allow rules skip the prompt, and bypassPermissions mode skips prompts: code.claude.com, checked
  • FlockStack's MCP documentation: the Claude Code command, the key at the level the work needs, and the tools that can't be undone: flockstack.io, checked
  • FlockStack's agent safety documentation: key levels, the approval flow, the per-newsletter switch and the activity log: flockstack.io, checked
  • FlockStack's authentication documentation: the five key levels, regions, and the 300 requests a minute across REST and MCP: flockstack.io, checked

Questions

Do I need a paid plan to use Claude Code with FlockStack?
No. The MCP server is on every plan, the Free plan included. The emails an assistant sends, test emails too, count toward your plan's emails like any other.
Can Claude Code send an issue without asking me?
Not with a send with approval key: its sends, schedules and deletes are stored as requests and wait for you on the Approvals page. A full access key skips that review, so don't give one to an agent. Claude Code's own permission prompts are a second layer that you control and can switch off.
Which key level should I start with?
Send with approval. It lets Claude Code draft, edit settings and contacts and ask you to send. Use drafts only if you also want it unable to touch settings and contacts, and read only to let it look at your numbers and change nothing.
Does this work for an account in the EU region?
Yes. Use the EU address in the command, and a key made in the EU region: keys only work at their own region's address.
How do I stop Claude Code reaching my newsletter?
Revoke the key on the API keys page, which takes effect at once, and remove the server from Claude Code with claude mcp remove flockstack.

Connect Claude Code to FlockStack

Create your account, make a send with approval key on the API keys page and run the one command.

Create a key and connect