How to send direct mail postcards from Claude Code

Claude Code can find the ZIP codes your customers live in without exposing a single row, then build the card as print files. Sending mail through Hypesonic is coming soon, so you hand the files to USPS Every Door Direct Mail (EDDM) or a mail house.

By Grace Kong·Updated ·6 min read

Pick postcard ZIP codes from your agent

TL;DR

  • Setup is one terminal command and a CLAUDE.md holding the offer, the card size and a rule that customer data is only ever counted, never read into the chat.

  • Claude Code saves the artwork as front and back PDFs in a dated folder, next to a zips.csv of the areas to mail.

  • EDDM Retail postage is $0.26 a piece for up to 5,000 pieces a day per ZIP Code; a 5-digit presorted postcard is $0.453 (USPS, from Oct 4, 2026).

  • Sixty days on, the same script counts who used the offer code by ZIP, so the next mailing drops the areas that did not pay back.

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.

  1. 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.
  2. Picks the areas by your rule (most patients, within 8 miles) and writes zips.csv.
  3. Makes the artwork through Hypesonic's image models: front and back options with your offer. Each run is quoted first and carries an idempotency_key, so a retry never pays twice.
  4. 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.
  5. Hands you the mailing. Sending mail through Hypesonic is coming soon. Today you give the PDFs and zips.csv to a print-and-mail service, or print the cards and mail them through EDDM Retail at the post office.

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.

Postage and mail rules for 2026

Postage is fixed by USPS; the printing and service price is where routes differ.

Mail typePostage 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 flatas low as $0.259

Source: USPS Notice 123, effective October 4, 2026; BMEU rate from USPS EDDM.

  • EDDM Retail reaches every address on a route with no names or list. You can mail up to 5,000 pieces a day per ZIP Code (USPS EDDM), each 3.3 ounces or less, as Standard Mail flats; popular sizes are 6.5 x 9 and 8.5 x 11 inches (USPS fact sheet). Drop-off dates can be picked up to 30 days ahead (USPS user guide).
  • Addressed postcards through mail APIs, printing and postage included: from $0.905 on a free developer plan and from $0.615 on a $550-a-month plan (Lob), or $1.18 for a 4x6 First-Class card with no monthly fee (thanks.io).
  • All-in EDDM through a print-and-mail service: 67.5 cents a piece at 1,000 cards and 45.5 cents at 10,000 for 6.25 x 9 (Taradel).

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.

StrongWeak
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 yet. Sending postcards through Hypesonic is coming soon. Today Claude Code finds the zip codes, makes the artwork and the print files, and you mail them through USPS EDDM or a mail house.

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. 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.

Sources

  1. 1Claude Code docs, Connect to tools via MCP · accessed Nov 30, 2026
  2. 2Claude Code docs, Run prompts on a schedule · accessed Nov 30, 2026
  3. 3USPS, Notice 123 price list · effective Oct 4, 2026
  4. 4USPS, EDDM Retail fact sheet · accessed Nov 30, 2026
  5. 5USPS, Every Door Direct Mail user guide · accessed Nov 30, 2026
  6. 6Taradel, EDDM pricing · accessed Nov 30, 2026
  7. 7Lob, pricing · accessed Nov 30, 2026
  8. 8thanks.io, pricing · Nov 2026
  9. 9USPS, Every Door Direct Mail · accessed Nov 30, 2026

Pick postcard ZIP codes from your agent

Keep reading