# PaperAgent > Send a real, physical letter through the United States Postal Service — printed on paper, put in an envelope, stamped, and mailed. This is not email. PaperAgent prints a letter in New York City, folds it into a #10 envelope, stamps it, and hands it to the United States Postal Service within one business day. ## Agent integration instructions Use the MCP workflow below if your host supports MCP. HTTP-only agents, including Muse.ai, can use the REST workflow below. Both use the same letter service. Follow the authentication, preview, approval and payment steps for your chosen integration. ## Connect a REST agent automatically (start here) No support email or operator-issued key is needed. Human sign-in and approvals are required; do not sign in or approve on the customer's behalf. 1. GET https://paperagent.dev/.well-known/oauth-authorization-server. Continue with device onboarding only when device_authorization_endpoint is advertised. If absent, stop new-customer onboarding and report that Google sign-in, device connections and self-service API-key creation are not enabled yet. Do not offer an API-key connector, send the customer to create a key, or request a key by email as a fallback. Existing credentials and public pricing/address checks remain usable. 2. POST https://paperagent.dev/oauth/register with JSON {"client_name":"Muse.ai","grant_types":["urn:ietf:params:oauth:grant-type:device_code","refresh_token"],"response_types":[],"token_endpoint_auth_method":"none","scope":"letters:read letters:write"}. Store the returned client_id. Omit redirect_uris only for this explicitly requested device flow. Client names are unverified labels, not proof of platform identity. 3. POST https://paperagent.dev/oauth/device_authorization with {"client_id":"YOUR_CLIENT_ID","scope":"letters:read letters:write","resource":"https://paperagent.dev/mcp"}. Show verification_uri_complete directly as a clickable connection link and show the matching user_code. Do not replace this link with your host's manual API-key connector or ask the customer to enter an API key. The customer signs in with Google, validates and confirms their own return address, and approves the named client and permissions. 4. Wait at least the returned interval (5 seconds), then POST https://paperagent.dev/oauth/token with {"grant_type":"urn:ietf:params:oauth:grant-type:device_code","client_id":"YOUR_CLIENT_ID","device_code":"RETURNED_DEVICE_CODE"}. JSON and form encoding are accepted. Poll only while authorization_pending. On slow_down, increase the polling interval by 5 seconds for every subsequent request. Stop on access_denied or expired_token; device codes expire after 10 minutes and are redeemed once. Never ask the customer to paste Google tokens. 5. Store PaperAgent access_token and refresh_token securely; never place credentials in URLs or messages. Send Authorization: Bearer ACCESS_TOKEN to /v1 endpoints. Access lasts one hour. Refresh at /oauth/token using {"grant_type":"refresh_token","client_id":"YOUR_CLIENT_ID","refresh_token":"CURRENT_REFRESH_TOKEN"}; securely replace both tokens on every successful refresh. Keep scopes unchanged or narrow them. Disconnecting in /account revokes the whole token family. 6. Continue the draft → preview → customer approval → unpaid order → customer-approved payment workflow below. A new account with a confirmed return address can prepare an unpaid order before its first live payment. Confirmed, account-bound live Stripe settlement completes live payment verification. Sandbox payments never enable live mailing. All mailing restrictions and review holds still apply. Optional API keys (only when self-service is enabled): use this separate, manual option only when the integration requires a key or the customer explicitly chooses it. The customer can sign in at https://paperagent.dev/account to create named test/live keys with letter scopes. An API-key connector asks for that PaperAgent key; it does not start device OAuth. Secrets are shown once. Agent tokens and API keys cannot create more credentials. Customer-management endpoints require a browser session (signed in with an emailed code or Google), the session's X-CSRF-Token, and same-origin requests. Use a self-service test key for Stripe test-mode journeys; ordinary agent OAuth tokens are live-mode. Google login credentials identify the customer and never authorize PaperAgent API calls. ## Pricing All prices are per letter, in US dollars, published, with no login and no sales call. | Tier | What the customer gets | Price | |---|---|---| | Standard | We print and mail your letter with USPS First-Class Mail and keep you updated by email. | $4.99 | | Certified Mail | We print and mail your letter with USPS Certified Mail. Includes tracking, email updates, and the delivery date and time from the USPS delivery scan. No signature copy or Return Receipt. | $19.00 | PaperAgent is for individual, one-off letters and does not support bulk mailings. There is no per-page charge or colour printing: each accepted letter costs its tier's price above and prints in black and white. ## What the price includes The price of a letter is the whole price. Nothing is added at the end except sales tax where it applies. ## Constraints - US domestic addresses only. - Mailed within one business day. Business days exclude weekends and federal holidays. - A letter is at most 6 printed pages, at the same price: up to 3 print on one side, 4 to 6 on both sides. A longer body is refused, not billed at a higher price: shorten it, or split it into two letters. - This is not email. It produces a physical piece of paper in an envelope. - A PDF can be mailed exactly as it looks: over REST, send `body: {"kind": "pdf", "content": ""}` to POST /v1/drafts (at most 6 MB and 6 pages; each page prints on its own US Letter sheet, in black and white). The MCP tools take text only. A person without an assistant can upload a PDF at https://paperagent.dev/mail-a-pdf. - Standard includes email updates and an estimated delivery date when available, without delivery confirmation. - Certified Mail includes a USPS tracking number, email updates, and the delivery date and time from the USPS delivery scan. No signature copy or Return Receipt. ## MCP integration Connect your host's MCP client to https://paperagent.dev/mcp. Discover the currently available tools and their input schemas with tools/list. Pricing and address validation are public. Authenticate through the host's OAuth connection when a tool requests it; account-scoped reads need letters:read and draft/send operations need letters:write. Full tool reference: https://paperagent.dev/docs. Workflow: get_pricing, optionally validate_address, then create_draft and preview_draft. Show the PDF preview, mailing requirements and exact total to the user. Obtain explicit approval of the recipient, content and total before send_letter. Re-preview after edits or quote expiry. Use the approved total and reuse the same idempotency key on retries. Follow the payment instructions returned by send_letter. If complete_checkout is advertised, use it only with a wallet-approved shared payment token; otherwise offer the returned checkout_url. Never create a second letter to retry payment. An unpaid order is not mailed. Use get_letter_status to report the actual payment and mailing status. ## REST integration (Muse.ai and other HTTP agents) Base URL: https://paperagent.dev/v1. OpenAPI: https://paperagent.dev/openapi.json. REST and MCP share the same engine and payment state. Authenticate with the PaperAgent OAuth access token obtained above, or a self-service PaperAgent sk_test_… / sk_live_… key in Authorization: Bearer (keys also support X-Api-Key). Existing operator keys remain valid. These are not Stripe keys. OAuth discovery: https://paperagent.dev/.well-known/oauth-authorization-server; PKCE S256; resource https://paperagent.dev/mcp; scopes letters:read letters:write. OAuth is live-mode. PaperAgent test keys use test payments. Workflow: 1. GET /v1/pricing; optionally POST /v1/addresses/validate with {address:{line1,city,state,zip5}}. 2. POST /v1/drafts with {to:{name,line1,city,state,zip5},body:{kind:"markdown",content:"…"},tier:"standard"}. The default tier is standard. PATCH /v1/drafts/{id} to revise. 3. GET /v1/drafts/{id}/preview. Show preview_url, requirements and quote.total.display. Obtain explicit approval of recipient, content and exact total. Re-preview after edits or quote expiry. 4. POST /v1/letters with {draft_id,confirm_total_cents:quote.total.amount_cents,idempotency_key:""}. Reuse that key on retries. A 202 creates an unpaid order; nothing is mailed until payment settles. 5. Pay the existing order at payment_url when present, or offer checkout_url. Never create a second letter to retry payment. 6. GET /v1/letters/{id} or subscribe to webhooks. Payment may be followed by review; report the actual status. Notification preferences are account-wide; sandbox letters send no customer email. Linked wallet payment: when available, payment_options gives provider="stripe", methods, network_id, currency, amount_cents and livemode for the approved order. Connect Link through the host wallet and request per-purchase approval for that exact amount and merchant. Explicitly request a shared_payment_token (Link may otherwise issue a virtual card). A Link connection alone does not authorize spending. POST {shared_payment_token:"…",token_constraints?:{amount_limit_cents,expires_at,seller}} to payment_url, preserving PaperAgent account authentication. Expiry is Unix seconds. Never request card numbers. Direct tokens do not need MPP or ChatGPT flags. Muse's actual wallet payload and approval still require partner validation. If payment_options.methods includes "mpp", POST {} (or empty body) to payment_url for an HTTP 402 MPP Stripe charge challenge in WWW-Authenticate. Have the wallet approve it, then retry the identical method, path and body bytes with its credential in Payment-Authorization, preserving account Authorization. Credential payload is {spt:""}; use a compatible MPP client (mppx 0.9.3). Challenges bind account, order, amount, merchant profile, mode and request, and expire after 15 minutes. Success is 200 with Payment-Receipt for an MPP credential and {order_id,letter_id,order_status,payment_intent_id,already_paid,message}. MPP/payment problems use application/problem+json with code and detail: 400 invalid credential; 402 payment_required or payment_challenge_expired means approve the challenge; 402 spt_payment_declined is a confirmed refusal, so get a new approval or use the supplied checkout_url. 402 payment_action_required means finish authentication in the existing Link spend request within 30 minutes, then POST an empty body to payment_url to reconcile; after 30 minutes the payment is canceled and checkout_url returns. 409 payment_in_progress/open_payment_attempt means processing or unknown outcome: reconcile or retry the original token, never authorize another payment. Pending responses include no new challenge, receipt or checkout fallback. Status exposes payment_status and hides new payment_options while unresolved. 503 spt_rail_not_configured means unavailable; mpp_not_configured means direct SPT can still be used. Other errors use {error:{code,message}}. 401: authenticate; 403: permission/policy; 404: unavailable object; 422 total mismatch: re-preview and seek approval; 429: respect Retry-After. After a timeout keep the original order and token. Unknown creations without an intent ID need support after 23 hours; known intents can still be reconciled. Payment settlement and mailing status are separate. Payment configuration is separate from ChatGPT flags. Actual Muse linked-wallet authorization still needs platform validation; repository E2E uses mock payments with real HTTP and PDF rendering. Cancellation/refunds: contact support@paperagent.dev. REST operations (generated from the capability catalog): - GET /v1/account/session — Read the browser session and its CSRF token. Scope: Browser session (email code or Google); CSRF for mutations. - POST /v1/account/login/code — Email a six-digit sign-in code to an address, from our own pages only. Scope: Browser session (email code or Google); CSRF for mutations. - POST /v1/account/login — Check an emailed sign-in code and open a browser session for its address. Scope: Browser session (email code or Google); CSRF for mutations. - POST /v1/account/logout — Sign out of this browser session. Scope: Browser session (email code or Google); CSRF for mutations. - POST /v1/account/sender/validate — Validate a customer return address and show postal corrections. Scope: Browser session (email code or Google); CSRF for mutations. - POST /v1/account/sender — Confirm the validated address receives the customer’s mail. Scope: Browser session (email code or Google); CSRF for mutations. - GET /v1/account/connections — List connected agents and their unverified labels. Scope: Browser session (email code or Google); CSRF for mutations. - DELETE /v1/account/connections/{id} — Revoke an agent’s entire access and refresh token family. Scope: Browser session (email code or Google); CSRF for mutations. - GET /v1/account/api-keys — List API key metadata; never secrets. Scope: Browser session (email code or Google); CSRF for mutations. - POST /v1/account/api-keys — Create a named test or live key with letter scopes; secret shown once. Scope: Browser session (email code or Google); CSRF for mutations. - DELETE /v1/account/api-keys/{id} — Revoke one customer API key. Scope: Browser session (email code or Google); CSRF for mutations. - POST /v1/account/drafts — Create a letter draft from the website. Nothing is printed or charged. Scope: Browser session (email code or Google); CSRF for mutations. - PATCH /v1/account/drafts/{id} — Edit a website draft and refresh its quote. Scope: Browser session (email code or Google); CSRF for mutations. - GET /v1/account/drafts/{id}/preview — Review a website draft: its pages, its total and what printing it means. Scope: Browser session (email code or Google); CSRF for mutations. - POST /v1/account/letters — Order a website draft at its exact total and get the payment page. Scope: Browser session (email code or Google); CSRF for mutations. - GET /v1/account/letters/{id} — Read the payment and mailing status of a letter sent from the website. Scope: Browser session (email code or Google); CSRF for mutations. - GET /v1/pricing — Published prices, available products and limits. Scope: public. - POST /v1/addresses/validate — Validate a US mailing address. Scope: public. - POST /v1/drafts — Create a letter draft and quote. Nothing is printed or charged. Scope: letters:write. - PATCH /v1/drafts/{id} — Edit a draft and refresh its quote. Scope: letters:write. - GET /v1/drafts/{id} — Retrieve a draft and its stored quote. Scope: letters:read. - GET /v1/drafts/{id}/preview — Review the PDF, current total and mailing requirements before approval. Scope: letters:read. - POST /v1/letters — Create one order for an approved draft and exact total. Reuse idempotency_key on retries. Scope: letters:write. - GET /v1/letters/{id} — Read payment, mailing status, scans and delivery estimates. Scope: letters:read. - GET /v1/letters — List letters with cursor pagination. Scope: letters:read. - POST /v1/letters/{id}/checkout — Pay the existing letter with a shared payment token. An empty body reconciles a pending payment or requests an MPP challenge; use Payment-Authorization for its credential. Scope: letters:write. - GET /v1/account — Read the connected account and credential mode. Scope: letters:read. - GET /v1/account/notifications — Read email preferences; settings apply across both modes. Scope: letters:read. - PATCH /v1/account/notifications — Change one email preference. Scope: letters:write. - POST /v1/webhook_endpoints — Subscribe an HTTPS endpoint; the signing secret is returned only once. Scope: letters:write. - GET /v1/webhook_endpoints — List webhook subscriptions. Scope: letters:read. - GET /v1/webhook_endpoints/{id} — Read a webhook subscription. Scope: letters:read. - PATCH /v1/webhook_endpoints/{id} — Update a webhook subscription. Scope: letters:write. - DELETE /v1/webhook_endpoints/{id} — Delete a webhook subscription. Scope: letters:write. - POST /v1/abuse-reports — Report unwanted mail. Responses do not reveal recipient history. Scope: public. - GET /v1/service-status — Whether PaperAgent is taking letters, and when a paused service is back. Scope: public. Address-validation limits default to 20/minute per anonymous IP and 60/minute per connected account, plus a daily provider budget shared with MCP. Abuse reports have a separate persistent 5/minute IP budget. ## Links - Connect Muse.ai with REST OAuth: https://paperagent.dev/connect/muse - Connect to Claude or ChatGPT: https://paperagent.dev/try/claude, https://paperagent.dev/try/chatgpt - Mailing guides: - GYM MEMBERSHIP: https://paperagent.dev/send/gym-cancellation-letter - COMPLAINT & REFUND: https://paperagent.dev/send/complaint-refund-letter - REPAIR REQUEST: https://paperagent.dev/send/landlord-repair-letter - SECURITY DEPOSIT: https://paperagent.dev/send/security-deposit-return-letter - Overviews: - CHATGPT: https://paperagent.dev/can-chatgpt-mail-a-letter - FOR AGENT BUILDERS: https://paperagent.dev/physical-mail-for-ai-agents - Pricing: https://paperagent.dev/pricing - Docs: https://paperagent.dev/docs (REST endpoints, MCP tools, permissions and payments) - Official MCP Registry entry (dev.paperagent/letters): https://registry.modelcontextprotocol.io/v0.1/servers/dev.paperagent%2Fletters/versions/latest - Terms of service: https://paperagent.dev/terms - Privacy policy: https://paperagent.dev/privacy - Refund and return policy: https://paperagent.dev/refunds