---
name: mailsnail
description: Mail a real letter or USPS Certified Mail to a US address through MailSnail, from an AI agent or from code. Use when the user wants something sent by post, such as a letter, a notice, a dispute, a demand letter, or certified mail with tracking or a return receipt. Covers the hosted MCP server, with a sign-in or with none, and the HTTP API with an API key. A proof and the exact price are shown before anything is mailed.
compatibility: Needs network access to api.mailsnail.dev. Mails to US addresses only. A person pays by card on a payment page.
metadata:
  version: "1.1.0"
  homepage: https://mailsnail.dev
---

# Mail a letter with MailSnail

MailSnail prints a letter and hands it to USPS, usually on the next business day. You supply the text or a PDF, the recipient and a return address. It answers with a proof PDF and the exact price, and mails the letter once the user has approved both. Prices are at our cost, from $1.21 a letter. Checking an address, making a proof and reading a letter's status are free.

## Rules that always hold

- Mail nothing until the user has seen the proof and the price and has said yes. A proof is free. A mailed letter is paid for, and it cannot be stopped once printing starts.
- A person pays, by card, on a payment page. Never ask for card details and never type them anywhere.
- Letters go to US addresses only.
- Do not claim that mailing satisfies a legal deadline or notice requirement.
- Never send spam, harassment, or fraudulent mail.

## Three ways in

- **Hosted MCP server**, when the app you run in can add an MCP server and the user can sign in in a browser (Claude, ChatGPT, Cursor, Claude Code, Codex and others). There is nothing to install and no key to keep, and the user can pay for one letter at a time.
- **Hosted MCP server with no sign-in**, when the user has no MailSnail account and wants none, or you can add an MCP server and cannot open a browser to sign in. There is no account and no key. The user pays for one letter at a time, by card, on a page you hand them.
- **HTTP API with an API key**, when you run from a terminal, a script or a schedule, or cannot add an MCP server. One call returns a key with no sign-up. Letters are paid from a prepaid balance, which a person funds by card, $10 or more at a time.

The two balances are separate. Money added with a key is not on a signed-in account, and money on a signed-in account is not on a key. The server with no sign-in has no balance.

## HTTP API with an API key

Base address: https://api.mailsnail.dev/v1. Bodies and answers are JSON. The answers to steps 1, 3 and 4, and the balance, carry a `next_step` that says in words what to do next.

### 1. Get a key, once

```http
POST https://api.mailsnail.dev/v1/accounts?ref=skill
```

No body. The answer holds `api_key`, which starts with `msk_live_`. It is shown once and cannot be read again. Store it where the user keeps other credentials, and send it on every later call in the header `Authorization: Bearer <api_key>`. Keep one key and reuse it for every letter: the balance belongs to the key, and making keys is limited to five an hour.

### 2. Check the address (free)

```http
POST https://api.mailsnail.dev/v1/verify
Authorization: Bearer <api_key>
Content-Type: application/json

{ "address_line1": "1 Main St", "address_city": "Brooklyn", "address_state": "NY", "address_zip": "11201" }
```

`deliverability` is `deliverable`, `undeliverable` (with a `reason`) or `unknown` (the check could not be made).

### 3. Make a proof (free, mails nothing)

```http
POST https://api.mailsnail.dev/v1/preview
Authorization: Bearer <api_key>
Content-Type: application/json

{
  "to":   { "name": "Jane Doe", "address_line1": "1 Main St", "address_city": "Brooklyn", "address_state": "NY", "address_zip": "11201" },
  "from": { "name": "Sam Sender", "address_line1": "500 Oak Ave", "address_city": "Austin", "address_state": "TX", "address_zip": "78701" },
  "body_text": "Dear Jane,\n\nThank you for the referral.\n\nSam"
}
```

The answer holds `proof_url` (the PDF that will be printed), `amount_cents` (the exact price) and `draft_id`. Instead of `body_text` you can pass `file_url`, the public address of a letter-size PDF. For certified mail add `extra_service`; its values are in the price table below. Give the user `proof_url` and the price, and wait for their yes. The proof link works for 30 minutes. The draft itself can be sent for 7 days, so a yes that comes later needs no new proof.

### 4. Add funds when the balance is short

This is the one step a person does.

```http
POST https://api.mailsnail.dev/v1/billing/setup
Authorization: Bearer <api_key>
Content-Type: application/json

{ "amount_cents": 1000 }
```

The answer holds `checkout_url`, a Stripe page where the user pays by card. Give them that address. The least is $10 and the most is $500 at a time; with no `amount_cents` it is $25. Before they pay, say what the amount is, and that whatever this letter does not use stays on the balance for later letters and is not redeemable for cash. It is a one-time payment and no card is saved. (`"auto_reload": true` saves the card and adds the same amount whenever the balance falls below $10. Ask for it only when the user asks for it.) The money is on the balance seconds after they pay, and `GET https://api.mailsnail.dev/v1/balance` shows it.

### 5. Mail it, after the user's yes

```http
POST https://api.mailsnail.dev/v1/letters
Authorization: Bearer <api_key>
Content-Type: application/json

{ "draft_id": "<draft_id from step 3>" }
```

This mails exactly the proof, at exactly its price, from the balance. Use the key the proof was made with. A draft is mailed once: the same request sent again returns the first answer and mails nothing more. A 402 answer means the balance is short and nothing was mailed: do step 4, then send the same request again.

Paying does not mail the letter. This call does. When the user says they have paid, come back to this step.

### 6. Follow it

