MailSnail (API key)
USPS letters and certified mail for unattended agents: API key, no browser sign-in, prepaid balance.
使うべきか
品質と安全性
ツール定義とプロトコルへの準拠に関する自動分析に基づいています。
コンテキストコスト
これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。
インストール
ワンクリックインストール
これを `claude_desktop_config.json` ファイルに追加してください:
{
"mcpServers": {
"mailsnail-api-key": {
"url": "https://api.mailsnail.dev/key/mcp?ref=registry"
}
}
}リモートエンドポイント
https://api.mailsnail.dev/key/mcp?ref=registrystreamable-httpできること
ツール一覧
ツール(8)
🟢verify_address(address_line1, address_line2, address_city, address_state, address_zip)
Check a US mailing address against USPS records. Returns `deliverability`: `deliverable` when USPS recognizes the address, or `undeliverable` with a `reason` when it does not. Free: does not charge or mail anything.
入力スキーマ
{
"type": "object",
"properties": {
"address_line1": {
"type": "string"
},
"address_line2": {
"type": "string"
},
"address_city": {
"type": "string"
},
"address_state": {
"type": "string"
},
"address_zip": {
"type": "string"
}
},
"required": [
"address_line1"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡preview_letter(to, from, body_text, file_url, color, ...)
Create a proof of a letter without charging or mailing it. Returns `proof_url` (a PDF of exactly what will be printed), the USPS address check on the recipient as `to_deliverability`, the exact price as `amount_cents` (the price from the user's prepaid balance), `pay_per_letter_cents` (the price of paying for just this letter by card, slightly higher because it includes the card processing fee), and a `draft_id`. Calling send_letter with that draft_id mails exactly this proof at exactly that price, so reviewing the proof and price with the user first avoids mistakes on a paid, irreversible send. Priced at our cost, from $1.21 for a first-class letter, $8.61 certified, $11.64 certified with an electronic return receipt, and $14.27 certified with a green-card return receipt; extra pages and color are priced at our cost. Those are prepaid-balance prices. Paying for a single letter by card instead costs a little more (from $1.51 for a first-class letter, $8.83 certified, $11.83 with an electronic return receipt, $14.42 with a green-card return receipt), because that one card payment carries Stripe's whole processing fee (2.9% + 30¢).
入力スキーマ
{
"type": "object",
"properties": {
"to": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Full name of recipient or sender"
},
"company": {
"type": "string"
},
"address_line1": {
"type": "string",
"minLength": 1
},
"address_line2": {
"type": "string"
},
"address_city": {
"type": "string",
"minLength": 1
},
"address_state": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"description": "Two-letter US state code"
},
"address_zip": {
"type": "string",
"minLength": 5
},
"address_country": {
"default": "US",
"type": "string"
}
},
"required": [
"name",
"address_line1",
"address_city",
"address_state",
"address_zip"
]
},
"from": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Full name of recipient or sender"
},
"company": {
"type": "string"
},
"address_line1": {
"type": "string",
"minLength": 1
},
"address_line2": {
"type": "string"
},
"address_city": {
"type": "string",
"minLength": 1
},
"address_state": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"description": "Two-letter US state code"
},
"address_zip": {
"type": "string",
"minLength": 5
},
"address_country": {
"default": "US",
"type": "string"
}
},
"required": [
"name",
"address_line1",
"address_city",
"address_state",
"address_zip"
]
},
"body_text": {
"description": "Plain text body, rendered to a letter-sized PDF server-side.",
"type": "string"
},
"file_url": {
"description": "Public URL to a pre-rendered letter-size PDF.",
"type": "string",
"format": "uri"
},
"color": {
"default": false,
"type": "boolean"
},
"double_sided": {
"default": true,
"type": "boolean"
},
"extra_service": {
"description": "`certified`: USPS Certified Mail (tracking + proof of mailing). `certified_return_receipt`: adds the physical green card (PS Form 3811) signed on delivery and mailed back to the `from` address — strongest proof of delivery. `certified_return_receipt_electronic`: adds a PDF of the delivery signature instead of the physical card (cheaper).",
"type": "string",
"enum": [
"certified",
"certified_return_receipt",
"certified_return_receipt_electronic"
]
},
"description": {
"type": "string"
}
},
"required": [
"to",
"from"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴send_letter(draft_id, to, from, body_text, file_url, ...)
Mail a physical letter via USPS and deduct its price from the user's Mailsnail balance. This is a paid, irreversible action. The usual flow is preview_letter first, then send_letter with the returned `draft_id` once the user has approved the proof and price. If the balance can't cover the send, the result contains `pay_url`, a Mailsnail page where the user can pay for just this letter by card (a slightly higher price that includes the card fee; no account or card saved), and `setup_url`, a Stripe-hosted page where the user can instead add funds to the balance for lower per-letter prices (`pay_per_letter_url` is a Stripe-hosted alternative to pay_url); retry the same call after either. For legal notices, `extra_service: 'certified'` adds USPS tracking and proof of mailing, and `'certified_return_receipt'` also mails the signed green card back to the sender. Priced at our cost, from $1.21 for a first-class letter, $8.61 certified, $11.64 certified with an electronic return receipt, and $14.27 certified with a green-card return receipt; extra pages and color are priced at our cost. Those are prepaid-balance prices. Paying for a single letter by card instead costs a little more (from $1.51 for a first-class letter, $8.83 certified, $11.83 with an electronic return receipt, $14.42 with a green-card return receipt), because that one card payment carries Stripe's whole processing fee (2.9% + 30¢).
入力スキーマ
{
"type": "object",
"properties": {
"draft_id": {
"description": "A draft_id from preview_letter. Mails exactly that proof and charges its quoted price.",
"type": "string"
},
"to": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Full name of recipient or sender"
},
"company": {
"type": "string"
},
"address_line1": {
"type": "string",
"minLength": 1
},
"address_line2": {
"type": "string"
},
"address_city": {
"type": "string",
"minLength": 1
},
"address_state": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"description": "Two-letter US state code"
},
"address_zip": {
"type": "string",
"minLength": 5
},
"address_country": {
"default": "US",
"type": "string"
}
},
"required": [
"name",
"address_line1",
"address_city",
"address_state",
"address_zip"
]
},
"from": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"description": "Full name of recipient or sender"
},
"company": {
"type": "string"
},
"address_line1": {
"type": "string",
"minLength": 1
},
"address_line2": {
"type": "string"
},
"address_city": {
"type": "string",
"minLength": 1
},
"address_state": {
"type": "string",
"minLength": 2,
"maxLength": 2,
"description": "Two-letter US state code"
},
"address_zip": {
"type": "string",
"minLength": 5
},
"address_country": {
"default": "US",
"type": "string"
}
},
"required": [
"name",
"address_line1",
"address_city",
"address_state",
"address_zip"
]
},
"body_text": {
"type": "string"
},
"file_url": {
"type": "string",
"format": "uri"
},
"color": {
"default": false,
"type": "boolean"
},
"double_sided": {
"default": true,
"type": "boolean"
},
"extra_service": {
"type": "string",
"enum": [
"certified",
"certified_return_receipt",
"certified_return_receipt_electronic"
]
},
"description": {
"type": "string"
},
"idempotency_key": {
"description": "Unique key for this mailing; required when sending without draft_id (a draft_id is its own key). Reusing the same key returns the original result instead of sending again, so retries of an uncertain send should reuse it.",
"type": "string",
"minLength": 1,
"maxLength": 256
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_balance
Show the user's Mailsnail balance, whether a payment method is saved, and auto-reload settings. Free: read-only, does not charge.
入力スキーマ
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡add_payment_method(amount_cents, auto_reload)
Get a Stripe-hosted page where the user can add funds to their Mailsnail balance. Always returns `setup_url`: by default a one-time payment for `amount_cents` that does not save the card. With `auto_reload: true`, the same page also saves the card and shows the auto-reload terms the user agrees to (the card is charged automatically when the balance runs low); the user can see and decline those terms on Stripe's page. If a card is already on file, the result also includes `billing_portal_url` (update the card, view receipts) and `current_card`. Does not charge anything by itself.
入力スキーマ
{
"type": "object",
"properties": {
"amount_cents": {
"description": "Balance to fund, in cents. Defaults to 2500 ($25).",
"type": "integer",
"minimum": 1000,
"maximum": 50000
},
"auto_reload": {
"default": false,
"description": "Default false: a one-time payment, and the card is not saved. When true, the Stripe page also saves the card and shows the auto-reload terms the user agrees to: Mailsnail charges the saved card automatically whenever the balance falls below a threshold. The user can see and decline those terms on Stripe's page.",
"type": "boolean"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟡turn_off_auto_reload
Turn off automatic charges to the user's saved card (auto-reload). After this, a send that the balance can't cover returns a payment link instead of reloading the balance. The saved card stays on file, and this does not charge anything. Has no effect if auto-reload is already off. Returns the updated billing summary.
入力スキーマ
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢get_letter(receipt_token)
Get the status of a previously sent letter, including its latest USPS scan once it has been mailed. For certified letters the result includes the USPS tracking number and a usps.com tracking link, and for an electronic return receipt a link to the recipient's signature PDF. Free: read-only, does not charge.
入力スキーマ
{
"type": "object",
"properties": {
"receipt_token": {
"type": "string",
"description": "The `receipt_token` returned by send_letter (not the `id` field, which is the printer's job number and will not resolve)."
}
},
"required": [
"receipt_token"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴cancel_letter(receipt_token)
Cancel a letter sent from the user's MailSnail balance before the printer starts on it (usually possible for about a day after sending), and refund its full price to the balance. Only works for letters this account paid for. Once printing has started the letter can't be cancelled. Confirm with the user before calling: a cancelled letter is not mailed.
入力スキーマ
{
"type": "object",
"properties": {
"receipt_token": {
"type": "string",
"description": "The `receipt_token` returned by send_letter for the letter to cancel."
}
},
"required": [
"receipt_token"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}コミュニティ
エビデンス