· 4 min read · email · claude-code · mcp · agents
Email marketing through Claude Code
What a campaign looks like when you run it from Claude Code with OpenHouse connected. One session from "who should get this" to a scheduled send, with every step that reaches customers waiting for your yes.
Short answer: Connect Claude Code to your OpenHouse workspace once, and a campaign becomes a conversation in your terminal. You say who should get the email and what it is about. Claude Code builds the segment, drafts the email in your brand, and stops to ask before a test send or a schedule. This post walks through one such session.
Setup, once
In OpenHouse, open Settings → Agents and create a credential. Then run one command:
claude mcp add --transport http openhouse \
https://api.openhousecrm.com/mcp \
--header "Authorization: Bearer ohm_…"
From then on, Claude Code has the same tools as the assistant inside OpenHouse, limited to your role. Headless email marketing with OpenHouse through MCP covers the connection in more detail.
One campaign, start to finish
1. Ask who is worth writing to
Who bought twice or more this year but nothing in the last 60 days? How many are there, and how many of them can we email?
Claude Code queries your event data and answers with numbers. Questions like this run at once, because they only read.
2. Save the audience
Save them as a segment called "Lapsed regulars".
The segment appears in OpenHouse. It stays current on its own, so someone who orders tomorrow drops out before you send.
3. Draft the email
Draft a campaign for that segment. Subject around "your usual is back in stock". Use our reference design and the product photos in the Autumn folder.
Claude Code reads your brand settings and your reference template, picks images from your asset library, and creates a campaign draft. It answers with a link to the draft. Open it and look at the email on desktop and mobile. Then keep talking:
Shorter headline. Move the button above the product cards. Drop the second paragraph.
Each change lands on the same draft. Nothing has left the building yet.
4. Send yourself a test
Send a test to me and to Lena.
Here Claude Code stops. A question appears in your terminal naming the action and the recipients, with Accept and Decline. Accept, and the test goes out to the people you named, up to 25 of them.
5. Schedule it
Schedule it for Thursday at 9.
Another question, the same two answers. Scheduling is for administrators. If you are not one, the request is refused and you ask a colleague who is.
6. Read the result
How did the Lapsed regulars campaign do? Who did not get it, and why?
You get delivered, opened and clicked, plus the recipients who were skipped and the reason for each one.
What runs, and what waits
| You ask for | What happens |
|---|---|
| Numbers, lists, campaign results | Runs at once |
| A segment, a campaign draft, a template draft | Runs at once |
| An automation draft, a rehearsal of it | Runs at once, for builders |
| Publishing a template | Waits for your yes |
| A test send | Waits for your yes |
| Scheduling a campaign | Waits for your yes, administrators only |
| Activating an automation | Waits for your yes, administrators only |
If you do not answer within five minutes, the request stays open as a card in OpenHouse. It is not sent and it does not expire into a yes.
Why do this from Claude Code, not from the app?
The assistant inside OpenHouse can do everything above. Claude Code adds what sits on your machine:
- Your files. The price list, last year's Christmas copy, the product descriptions in your shop's repository. Claude Code can read them and write the email from them.
- Your rules. Put your tone of voice and the words you never use in a
CLAUDE.mdin the folder you work from. Every draft starts with them. - Your other tools. If Claude Code is also connected to your shop or your analytics, one sentence can span both: look up what sold, then write to the people who bought it.
- No AI usage on our side. The thinking runs on your Claude plan, so OpenHouse does not count it.
What still happens in the app
- Uploading images. Files do not travel over MCP. Upload on the Assets page, then tell Claude Code which folder to use.
- Looking at the email. Claude Code gives you a link. The check on a real screen is yours.
- Anything that runs on its own. Claude Code acts when you ask. An automation you activate runs in OpenHouse whether your terminal is open or not.
Every session is filed in your AI panel in OpenHouse, tool call by tool call, and the audit log names you as the actor. The MCP documentation has the full reference.
Explore OpenHouse to see the rest of the product, built for teams without an email specialist.