The answer to step 5 holds `status_url`, the letter's own address. `GET` it, with no key, for the letter's status and, for certified mail, the USPS tracking number once the letter has been mailed. Give `status_url` to the user and keep it yourself. To cancel before printing starts, `POST <status_url>/cancel` with the key; the price goes back to the balance.

Every route and field is in https://mailsnail.dev/openapi.json. The same steps, written for a person: https://mailsnail.dev/developers

## Hosted MCP server

Connect to https://api.mailsnail.dev/mcp using Streamable HTTP and OAuth. The hosted service manages printing, postage, and billing. In Claude Code, run:

```sh
claude mcp add -t http mailsnail https://api.mailsnail.dev/mcp
```

Run /mcp to sign in. Other MCP clients can add the same hosted URL. Client-specific instructions: https://mailsnail.dev/setup

1. Use verify_address to check the recipient's US address.
2. Call preview_letter with recipient, return address, content, and any requested certified-mail service. It returns a proof PDF, both prices (amount_cents from a prepaid balance, pay_per_letter_cents for paying for just this letter by card), and a draft_id without charging or mailing.
3. Show the proof and price to the user and obtain confirmation before sending.
4. Call send_letter with the confirmed draft_id and a stable idempotency_key. Reuse the key when retrying an uncertain send.
5. If the balance can't cover the send, nothing is charged or mailed and the result has links for the user to open. Offer pay_url first: a Mailsnail page for a one-time card payment of pay_per_letter_cents for just this letter, which saves no card. When send_letter has been called for two or more letters the result also has pay_all_url: one payment of pay_all_cents for all pay_all_letters letters waiting, never more than paying one by one and usually less. setup_url adds funds to the balance instead (a one-time payment by default; not offered in ChatGPT). The letters stay ready until draft_valid_until, so there is no hurry and no new preview. After the payment, retry the same send with the same idempotency key, once for each letter.
6. Preserve the returned receipt_token or status_url for delivery-status lookups. A raw provider job ID alone is not authorization to read a piece. If the token is not in the conversation, call get_letter on the hosted server with any other value: it answers with the signed-in account's letters of the last 90 days, each with its receipt_token.

### Funding and auto-reload on the hosted server

Auto-reload is opt-in. add_payment_method always returns a setup_url: by default a one-time payment that does not save the card. Pass auto_reload: true only if the user asks for auto-reload; the Stripe page then saves the card and shows the terms the user agrees to by paying (default: reload $25 when the balance falls below $10). Nothing charges a card on demand. turn_off_auto_reload turns automatic charges off, keeps the card on file, and charges nothing; on a team account only an organization admin can use it. Use these only with the user's authorization.

## Hosted MCP server with no sign-in

Connect to https://api.mailsnail.dev/guest/mcp using Streamable HTTP. It asks for no credentials and has no account behind it. In Claude Code, run:

```sh
claude mcp add -t http mailsnail https://api.mailsnail.dev/guest/mcp
```

It has four tools.

1. Use verify_address to check the recipient's US address.
2. Call preview_letter with the recipient, the return address, the letter as body_text and any requested certified-mail service. It returns proof_url, price_cents (the price of this one letter by card) and a draft_id, without charging or mailing.
3. Show the proof and the price to the user and obtain confirmation.
4. Call send_letter with the draft_id. It charges nothing and mails nothing. It returns pay_url, a MailSnail page where the user pays for that one letter by card. Give the user that address. The letter is mailed when their payment completes.
5. Call get_letter with the same draft_id for the letter's status and, for certified mail, the USPS tracking number. Say the letter was mailed only once get_letter says so. Keep the draft_id: it is the only key to the letter here.

This server takes typed text, not a PDF, and has no balance and no cancelling. A proof can be paid for until draft_valid_until, about 22 hours after it is made.

## Prices

Two ways to pay, both at our cost. Prices are USD, one page, black and white; extra pages and color are priced at our cost.

| Piece | extra_service | Pay for one letter by card | From a prepaid balance |
|---|---|---|---|
| First-class letter | leave it out | from $1.51 | from $1.21 |
| Certified | certified | from $8.83 | from $8.61 |
| Certified with an electronic return receipt | certified_return_receipt_electronic | from $11.83 | from $11.64 |
| Certified with a green-card return receipt | certified_return_receipt | from $14.42 | from $14.27 |

A single card payment carries Stripe's whole processing fee (2.9% + 30¢); a prepaid balance (default top-up $25) spreads it over many letters. A key always pays from its balance. On the hosted server the preview shows both exact prices (amount_cents from a balance, pay_per_letter_cents by card). On the server with no sign-in every letter is at the card price (price_cents). Whichever way the user pays, that exact price is what they pay. See https://mailsnail.dev/pricing

Address verification, previews, balance checks, and status lookups are free. On the hosted server, use get_balance to check credit.

## Supported mail

- US addresses only.
- extra_service: "certified" adds tracking and proof of mailing.
- "certified_return_receipt_electronic" requests an electronic delivery signature record.
- "certified_return_receipt" requests a physical signed green card returned to the sender.
- Choose the service the user requests.

## More

- Paying for one piece with no key and no account is documented in https://mailsnail.dev/openapi.json: a Stripe Shared Payment Token is charged the pay_per_letter_cents price. Few clients can make that token, so use a key or the hosted server unless yours can.
- To run the server yourself with your own print-provider account, see https://mailsnail.dev/setup. Do not assume its tools or payment setup match the hosted service.
- Full reference: https://mailsnail.dev/llms-full.txt
- Questions: hello@mailsnail.dev
