Send a letter from Claude, Cursor, or Codex
The exact per-client setup for the Mailsnail MCP server — add one URL, sign in — 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 nine tools for real USPS mail. Nothing to install: you add a URL and sign in, the same as connecting any other account. 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 -t http mailsnail https://api.mailsnail.dev/mcp
Then run /mcp, select mailsnail, and choose Authenticate. Your browser opens our sign-in page; approve it and the tools appear on the next turn.
Worth knowing: adding the server does not pop the browser by itself. If nothing happened after that command, nothing is broken — you just haven't started the sign-in yet.
Claude Desktop
Settings → Connectors → Add custom connector, and paste:
https://api.mailsnail.dev/mcp
Claude Desktop registers itself with our sign-in server automatically, so there's no client ID to create. Approve the connection in the browser and the mail tools appear under the connectors icon.
Cursor
Add the URL form to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):
{
"mcpServers": {
"mailsnail": {
"url": "https://api.mailsnail.dev/mcp"
}
}
}
Cursor prompts you to sign in the first time the server is used.
Codex CLI
Codex reads MCP servers from ~/.codex/config.toml and launches them as local processes, so this one runs the package rather than the hosted server. You supply your own Click2Mail or Lob credentials:
[mcp_servers.mailsnail]
command = "npx"
args = ["-y", "mailsnail"]
[mcp_servers.mailsnail.env]
MAIL_PROVIDER = "click2mail"
CLICK2MAIL_USERNAME = "your-username"
CLICK2MAIL_PASSWORD = "your-password"
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.75 with tracking. Mail draws against a prepaid balance you fund once — the first send hands back a link to add a card if you haven't. Stripe holds the card, and a piece that fails to mail is refunded automatically.
Related guides
- How to send physical mail from an AI agent — the concepts, the nine tools, and what it costs.
- A Lob / PostGrid alternative built for agents — coming from an incumbent mail API.
FAQ
Do I need to install anything to send a letter from Claude?
No. The managed server is remote — you add https://api.mailsnail.dev/mcp and sign in from your client. There is no package to install and no API key to paste.
I added the server but no sign-in window appeared. Is it broken?
No. Adding an MCP server registers it; it does not open the browser. In Claude Code, run /mcp, select mailsnail, and choose Authenticate. In Claude Desktop, connect it under Settings → Connectors.
The client didn't pick up the mail tools — how do I fix it?
Confirm you are signed in — the tools stay hidden until the server is authenticated. If you edited a JSON or TOML config by hand, fully restart the client and check the file 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.
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.