How to send direct mail postcards from Claude Code
Claude Code can't mail through Hypesonic yet. It counts customers by ZIP with a local script and builds front and back PDFs, then sends addressed cards through the Lob API ($0.615 to $0.905 each) or hands the files to an EDDM service (45 to 68 cents all-in).
By Grace Kong·Updated ·8 min read
Pick postcard ZIP codes from your agent
TL;DR
By route: addressed cards through Lob's API cost $0.905 each on its free plan and from $0.615 on a $550-a-month plan, arriving First Class in 5 to 7 business days; EDDM through a print-and-mail service costs 67.5 cents at 1,000 and 45.5 cents at 10,000 all-in, in 7 to 14 business days (Taradel); EDDM Retail yourself is $0.26 postage plus printing.
Only the EDDM routes keep customer data on your machine: the mail house gets the art and the ZIP codes, while an addressed mailing sends Lob the name and address of every customer you mail.
EDDM Retail bundles are 50 to 100 cards, no taller than 6 inches, each with a facing slip and the count, dropped with PS Form 3587 at the Post Office serving those ZIP Codes (USPS).
Setup is one terminal command and a CLAUDE.md rule that customer data is only ever counted by a script, never read into the chat.
Sending mail through Hypesonic is coming soon, with no public date; sixty days after a drop, the same script counts offer-code use by ZIP to pick the next one.
How do you mail the cards Claude Code builds?
Three routes, by whether you mail every home on a route or named customers. Claude Code builds the same files for each: zips.csv and front and back PDFs.
| Route | What leaves your machine | Price per card | Time | Suits |
|---|---|---|---|---|
| Addressed cards through the Lob API | The PDFs and the names and addresses you mail | $0.905 on the free developer plan; from $0.615 on a $550-a-month plan | First Class, 5 to 7 business days; orders after 10 am Pacific go into the next day's production | Past patients or lapsed customers |
| EDDM through a print-and-mail service (Taradel) | The PDFs and the ZIP codes or routes | 67.5 cents at 1,000, 48.7 cents at 5,000, 45.5 cents at 10,000, all-in | 7 to 14 business days to the delivery window | New households near you, no bundling |
| EDDM Retail, printed and dropped by you | Nothing but the print order | $0.26 postage plus printing, from 21.6 cents at 1,000 cards | Your print time; drop dates up to 30 days ahead | Lowest cost, 200 to 5,000 cards a day per ZIP Code |
| Hypesonic | Coming soon: mailing from the same session | Quoted before launch | Not live | Today: the art and the ZIP list |
Sources: Lob pricing, Lob, mailing class and delivery times, Taradel pricing, Taradel, how it works (upload files), USPS EDDM, read Dec 3, 2026.
Set up Claude Code for postcards
Add Hypesonic, then put the offer, the data rule and the card format in CLAUDE.md.
Run this in the folder with your customer export and brand files:
claude mcp add --transport http hypesonic https://www.hypesonic.com/mcp
Restart Claude Code and sign in when the browser opens. Do it in an interactive session: a claude -p run has no /mcp panel, so it cannot finish the sign-in (Claude Code docs). Add --scope user to use Hypesonic in every project. Setup guide: hypesonic.com/agents/claude-code.
Then put the standing rules in CLAUDE.md at the top of the folder. Claude reads it at the start of every session there, so you stop repeating yourself:
# Postcards
- Offer: new-patient cleaning and exam, code SMILE26, valid 60 days.
- Patient data: data/patients.csv. Never open it in the chat or send it
anywhere; count it by zip code with a script.
- Target: the 8 zip codes with the most patients, within 8 miles of the office.
- Card: 6.5x9. Front: one photo, one line. Back: offer, map, phone,
QR code to smile26 landing page.
- Save designs and zips.csv (zip, patients) to mail/{yyyy-mm}/.
- Quote every paid run before it starts.The data rule is the reason to use Claude Code for mail. When Claude writes and runs a counting script instead of opening the file, only the totals by zip reach the conversation, and only zip codes go to the mail house.
The command
Ask for the count, the targets and the print files in one go.
Count data/patients.csv by zip with a script (do not open the file). Take the 8 zips with the most patients within 8 miles of the office. Design 3 options for a 6.5x9 postcard with the SMILE26 offer and a QR code. Write zips.csv and save front and back PDFs for each option to mail/2027-01/.
The script Claude writes is a few lines you can read before it runs:
import csv, collections
counts = collections.Counter(r["zip"][:5] for r in csv.DictReader(open("data/patients.csv")))
for z, n in counts.most_common(15):
print(z, n)What Claude Code does, step by step
Count locally, design, build the files, then hand you the mailing.
- Counts by zip with a script and prints the top zip codes. In the default permission mode, Claude Code asks before it runs the script, so you can read it first.
- Picks the areas by your rule (most patients, within 8 miles) and writes
zips.csv. - Makes the artwork through Hypesonic's image models: front and back options with your offer. Each
runis quoted first and carries anidempotency_key, so a retry never pays twice. - Builds and checks the print files. A local script lays each side into a PDF at the card size, and Claude checks the offer code, the QR target and the phone number against CLAUDE.md.
- Hands off the mailing on one of the routes above: the PDFs and
zips.csvto a print-and-mail service, a Lob script for addressed cards, or bundles for EDDM Retail. Sending mail through Hypesonic is coming soon.
What you get back
Cards and targets in one dated folder.
mail/2027-01/ zips.csv (zip, patients) card-a_front.pdf card-a_back.pdf card-b_front.pdf card-b_back.pdf card-c_front.pdf card-c_back.pdf
Sixty days later, run the same script on new patients who used SMILE26 and compare by zip. Zips that paid back get the next mailing; the rest drop out.
Can Claude Code send addressed cards through a mail API like Lob?
Yes, with your own Lob account: Claude Code writes a short script that sends each card to Lob's postcards API, with the front and back PDFs and the address.
- Build the list with a script, as with the ZIP count: filter
data/patients.csvto the people you mail and writemail/2027-01/addresses.csv, without printing rows into the chat. - Size the art for Lob. The API takes 4x6, 6x9 or 6x11 cards (4x6 if you leave size out) and the front and back as PDF URLs or HTML. Ask Claude Code to keep the ink-free address area on the back clear.
- Run it with your Lob test API key first, as Lob's quickstart does, then switch to the live key for the real send.
- Log every card Lob accepts to
sent.csv, so the sixty-day count can match offer-code use to who was mailed.
Sources: Lob, API quickstart, Lob, postcard design specs, read Dec 3, 2026.
How to prepare EDDM bundles and paperwork
Pick the routes, pay, print the slips, bundle and drop. Claude Code can do the counting; the bundling is by hand.
- Select the routes for the ZIP codes in
zips.csvin the USPS EDDM Online Tool (Show Table lists each route's households and cost). - Check the card with the tool's Mailpiece Size Checker: addressed to "Postal Customer", with the EDDM Retail indicia at the top right of the address block.
- Pay online by card, or at the counter.
- Bundle 50 to 100 cards per stack, no taller than 6 inches, with a facing slip and the count on top of each. Ask Claude Code to split the count per route into bundles in
bundles.csv. - Drop off with PS Form 3587 at the Post Office serving those ZIP Codes, or ship to its Postmaster by Priority Mail.
Source: USPS, Every Door Direct Mail, read Dec 3, 2026.
Postage and mail rules for 2026
Postage is fixed by USPS; the printing and service price is where routes differ.
| Mail type | Postage per piece |
|---|---|
| Postcard with a stamp (First-Class, single piece) | $0.65 |
| First-Class presorted postcard, 5-digit | $0.453 |
| First-Class presorted postcard, 3-digit | $0.478 |
| EDDM Retail flat, up to 3.3 oz | $0.260 |
| EDDM BMEU flat | as low as $0.259 |
Source: USPS Notice 123, effective October 4, 2026; BMEU rate from USPS EDDM.
EDDM Retail pieces are Standard Mail flats of 3.3 ounces or less; popular sizes are 6.5 x 9 and 8.5 x 11 inches (USPS fact sheet). A 5-digit presorted postcard costs 30% less than a stamped one ($0.453 against $0.65, our math).
Mail every month to the next zip codes
A Desktop scheduled task can redo the count when the export updates, because it runs on your machine.
On the 1st of each month: count data/patients.csv by zip with the script, list zips that grew by 10 or more patients since last month, and write them to mail/next/zips.csv. Make nothing and spend nothing.
Use a Desktop scheduled task rather than a cloud one here: Desktop tasks read local files, while cloud tasks start from a fresh copy of the repo, which should never hold patient data (Claude Code docs).
What Claude Code is best and worst at for postcards
Local data work is its strength; the look of the printed card is still a human call.
| Strong | Weak |
|---|---|
| Counting customers by zip without exposing the rows. | Judging a printed card from a PDF: order a proof for big runs. |
| Repeat mailings from the same script and folder. | Household counts per carrier route: check those on the USPS EDDM site. |
| Measuring offer-code results by zip. | Sharing designs with an office manager who doesn't use a terminal. |
| Monthly runs on a Desktop schedule. | Desktop tasks need the machine on at run time. |
Questions
Can Claude Code send direct mail?
Not through Hypesonic yet; that is coming soon. With your own Lob account it can send addressed postcards through Lob's API, and for EDDM it builds the files you hand to a print-and-mail service or drop at the Post Office.
Which print-and-mail service takes PDFs and a ZIP list?
EDDM services such as Taradel let you upload your own files and pick routes, at 45.5 to 67.5 cents a card all-in by quantity. For addressed cards, Lob takes PDF URLs through its API.
How much does it cost to mail a postcard in 2026?
A stamped postcard is $0.65. EDDM Retail postage is $0.26 a piece, and all-in EDDM with printing runs about 45 to 68 cents a piece depending on quantity.
Do I need a mailing list for EDDM?
No. Every Door Direct Mail reaches every address on the routes you pick, addressed to the local postal customer, so no names or addresses are needed.
Can I keep customer data private while targeting?
Yes, on the EDDM routes. Ask Claude Code to count your export by zip with a script rather than opening it, so only zip-level totals reach the conversation and the mail house. Addressed mail sends the mailed customers' addresses to the mail API.
Sources
- 1Claude Code docs, Connect to tools via MCP · accessed Nov 30, 2026
- 2Claude Code docs, Run prompts on a schedule · accessed Nov 30, 2026
- 3USPS, Notice 123 price list · effective Oct 4, 2026
- 4USPS, EDDM Retail fact sheet · accessed Nov 30, 2026
- 5USPS, Every Door Direct Mail user guide · accessed Nov 30, 2026
- 6Taradel, EDDM pricing and turnaround (7 to 14 business days) · read Dec 3, 2026
- 7Lob, pricing · accessed Nov 30, 2026
- 8thanks.io, pricing · Nov 2026
- 9USPS, Every Door Direct Mail · accessed Nov 30, 2026
- 10Taradel, how it works (upload files) · read Dec 3, 2026
- 11Lob Help, mailing class and postage (delivery times) · read Dec 3, 2026
- 12Lob Help, API quickstart · read Dec 3, 2026
- 13Lob Help, postcard design specs · read Dec 3, 2026
Pick postcard ZIP codes from your agent
Keep reading
- GuidesCan Claude send postcards for your business?Read
- GuidesHow to buy digital billboards from Claude CodeRead
- CostsHow much does direct mail cost in 2026?Read
- GlossaryWhat is EDDM (Every Door Direct Mail)?Read
- IntegrationsHow to connect the Hypesonic MCP to your AI agentRead
- IntegrationsClaude for advertising: what it can do and how to set it upRead