Send a letter from Claude, Cursor, or Codex
The exact per-client setup for the Mailsnail MCP server, plus a 60-second walkthrough to mail yourself a postcard from your agent.
Here's something your coding agent can do that it probably hasn't tried: put a physical letter in the mail. One MCP server — mailsnail — adds seven tools for real USPS mail, with no account and pay-per-piece billing. Below is the exact setup for the clients most people run, then a 60-second "mail me a postcard" walkthrough.
The source of truth for every client config is mailsnail.dev/setup — copy from there if a snippet here ever drifts.
Claude Code
One command:
claude mcp add mailsnail -- npx -y mailsnail
No restart needed — the tools show up on the next turn. Managed mode is the default, so there's nothing else to configure.
Claude Desktop
Add Mailsnail to claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"mailsnail": {
"command": "npx",
"args": ["-y", "mailsnail"]
}
}
}
Quit and reopen Claude Desktop. The mail tools appear under the MCP icon.
Cursor
Add the same server block to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"mailsnail": {
"command": "npx",
"args": ["-y", "mailsnail"]
}
}
}
Codex CLI
Codex reads MCP servers from ~/.codex/config.toml:
[mcp_servers.mailsnail]
command = "npx"
args = ["-y", "mailsnail"]
The magic moment: mail yourself a postcard
Once it's wired in, try this prompt verbatim:
Use mailsnail to send a postcard to [your address] that says "my agent mailed this."
Watch what the agent does:
verify_addressconfirms your address is deliverable before spending anything.preview_letter(postcard variant) renders the piece and returns the exact price — $1.00, still nothing charged.- It shows you the preview and the price, and — if you've set it up that way — waits for your go-ahead.
send_postcardmails it and hands back a tracking id.
A first-class letter is the same flow at $1.50; certified mail is one flag at $9.00 with tracking. Payment is per piece via Stripe over HTTP 402, inside the wallet you authorized, and it's auto-refunded if the piece doesn't mail. (Stablecoin/x402 settlement is on the way.)
Related guides
- How to send physical mail from an AI agent — the concepts, the seven tools, and what it costs.
- A Lob / PostGrid alternative built for agents — coming from an incumbent mail API.
FAQ
Do I need a Mailsnail account or API key to send a letter from Claude?
No. There is no signup and no keys. The agent pays per piece within the wallet you authorized.
The client didn't pick up the mail tools — how do I fix it?
Fully restart the client after editing its config and confirm the JSON or TOML is valid. Exact per-client steps are at https://mailsnail.dev/setup.
Can I stop the agent from sending mail without asking me?
Yes. Keep send_letter and send_postcard behind your client's tool-approval prompt. The agent can call preview_letter freely because it charges nothing; only the send actually spends.
Wire Mailsnail into your agent
Drop this into your client's MCP config (or use /setup for one-line installs).
{
"mcpServers": {
"mailsnail": {
"command": "npx",
"args": [
"-y",
"mailsnail"
],
"env": {
"MAIL_PROVIDER": "managed",
"MAIL_API_BASE_URL": "https://api.mailsnail.dev"
}
}
}
}