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 letter 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 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 letter" 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 letter
Once it's wired in, try this prompt verbatim:
Use mailsnail to send a letter to [your address] that says "my agent mailed this."
Watch what the agent does:
verify_addressconfirms your address is deliverable before spending anything.preview_letterrenders the piece and returns the exact price — from $1.21 for a one-page, black-and-white letter from a balance ($1.51 if you pay for just that letter by card), 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_lettermails it and hands back a tracking id.
Certified mail is the same flow with one flag, from $8.61 from a balance ($8.83 for one letter by card), with tracking. Everything is priced at our cost, and the preview shows the exact prices for your piece. Mail is paid for from a prepaid balance you fund through Stripe, or one letter at a time by card — if the balance is empty, the first send hands back two links: one to pay for just that letter, one to add funds to your balance. Both are one-time payments. Your card isn't saved unless you opt in to auto-reload, and you can turn that off any time. A piece that fails to mail is refunded automatically.
Related guides
- How to send physical mail from an AI agent — the concepts, the tools, and what it costs.
- How to send a real letter from ChatGPT — the same setup in ChatGPT.
- Certified mail with a return receipt from an AI agent — for notices that need proof.
- 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 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.