How to send physical mail from an AI agent
Connect the Mailsnail MCP server and have any AI agent mail a real USPS letter, postcard, or certified mail. Nothing to install — add a URL and sign in.
Your agent can already send an email, call an API, open a browser, and write code. The one channel it couldn't reach was the oldest one — a stamped envelope in someone's mailbox. Mailsnail closes that gap. It's an MCP server, so any agent that speaks the protocol — Claude Code, Claude Desktop, Cursor, Codex, the OpenAI Agents SDK — can send a real, postmarked USPS letter, postcard, or certified piece with a single tool call.
Nothing to install. No API keys. You sign in, and mail draws against a prepaid balance.
The 30-second version
claude mcp add -t http mailsnail https://api.mailsnail.dev/mcp
That's it — a URL, not a package. Then open /mcp, pick mailsnail, and choose Authenticate; adding a server doesn't open the browser on its own. Sign in once and your agent has nine tools:
verify_address— check an address is deliverable (USPS) before you spend a centpreview_letter— render the exact piece and return the exact price, nothing chargedsend_letter— mail a first-class or certified lettersend_postcard— mail a 4×6 postcardget_letter/get_postcard— check delivery statusget_balance— what's left, so the agent knows it can afford the job before it startsadd_payment_method/top_up— fund the balance without leaving the conversation
What it costs
Flat and public, so an agent can reason about the price before it commits:
- First-class letter — $1.50
- Certified mail — $9.75
- Postcard — $1.00
preview_letter returns that number with nothing charged. The agent decides whether the send is worth it and — if you've wired it that way — checks with you first.
How "nothing to install" actually works
This is the part people don't expect. Most mail APIs make you create an account, add a card, and provision keys before the first send — and most MCP servers make you install a package and keep it updated. Mailsnail does neither. The server runs on our infrastructure; you add its URL and sign in through your client, the same way you'd connect any other account. There is no key to paste, and a fix on our side reaches you without you upgrading anything.
Payment works the same way it does for a transit card: you fund a balance once, and each piece draws from it. That's deliberate — card processing carries a fixed fee per charge, which on a $1.50 letter would be roughly a fifth of the price. Stripe holds the card; we never see the number. If a piece fails to mail, the charge is refunded automatically.
There's also an account-free path for agents that can pay for themselves: post a letter, get an HTTP 402 with the quoted price, and retry with a Stripe Shared Payment Token. It needs a client that can mint one, which most coding agents can't do today. (USDC/x402 settlement is planned, not shipped.)
The upshot is simple: the gap between "add the server" and "a letter is in the mail" is minutes, not a procurement cycle.
What you'd actually use it for
Not bulk marketing blasts. The pieces that fit are low-volume and high-intent — the ones never worth standing up a print vendor for:
- A thank-you note mailed after a support ticket is resolved well
- A welcome kit when someone signs a contract
- Preliminary lien notices and other compliance mail that legally has to be physical and postmarked
- Condolence or birthday cards a personal-assistant agent sends without being reminded
- One personalized letter to one account when a trigger fires, written by the agent that has the context
Send your first piece
- Add the server —
claude mcp add -t http mailsnail https://api.mailsnail.dev/mcp - Sign in — open
/mcp, pick mailsnail, choose Authenticate, approve it in the browser - Ask — tell your agent to mail a postcard to a specific address
- It verifies —
verify_addressconfirms the address is deliverable - It previews —
preview_letterreturns the rendered piece and the exact price, still $0 charged - It sends — on your go-ahead,
send_letter/send_postcardmails it and returns a tracking id. The first send hands back a link to add a card if you haven't funded a balance yet - You check —
get_lettershows status
Related guides
- Send a letter from Claude, Cursor, or Codex — the exact per-client setup.
- A Lob / PostGrid alternative built for agents — if you're moving off an incumbent mail API.
FAQ
Is Mailsnail the only way to send physical mail from an AI agent?
No. PostalForm and PieterPost are agent-native too, and APIs like Lob and PostGrid can do it if you hold an account and keys. Mailsnail's edge is that there is nothing to install and no keys to provision, flat public pricing, certified mail as a first-class path, and being open-source and provider-agnostic.
Does the agent need my credit card on file?
Stripe holds the card, not us. Mail draws against a prepaid balance you fund once, rather than a card charge per letter — a fixed processing fee on every $1.50 letter would be about a fifth of the price. If a piece fails to mail, the charge is refunded.
Do I have to install anything?
No. The managed server is remote: you add a URL and sign in from your MCP client. The npm package exists for self-hosters who want to run it against their own Click2Mail or Lob account.
Which agent runtimes can send mail with Mailsnail?
Anything that speaks MCP — Claude Code, Claude Desktop, Cursor, Codex CLI, and the OpenAI Agents SDK. One server works from every runtime.
Can I use my own mail provider?
Yes. The managed server is the default, but you can self-host Mailsnail against your own Click2Mail or Lob credentials if you already have them.
Connect Mailsnail to your agent
Nothing to install — it's a hosted server you sign into. In Claude Code:
claude mcp add -t http mailsnail https://api.mailsnail.dev/mcpThen run /mcp and choose Authenticate. Clients that take a JSON config use the url form:
{
"mcpServers": {
"mailsnail": {
"url": "https://api.mailsnail.dev/mcp"
}
}
}Per-client steps, and the self-hosted path, are at /setup.