lob-mcp
lob-mcp is an MCP server that lets an LLM verify addresses and design, preview, and send real physical mail through Lob.com — defaulting to test mode with layered safety gates.
Address verification — validate/standardize single or bulk (≤1,000) US and international addresses, autocomplete partial US addresses, confirm recipient identity against an address.
Address book — create, list, get, and delete reusable saved addresses (
adr_…).Billable mail sends (preview → commit pairs) — postcards (4x6/6x9/6x11), letters (color, double-sided, extra services, envelopes, inserts), self-mailers (6x18 / 11x9 bifold), checks (draws real funds), plus buckslip and card inventory orders. Previews return a proof PDF (or textual summary for checks/inventory) and a
confirmation_token; the matching_createrequires that token in live mode and rejects payload changes.Manage existing mail — list, retrieve, and cancel scheduled postcards, letters, self-mailers, and checks.
Counts/analytics — answer "how many?" questions cheaply via
include: ['total_count']withlimit: 1; list QR-code scan analytics by date, piece, or campaign.Templates & versions — create/list/search/get/update/delete HTML templates and manage/publish versions.
Campaigns + creatives (live key required) — CRUD campaigns; creatives accept only
tmpl_…IDs.Buckslips & cards — upload assets, list/get inventory, and list nested orders.
Resource proofs — raw proof create/get, plus approve/reject.
Bank accounts — register, list, get, delete, and verify (micro-deposits) accounts needed to draw checks.
Webhooks — CRUD event subscriptions (e.g.
postcard.mailed).Design specs — fetch Lob's official dimensions, bleed, safe areas, and no-print zones via
lob_design_specs_getorlob://specs/{mail_type}/{variant}resources so artwork survives auto-stamped address blocks.Escape hatch — an
extraobject on every create/update merges any unenumerated Lob API field verbatim.Safety harness — test-mode default, explicit
LOB_LIVE_MODEopt-in, mandatory idempotency, exact piece-count cap, optional elicitation for high-value sends, PII redaction, and full tool annotations.
Provides access to USPS tracking events through Lob's API integration, enabling retrieval of mail delivery status and tracking information for physical mail sent via Lob.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lob-mcp verify this address: 123 Main St, San Francisco, CA 94105"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lob-mcp
A Model Context Protocol server for the Lob.com API. Lets any MCP-compatible LLM (Claude, ChatGPT, etc.) verify addresses and send physical mail — postcards, letters, self-mailers, and printed checks — through Lob.
⚠️ Lob produces real physical mail and charges your account. lob-mcp ships a layered safety harness: dual-key configuration (test required, live optional), preview/commit gating with payload binding, mandatory idempotency, an exact piece-count cap, optional narrow elicitation for high-value sends, and bundled Lob design-spec resources so AI design tools can produce print-correct artwork that respects auto-stamped address blocks. Default mode is test. Live mode requires an explicit opt-in.
Quick start
npx lob-mcp initWalks through keys + safety caps, then prints a paste-ready Claude Desktop config snippet and a claude mcp add one-liner. No files written automatically.
Related MCP server: Gmail MCP Server
Features
78 tools + 23 design-spec resources across 12 resource groups — address verification, address book, postcards, letters, self-mailers, checks, templates (incl.
lob_templates_search), campaigns + creatives, buckslips/cards + print orders, QR-code analytics, resource proofs, bank accounts, webhooks, and design specifications.Preview/commit split on every billable resource —
lob_<resource>_previewreturns a Lob-rendered proof PDF (postcards/letters/self-mailers) or a textual summary (checks/inventory orders) plus aconfirmation_token. The matchinglob_<resource>_createrequires that token in live mode and rejects payload mutations.Dual-key model with split read/commit modes —
LOB_TEST_API_KEY(always required) backs previews and is the fallback for everything.LOB_LIVE_API_KEY(optional) drives commits whenLOB_LIVE_MODE=trueAND drives reads (lists, gets, searches) automatically whenever it's configured, so analytics like "how many letters last week?" return real-account data without unlocking billable sends.LOB_READS_USE_TEST=trueoverrides the read default. Previews always render against the test key.Idempotency by default on every billable POST — auto-generated when omitted; deterministic from the confirmation token when present, so retries de-dupe at Lob automatically.
Exact piece-count cap via
LOB_MAX_PIECES_PER_RUN. Hard ceiling, not estimate.Narrow elicitation (off by default) — opt-in confirmation forms for check
amountover a USD threshold or bulk inventory orders over a piece threshold.Complete tool annotation matrix — every tool sets
readOnlyHint,destructiveHint,idempotentHint, andopenWorldHintso hosts can render appropriate confirmation prompts.PII redaction in error output.
Generic
extraparameter on every create/update tool — any Lob field not enumerated in the schema is merged verbatim.Design-spec resources — Lob's official template PDFs and structured JSON specs (dimensions, bleed, safe area, no-print zones, file-format requirements) for every supported variant. AI tools can fetch them before generating artwork to avoid the auto-stamped address-block clipping that catches naive designs.
Spec-driven schemas mirroring Lob's published OpenAPI spec, verified against Lob's live API.
Requirements
Node.js ≥ 18
A Lob test API key — get one free at https://dashboard.lob.com/settings/api-keys
(Optional) A Lob live API key, only if you want to send real mail
Installation
Run via npx (no install)
npx lob-mcp # start the server (reads env from your host config)
npx lob-mcp init # interactive setup wizard — prints config snippetsInstall globally
npm install -g lob-mcp
lob-mcpInstall from source
git clone https://github.com/optimize-overseas/lob-mcp.git
cd lob-mcp
npm install
npm run build
node build/index.jsConfiguration
The server is configured entirely through environment variables. Run lob-mcp init for an interactive walkthrough that emits a paste-ready snippet.
Keys
Variable | Required | Description |
| Yes | Lob |
| No | Lob |
Migration from 0.x:
LOB_API_KEYhas been replaced. Atest_…key inLOB_API_KEYis silently accepted as the test key (soft fallback). Alive_…key inLOB_API_KEYis rejected with a migration error — setLOB_TEST_API_KEYandLOB_LIVE_API_KEYexplicitly.
Modes
Every request is classified into one of four operation kinds, which decides both the key it uses and whether it is allowed at all. This separation exists because reads (how many letters last week?) want real-account data, billable commits (send 10,000 letters) want a separate explicit opt-in, and state-changing mutations must never touch the live account by accident.
Kind | Examples | Key / gate |
preview |
| Always the test key — proofs are a test-account artifact. Never refused. |
commit | the 6 billable |
|
read | lists, gets, searches, and pure lookups (address verification / autocompletion / identity validation) | live whenever |
mutation | deletes, cancels, updates, and non-billable creates (templates, campaigns, creatives, webhooks, addresses, bank accounts, inventory) | FAIL-CLOSED: refused before any network call unless |
Variable | Default | Controls | Description |
|
| Commit + mutation gate | Set to |
|
| Read mode (opt-out) | When |
Typical configurations:
Setup | Test key | Live key |
| Result |
Test-only | ✅ | — | — | Reads + commits on test; mutations refused. |
Cautious analytics (recommended) | ✅ | ✅ | unset | Reads on live, commits on test, mutations refused — real analytics, safe writes. |
Full live | ✅ | ✅ |
| Reads + commits on live; mutations permitted (live key). |
Force test reads | ✅ | ✅ | any | + |
The boot banner prints both modes on startup so you can verify how requests will route before invoking any tool.
Test-mode limitation (by design). Because mutations are refused (not routed to the test key) unless
LOB_LIVE_MODE=true, any flow that depends on a mutating setup step cannot be exercised end-to-end in a test-only or cautious-analytics deployment. Specifically: check sends need a verified bank account (lob_bank_accounts_create/_verifyare mutations), and buckslip/card inventory orders need the asset to exist first (lob_buckslips_create/lob_cards_createare mutations). The billable order/send itself still runs as a $0 test send, but its setup must be done in live mode (or out-of-band). Plain letter / postcard / self-mailer sends have no mutating prerequisite and work fully in test mode. This is the deliberate cost of fail-closing the live account; do not "fix" it by routing mutations to the test key (that reopens the hole this gate closes).
Safety knobs
Variable | Default | Description |
|
| When |
|
| How long a preview's |
| (unset) | Exact ceiling on the total number of mail pieces this server process may create. Counter resets when the server restarts. |
| (unset) | If set, fires an MCP elicitation form when a check |
| (unset) | If set, fires elicitation when a buckslip or card inventory order's quantity exceeds this threshold. |
Lob HTTP
Variable | Default | Description |
| (account default) | Pin a specific Lob API version via the |
|
| Override the Lob API base URL. |
|
| Per-request HTTP timeout for outbound Lob calls. A timeout surfaces as a |
|
| How long |
Use with Claude Desktop
Run npx lob-mcp init to generate the JSON snippet. Paste it under mcpServers in your claude_desktop_config.json:
{
"mcpServers": {
"lob": {
"command": "npx",
"args": ["-y", "lob-mcp"],
"env": {
"LOB_TEST_API_KEY": "test_your_key_here",
"LOB_LIVE_API_KEY": "live_your_key_here",
"LOB_LIVE_MODE": "true",
"LOB_MAX_PIECES_PER_RUN": "10"
}
}
}
}Restart Claude Desktop. The Lob tools should appear in the tool picker.
Use with Claude Code
claude mcp add lob \
--env LOB_TEST_API_KEY=test_your_key_here \
--env LOB_LIVE_API_KEY=live_your_key_here \
--env LOB_LIVE_MODE=true \
--env LOB_MAX_PIECES_PER_RUN=10 \
-- npx -y lob-mcpUse with the MCP Inspector
npm run inspectorThen open the URL printed to your terminal. Set LOB_TEST_API_KEY (and optionally the live key + LOB_LIVE_MODE=true) in the inspector's environment panel before invoking tools.
Safety model
The 1.0 hardening release implements a layered safety harness:
Default test commits. Without
LOB_LIVE_MODE=true, every billable*_createruns against the test key — no real mail, no charges. Reads route by their own switch (see Modes above): if a live key is configured they default to the live account so analytics return real data, butLOB_READS_USE_TEST=trueforces them back to test.Preview/commit split. Every billable tool has a matching
*_previewthat calls Lob via the test key against/resource_proofs(postcards/letters/self-mailers) or returns a textual summary (checks/inventory orders). The preview returns aconfirmation_token. Calling*_createin live mode requires that token AND rejects any payload mutation between preview and commit.Mandatory idempotency. No billable POST leaves the server without an
Idempotency-Key. The server auto-generates a UUID if you don't supply one; when a confirmation token is present, the key islob-mcp-${token}so retrying the same commit de-duplicates at Lob (24-hour window).Exact piece cap.
LOB_MAX_PIECES_PER_RUNis checked at commit time. Exceeding it raisesLOB_PIECE_CAP_EXCEEDEDbefore any Lob call.Narrow elicitation. Two opt-in env vars (
LOB_REQUIRE_ELICITATION_FOR_CHECKS_OVER_USD,LOB_REQUIRE_ELICITATION_FOR_BULK_OVER_PIECES) fire an MCP elicitation form on high-value sends. Both default off.Tool annotations. Every tool sets
readOnlyHint,destructiveHint,idempotentHint, andopenWorldHintso hosts render appropriate confirmation prompts.PII redaction. Address, name, and contact fields are stripped from any error payload echoed back to the client. The full request body is never logged.
If you only do one thing, run lob-mcp init and accept the recommended LOB_MAX_PIECES_PER_RUN value.
Design specifications
lob-mcp exposes Lob's official mail-piece design specifications so AI design tools can produce print-correct artwork. Three access surfaces, all reading from a single source-of-truth manifest:
MCP resources (recommended)
Hosts that support MCP resources (Claude Desktop, MCP Inspector, Cursor 0.40+, most modern agent frameworks) can browse and attach specs to chat context:
JSON spec —
lob://specs/{mail_type}/{variant}.jsonreturns structured data: dimensions (in inches), bleed, safe area, no-print zones with anchor + offset semantics, surface descriptions, and file-format requirements.PDF template —
lob://specs/{mail_type}/{variant}.pdfreturns Lob's official boundary template as a base64 blob, bundled with the npm package (no external fetch).
resources/list returns 23 entries (12 JSON + 11 PDF — card has a JSON spec but no Lob-published PDF). Each is annotated with audience: ["user", "assistant"] so hosts surface them in resource pickers.
Inline in preview responses
Every lob_*_preview tool response includes a design_spec field with the spec for the variant being previewed. The model has the no-print-zone coordinates in scope when reviewing a Lob proof, so it can self-audit before committing.
Fallback tool
For hosts without resource support, call lob_design_specs_get(mail_type, variant) — same JSON, returned inline.
Supported variants
|
| PDF? |
|
| ✓ |
|
| ✓ |
|
| ✓ |
|
| ✓ |
|
| ✓ |
|
| (Lob does not publish a standalone PDF) |
Why this matters
Lob auto-stamps the recipient address, IMb barcode, and postage indicia onto specific zones of every billable mail piece. A 4×6 postcard, for example, has a 3.2835″×2.375″ ink-free zone in the lower-right of the back side — any text or critical artwork placed there will be clipped at print. The spec resources document this zone (and every other surface constraint) in machine-readable form so an LLM can lay out artwork that respects it.
Refreshing PDF templates
Maintainers can pull the latest PDFs from Lob's S3 with:
node scripts/download-spec-pdfs.mjs
npm run buildRe-commit the refreshed specs/pdfs/*.pdf files. The build step copies them into build/specs/pdfs/ so they ship in the npm tarball.
Tool reference
All tools are namespaced lob_<resource>_<action>. The six billable tools come in _preview + _create pairs:
Resource | Preview | Commit (BILLABLE) |
Postcards |
|
|
Letters |
|
|
Self-mailers |
|
|
Checks |
|
|
Buckslip orders |
|
|
Card orders |
|
|
Address book
lob_addresses_create·lob_addresses_list·lob_addresses_get·lob_addresses_delete
Address verification
lob_us_verifications_create·lob_us_verifications_getlob_us_autocompletions_createlob_intl_verifications_createlob_bulk_us_verifications_create·lob_bulk_intl_verifications_createlob_identity_validation
Postcards
lob_postcards_preview·lob_postcards_create(BILLABLE) ·lob_postcards_list·lob_postcards_get·lob_postcards_cancel
Letters
lob_letters_preview·lob_letters_create(BILLABLE) ·lob_letters_list·lob_letters_get·lob_letters_cancel
Self-mailers
lob_self_mailers_preview·lob_self_mailers_create(BILLABLE) ·lob_self_mailers_list·lob_self_mailers_get·lob_self_mailers_cancel
Checks
lob_checks_preview·lob_checks_create(BILLABLE + DRAWS FUNDS) ·lob_checks_list·lob_checks_get·lob_checks_cancel
Checks have no Lob proof endpoint.
lob_checks_previewreturns a textual summary instead of a PDF. The token still binds the payload — committing a differentamount,to, or bank account is rejected withLOB_TOKEN_PAYLOAD_MISMATCH.
Templates and template versions
lob_templates_create·lob_templates_list·lob_templates_get·lob_templates_update·lob_templates_deletelob_template_versions_create·lob_template_versions_list·lob_template_versions_get·lob_template_versions_update·lob_template_versions_delete
Campaigns + creatives (live-mode key required)
lob_campaigns_create·lob_campaigns_list·lob_campaigns_get·lob_campaigns_update·lob_campaigns_deletelob_creatives_create·lob_creatives_get·lob_creatives_update·lob_creatives_delete
Creative content quirk. Lob's
/v1/creativesendpoint accepts only Lob template IDs (tmpl_…) for thefront,back,inside,outside, andfilecontent fields — not HTML strings or remote URLs. To use a URL or HTML as creative content, first calllob_templates_createto upload it as a template, then pass the resultingtmpl_…here.
Buckslips, cards, and print orders
lob_buckslips_create·lob_buckslips_list·lob_buckslips_getlob_buckslip_orders_preview·lob_buckslip_orders_create(BILLABLE) ·lob_buckslip_orders_listlob_cards_create·lob_cards_list·lob_cards_getlob_card_orders_preview·lob_card_orders_create(BILLABLE) ·lob_card_orders_list
Buckslip and card create endpoints require a publicly-reachable PDF URL with exact dimensions (8.75″×3.75″ for buckslips, 3.375″×2.125″ for cards). Lob's buckslip create accepts only
multipart/form-dataand is sent as such by this server. Inventory orders have no Lob proof endpoint, so the preview is textual.
QR codes and resource proofs
lob_qr_codes_listlob_resource_proofs_create·lob_resource_proofs_get·lob_resource_proofs_update
Bank accounts (required to draw checks)
lob_bank_accounts_create·lob_bank_accounts_list·lob_bank_accounts_get·lob_bank_accounts_delete·lob_bank_accounts_verify
Webhooks
lob_webhooks_create·lob_webhooks_list·lob_webhooks_get·lob_webhooks_update·lob_webhooks_delete
The extra escape hatch
Lob's API has many resource-specific options that aren't worth enumerating in a tool schema. Every create/update tool accepts an optional extra object whose keys are merged verbatim into the request body, with explicitly-typed fields taking precedence:
{
"to": "adr_123…",
"from": "adr_456…",
"front": "<html>…</html>",
"back": "<html>…</html>",
"extra": {
"billing_group_id": "bg_…",
"use_type": "marketing"
}
}Refer to https://docs.lob.com/ for the full set of parameters per resource.
Development
npm install
npm run typecheck
npm run build
npm test # node:test unit suite
npm run inspector # interactive smoke testing
node tests/integration.mjs # live integration smoke (needs .env.test)The compiled output lives in build/. Source is in src/.
Architecture
src/
├── index.ts # stdio entry — boots McpServer + LobClient + stores
├── env.ts # dual-key env loading + safety knobs
├── version.ts # SERVER_VERSION + USER_AGENT
├── init/
│ └── wizard.ts # `lob-mcp init` interactive setup
├── lob/
│ ├── client.ts # fetch-based HTTP client (dual auth, idempotency assertion)
│ ├── errors.ts # LobApiError + LobMcpError + tool-friendly formatter
│ └── redact.ts # recursive PII redaction
├── preview/
│ ├── token-store.ts # TokenStore interface + InMemoryTokenStore
│ ├── payload-hash.ts # canonical JSON + SHA-256
│ ├── preview-record.ts
│ └── preview-commit.ts # buildPreviewCommit helper
├── safety/
│ ├── piece-counter.ts # exact piece-count cap
│ └── elicit.ts # narrow elicitOrFail helper
├── schemas/
│ ├── common.ts # address, pagination, idempotency, metadata schemas
│ └── mail.ts # mail-piece-shared schemas
└── tools/
├── helpers.ts # registerTool + ToolAnnotationPresets
├── register.ts # wires every group into the server
└── *.ts # one file per resource groupThe HTTP client is intentionally thin — it does not depend on the official lob-typescript-sdk, which keeps the dependency surface small and gives this server tighter control over headers, retries, multipart encoding, and PII handling.
Limitations
Multipart file uploads from disk are supported by the underlying client (
asForm: true) but the user-facing tools accept content via URL, HTML string, or Lob template ID — not a local filesystem path.OAuth is not supported because Lob does not offer it. Auth is HTTP Basic with an API key.
Some endpoints require a live-mode key. The campaigns + creatives API and the verification-retrieval endpoint return 403 in test mode.
Token store is in-memory. A multi-process or restart-resilient deployment would need a Redis or Firestore backend; the
TokenStoreinterface is shaped for this.
Contributing
Issues and pull requests welcome at https://github.com/optimize-overseas/lob-mcp.
License
MIT — see LICENSE.
Disclaimer
This project is not affiliated with, endorsed by, or sponsored by Lob.com. "Lob" is a trademark of Lob.com, Inc. Use of the Lob API is subject to Lob's Terms of Service and Acceptable Use Policy.
Available Tools
78 toolslob_addresses_createSave address to address bookAIdempotent
Save an address to the Lob address book so it can be reused by ID (adr_…) when creating mail pieces. Stored addresses are NOT automatically verified — call lob_us_verifications_create or lob_intl_verifications_create separately if needed.
Inputs: address_line1 (required), name, email, extra, +9 more.
lob_addresses_deleteDelete a saved addressADestructiveIdempotent
Delete a saved address from the address book. Does not affect mail pieces already created with it.
Inputs: id (required).
lob_addresses_getRetrieve a saved addressARead-onlyIdempotent
Retrieve a single saved address by ID.
Inputs: id (required).
lob_addresses_listList address book entriesARead-onlyIdempotent
List addresses stored in your Lob address book. For 'how many addresses?' counts, pass include: ['total_count'] with limit: 1. Filter by date_created (e.g. { gt: '<iso>' } for recently-added) or metadata.
Inputs: after, limit, before, include, +2 more.
lob_bank_accounts_createCreate a bank accountAIdempotent
Register a bank account that can be used to draw checks. Requires routing number, account number, account type, and signatory. Bank accounts must be verified (lob_bank_accounts_verify) before use in lob_checks_create.
Inputs: signatory (required), account_type (required), account_number (required), routing_number (required), +3 more.
lob_bank_accounts_deleteDelete a bank accountADestructiveIdempotent
Remove a bank account. Pending checks drawn against it will continue to clear.
Inputs: id (required).
lob_bank_accounts_getRetrieve a bank accountARead-onlyIdempotent
Retrieve a single bank account by ID.
Inputs: id (required).
lob_bank_accounts_listList bank accountsARead-onlyIdempotent
List bank accounts on your Lob account. For 'how many bank accounts?' counts, pass include: ['total_count'] with limit: 1.
Inputs: after, limit, before, include, +2 more.
lob_bank_accounts_verifyVerify a bank accountAIdempotent
Verify a bank account by submitting two micro-deposit amounts (in cents) that Lob deposited into the account during registration. Required before the account can be used to draw checks.
Inputs: id (required), amounts (required), extra.
lob_buckslip_orders_createOrder buckslip inventory (BILLABLE)ADestructiveIdempotent
Commit a buckslip-inventory order. Billable in live mode — Lob prints and stocks the requested quantity. Requires a confirmation_token from lob_buckslip_orders_preview that matches the current payload (live mode only). If LOB_REQUIRE_ELICITATION_FOR_BULK_OVER_PIECES is set and quantity_ordered exceeds it, an elicitation form must be confirmed.
Inputs: buckslip_id (required), quantity_ordered (required), extra, idempotency_key, +1 more.
lob_buckslip_orders_listList buckslip ordersARead-onlyIdempotent
List orders for a specific buckslip. Note: this nested endpoint does NOT accept include: ['total_count'] — counting requires walking pages, or read aggregate fields (quantity_ordered, quantity_remaining) off the parent via lob_buckslips_get.
Inputs: buckslip_id (required), after, limit, before, +3 more.
lob_buckslip_orders_previewPreview a buckslip orderAIdempotent
Validate a buckslip-inventory-order payload and return a textual summary. Returns a confirmation_token to pass to lob_buckslip_orders_create — required in live mode.
Inputs: buckslip_id (required), quantity_ordered (required), extra, idempotency_key.
lob_buckslips_createCreate a buckslipAIdempotent
Upload a buckslip — an 8.75"×3.75" promotional insert that can be included in letters. front must be a publicly-reachable PDF URL (or base64 data URI). Inventory is reserved on Lob's side and consumed when ordered. Note: Lob's buckslips API only accepts multipart/form-data, so this tool sends the body as multipart.
Inputs: front (required), back, size, extra, +2 more.
lob_buckslips_getRetrieve a buckslipARead-onlyIdempotent
Retrieve a single buckslip by ID.
Inputs: id (required).
lob_buckslips_listList buckslipsARead-onlyIdempotent
List buckslip inventory on your account. For 'how many buckslips?' counts, pass include: ['total_count'] with limit: 1. Filter by date_created or metadata.
Inputs: after, limit, before, include, +2 more.
lob_bulk_intl_verifications_createBulk verify international addressesARead-onlyIdempotent
Verify up to 1,000 non-US addresses in a single request.
Inputs: addresses (required), extra.
lob_bulk_us_verifications_createBulk verify US addressesARead-onlyIdempotent
Verify up to 1,000 US addresses in a single request. Returns one verification result per input, in the same order.
Inputs: addresses (required), case, extra.
lob_campaigns_createCreate a campaignAIdempotent
Create a campaign — a container for batched mail-piece sends with a shared creative, schedule, and audience. Creating a campaign does not by itself send mail; you trigger sends per Lob docs.
Inputs: name (required), extra, metadata, send_date, +4 more.
lob_campaigns_deleteDelete a campaignADestructiveIdempotent
Delete a campaign. Only allowed before send.
Inputs: id (required).
lob_campaigns_getRetrieve a campaignARead-onlyIdempotent
Retrieve a single campaign by ID.
Inputs: id (required).
lob_campaigns_listList campaignsARead-onlyIdempotent
List campaigns on your Lob account. For 'how many campaigns?' counts, pass include: ['total_count'] with limit: 1. Filter by date_created or metadata.
Inputs: after, limit, before, include, +2 more.
lob_campaigns_updateUpdate a campaignAIdempotent
Update a campaign's metadata or schedule before it has been sent.
Inputs: id (required), name, extra, metadata, +4 more.
lob_card_orders_createOrder card inventory (BILLABLE)ADestructiveIdempotent
Commit a card-inventory order. Billable in live mode — Lob prints and stocks the requested quantity. Requires a confirmation_token from lob_card_orders_preview that matches the current payload (live mode only). If LOB_REQUIRE_ELICITATION_FOR_BULK_OVER_PIECES is set and quantity exceeds it, an elicitation form must be confirmed.
Inputs: card_id (required), quantity (required), extra, idempotency_key, +1 more.
lob_card_orders_listList card ordersARead-onlyIdempotent
List orders for a specific card. Note: this nested endpoint does NOT accept include: ['total_count'] — counting requires walking pages, or read aggregate fields off the parent via lob_cards_get.
Inputs: card_id (required), after, limit, before, +3 more.
lob_card_orders_previewPreview a card orderAIdempotent
Validate a card-inventory-order payload and return a textual summary. Returns a confirmation_token to pass to lob_card_orders_create — required in live mode.
Inputs: card_id (required), quantity (required), extra, idempotency_key.
lob_cards_createCreate a cardBIdempotent
Upload a card — a small printed insert (e.g. business card, plastic gift card) that can be inserted with a letter.
Inputs: front (required), back, size, extra, +2 more.
lob_cards_getRetrieve a cardARead-onlyIdempotent
Retrieve a single card by ID.
Inputs: id (required).
lob_cards_listList cardsARead-onlyIdempotent
List card inventory on your account. For 'how many cards?' counts, pass include: ['total_count'] with limit: 1. Filter by date_created or metadata.
Inputs: after, limit, before, include, +2 more.
lob_checks_cancelCancel a scheduled checkADestructiveIdempotent
Cancel a check before its send_date. Once printed/mailed, checks cannot be cancelled — you would need to issue a stop-payment with the bank.
Inputs: id (required).
lob_checks_createCreate a check (BILLABLE + DRAWS FUNDS)ADestructiveIdempotent
Commit a check send. HIGH IMPACT: incurs Lob fees AND draws the check amount from the linked bank account when cashed. Requires a verified bank account ID (bank_…). In live mode, requires a confirmation_token from lob_checks_preview that matches the current payload. If LOB_REQUIRE_ELICITATION_FOR_CHECKS_OVER_USD is set and amount exceeds it, an elicitation form must be confirmed by the user before dispatch.
For the bottom of the check page, Lob requires exactly one of message (plain text, max 400 chars) or check_bottom (custom template / HTML / PDF, typically paired with merge_variables).
Inputs: to (required), from (required), amount (required), bank_account (required), +16 more.
lob_checks_getRetrieve a checkBRead-onlyIdempotent
Retrieve a single check by ID.
Inputs: id (required).
lob_checks_listList checksARead-onlyIdempotent
List checks on your Lob account. For 'how many checks?' counts, pass include: ['total_count'] with limit: 1 — never paginate to count. Filter by date_created (e.g. { gt: '<iso>' } for 'last N days'), send_date, scheduled, or metadata. Default sort is most-recent first.
Inputs: after, limit, before, include, +4 more.
lob_checks_previewPreview a checkAIdempotent
Validate a check payload and return a textual summary. Lob does not produce check proofs, so no PDF is rendered. Returns a confirmation_token to pass to lob_checks_create — required in live mode. The token binds the payload: committing a different amount or recipient is rejected.
Inputs: to (required), from (required), amount (required), bank_account (required), +15 more.
lob_creatives_createCreate a creativeAIdempotent
Create a campaign creative — the artwork (front/back / inside/outside / file) used by a campaign for postcards, letters, or self-mailers. Important: unlike lob_postcards_create and the other mail-piece create tools, Lob's /v1/creatives endpoint does NOT accept HTML strings, remote URLs, or inline PDFs in the content fields — it accepts ONLY a Lob template ID (tmpl_…). To use a URL or HTML as creative content, first call lob_templates_create to upload it as a template, then pass the resulting tmpl_… here. Required by resource_type: postcard → front + back; letter → file + from; self_mailer → inside + outside. Live-mode key required.
Inputs: campaign_id (required), resource_type (required), back, file, +8 more.
lob_creatives_deleteDelete a creativeBDestructiveIdempotent
Delete a creative.
Inputs: id (required).
lob_creatives_getRetrieve a creativeARead-onlyIdempotent
Retrieve a single creative by ID.
Inputs: id (required).
lob_creatives_updateUpdate a creativeAIdempotent
Update a creative's description or metadata.
Inputs: id (required), extra, metadata, description.
lob_design_specs_getGet Lob design specARead-onlyIdempotent
Return the design specification (dimensions, bleed, safe area, no-print zones, file requirements) for a Lob mail-piece variant. Call this BEFORE generating artwork so the design respects Lob's auto-stamped address blocks. Same data is also available as MCP resources at lob://specs/{mail_type}/{variant}.json.
Inputs: variant (required), mail_type (required).
lob_identity_validationValidate identity for an addressARead-onlyIdempotent
Validate a person/business name against a US address. Returns whether the recipient is associated with the address.
Inputs: recipient (required), primary_line (required), city, extra, +3 more.
lob_intl_verifications_createVerify an international addressARead-onlyIdempotent
Verify a single non-US address. Returns deliverability status and standardized components for the destination country.
Inputs: country (required), primary_line (required), city, extra, +5 more.
lob_letters_cancelCancel a scheduled letterADestructiveIdempotent
Cancel a letter before its send_date. Production-locked letters cannot be cancelled.
Inputs: id (required).
lob_letters_createCreate a letter (BILLABLE)ADestructiveIdempotent
Commit a letter send. Billable in live mode. Requires a confirmation_token from lob_letters_preview that matches the current payload (live mode only).
Inputs: to (required), file (required), from (required), cards, +18 more.
lob_letters_getRetrieve a letterARead-onlyIdempotent
Retrieve a single letter by ID.
Inputs: id (required).
lob_letters_listList lettersARead-onlyIdempotent
List letters on your Lob account. For 'how many letters?' counts, pass include: ['total_count'] with limit: 1 — never paginate to count. Filter by date_created (e.g. { gt: '<iso>' } for 'last N days'), send_date, mail_type, color, scheduled, or metadata. Default sort is most-recent first.
Inputs: after, color, limit, before, +6 more.
lob_letters_previewPreview a letterAIdempotent
Render a Lob proof PDF for a letter without charging or sending. Returns a confirmation_token to pass to lob_letters_create. Required in live mode.
Inputs: to (required), file (required), from (required), cards, +17 more.
lob_postcards_cancelCancel a scheduled postcardADestructiveIdempotent
Cancel a postcard before its send_date. Only works while the postcard is still in a cancellable state — production-locked pieces cannot be cancelled.
Inputs: id (required).
lob_postcards_createCreate a postcard (BILLABLE)ADestructiveIdempotent
Commit a postcard send. Billable in live mode: produces real physical mail and is charged to your Lob account. In live mode, requires a confirmation_token from lob_postcards_preview that matches the current payload. In test mode, the token is optional (dev ergonomics).
Inputs: to (required), back (required), from (required), front (required), +11 more.
lob_postcards_getRetrieve a postcardARead-onlyIdempotent
Retrieve a single postcard by ID.
Inputs: id (required).
lob_postcards_listList postcardsARead-onlyIdempotent
List postcards on your Lob account. For 'how many postcards?' counts, pass include: ['total_count'] with limit: 1 — never paginate to count. Filter by date_created (e.g. { gt: '<iso>' } for 'last N days'), send_date, size, mail_type, scheduled, or metadata. Default sort is most-recent first.
Inputs: size, after, limit, before, +6 more.
lob_postcards_previewPreview a postcardAIdempotent
Render a Lob proof PDF for a postcard without charging or sending. Returns a confirmation_token to pass to lob_postcards_create. The token is required in live mode (LOB_LIVE_MODE=true). Token TTL: LOB_CONFIRMATION_TTL_SECONDS (default 600). Sizes: 4x6 (default), 6x9, 6x11.
Inputs: to (required), back (required), from (required), front (required), +10 more.
lob_qr_codes_listList QR code analyticsARead-onlyIdempotent
List QR-code scan / analytics events for QR codes embedded in your mail pieces. For 'how many scans?' counts, pass include: ['total_count'] with limit: 1. Filter by date_scanned (e.g. { gt: '<iso>' } for 'last N days'), resource_id (scans tied to a specific mail piece), or campaign_id (scans for a whole campaign).
Inputs: after, limit, before, include, +5 more.
lob_resource_proofs_createCreate a resource proofAIdempotent
Create a proof — a PDF preview of how a resource (postcard, letter, self-mailer) will print — for review before committing to a mail send. Pass resource_parameters with the same shape you would pass to the underlying create endpoint (e.g. { front, back, to } for a postcard). Returns once Lob has rendered the proof (bounded by LOB_PROOF_WAIT_MS); one still rendering comes back with render_pending: true. Note: the lob_*_preview tools call this endpoint internally; this raw tool is exposed for advanced use cases.
Inputs: resource_type (required), resource_parameters (required), extra, template_id.
lob_resource_proofs_getRetrieve a resource proofARead-onlyIdempotent
Retrieve a resource proof by ID, including a URL to download the proof PDF.
Inputs: id (required).
lob_resource_proofs_updateApprove/reject a resource proofBIdempotent
Approve or reject a resource proof.
Inputs: id (required), extra, status.
lob_self_mailers_cancelCancel a scheduled self-mailerADestructiveIdempotent
Cancel a self-mailer before its send_date.
Inputs: id (required).
lob_self_mailers_createCreate a self-mailer (BILLABLE)ADestructiveIdempotent
Commit a self-mailer send. Billable in live mode. Requires a confirmation_token from lob_self_mailers_preview that matches the current payload (live mode only). Sizes: 6x18_bifold (default), 11x9_bifold.
Inputs: to (required), from (required), inside (required), outside (required), +11 more.
lob_self_mailers_getRetrieve a self-mailerARead-onlyIdempotent
Retrieve a single self-mailer by ID.
Inputs: id (required).
lob_self_mailers_listList self-mailersARead-onlyIdempotent
List self-mailers on your Lob account. For 'how many?' counts, pass include: ['total_count'] with limit: 1 — never paginate to count. Filter by date_created (e.g. { gt: '<iso>' } for 'last N days'), size, mail_type, scheduled, or metadata. Default sort is most-recent first.
Inputs: size, after, limit, before, +5 more.
lob_self_mailers_previewPreview a self-mailerAIdempotent
Render a Lob proof PDF for a self-mailer without charging or sending. Returns a confirmation_token to pass to lob_self_mailers_create. Required in live mode.
Inputs: to (required), from (required), inside (required), outside (required), +10 more.
lob_templates_createCreate a templateAIdempotent
Create a reusable HTML template that can be referenced by ID (tmpl_…) when creating mail pieces. Supports Handlebars-style {{variables}} for runtime substitution.
Inputs: html (required), extra, engine, metadata, +1 more.
lob_templates_deleteDelete a templateADestructiveIdempotent
Delete a template. Mail pieces already created from it are unaffected; future references will fail.
Inputs: id (required).
lob_templates_getRetrieve a templateARead-onlyIdempotent
Retrieve a single template (including its published version) by ID.
Inputs: id (required).
lob_templates_listList templatesARead-onlyIdempotent
List templates on your Lob account. By default returns slim records (no HTML body) — Lob template HTML can be many MB per entry and quickly overwhelms LLM context. Pass include_html: true to get the full HTML, or use lob_templates_get(id) for a single template. For 'how many templates?' counts, pass include: ['total_count'] with limit: 1. To find a template by name or metadata, use lob_templates_search.
Inputs: after, limit, before, include, +3 more.
lob_templates_searchSearch templatesARead-onlyIdempotent
Find templates by description substring (case-insensitive) and/or by Lob metadata. Pages through /templates server-side and returns slim matches (no HTML — use lob_templates_get(id) for the full body). Useful when you know the template by name but not by tmpl_… id.
Inputs: limit, metadata, max_pages, description_contains.
lob_templates_updateUpdate a templateAIdempotent
Update a template's metadata or published version. To publish a new version, set published_version to a version ID (vrsn_…).
Inputs: id (required), extra, metadata, description, +1 more.
lob_template_versions_createCreate a template versionAIdempotent
Add a new version of a template's HTML. Creating a new version does NOT automatically publish it — use lob_templates_update to set published_version.
Inputs: html (required), template_id (required), extra, engine, +1 more.
lob_template_versions_deleteDelete a template versionADestructiveIdempotent
Delete a template version. Cannot delete the currently published version.
Inputs: version_id (required), template_id (required).
lob_template_versions_getRetrieve a template versionARead-onlyIdempotent
Retrieve a specific version of a template.
Inputs: version_id (required), template_id (required).
lob_template_versions_listList template versionsARead-onlyIdempotent
List all versions of a template. Slim by default (no HTML); pass include_html: true to get the full HTML body of each version, or use lob_template_versions_get(template_id, version_id). For 'how many versions?' counts, pass include: ['total_count'] with limit: 1.
Inputs: template_id (required), after, limit, before, +4 more.
lob_template_versions_updateUpdate a template versionAIdempotent
Update the description of a template version. HTML cannot be modified after creation.
Inputs: version_id (required), template_id (required), extra, description.
lob_us_autocompletions_createAutocomplete a US addressARead-onlyIdempotent
Suggest completed US addresses from a partial input — useful for typeahead UX. Returns up to 10 suggestions.
Inputs: address_prefix (required), city, extra, state, +2 more.
lob_us_verifications_createVerify a US addressARead-onlyIdempotent
Verify, correct, and standardize a single US address. Returns deliverability status, USPS-formatted components, geolocation (lat/lng), and county info.
Inputs: primary_line (required), case, city, extra, +6 more.
lob_us_verifications_getRetrieve a US verificationARead-onlyIdempotent
Retrieve a previously-created US verification by ID.
Inputs: id (required).
lob_webhooks_createCreate a webhook subscriptionAIdempotent
Subscribe an HTTPS endpoint to receive Lob event notifications (e.g. 'postcard.mailed', 'letter.in_transit', 'check.delivered'). The endpoint must respond with 2xx within 5 seconds.
Inputs: url (required), event_types (required), extra, metadata, +1 more.
lob_webhooks_deleteDelete a webhookBDestructiveIdempotent
Delete a webhook subscription.
Inputs: id (required).
lob_webhooks_getRetrieve a webhookARead-onlyIdempotent
Retrieve a single webhook subscription by ID.
Inputs: id (required).
lob_webhooks_listList webhooksARead-onlyIdempotent
List webhook subscriptions on your account. Note: Lob's /webhooks does NOT support include: ['total_count'] — for a count, just inspect data.length (webhook lists are small).
Inputs: after, limit, before, include, +2 more.
lob_webhooks_updateUpdate a webhookAIdempotent
Update a webhook's URL, event subscriptions, or description. Note: the disabled flag on the response is Lob-managed (e.g. Lob auto-disables webhooks whose delivery URL consistently fails) and is not settable by callers.
Inputs: id (required), url, extra, metadata, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 78 tools
Resources are cleanly delineated (postcards vs letters vs checks vs creatives vs templates vs template_versions), and the preview/create pairs are explicitly distinguished. Minor overlap exists between lob_*_preview tools and the raw lob_resource_proofs_create, which the description admits calls the same endpoint, plus the bulk verification tools mirror their single-address counterparts.
Nearly every tool follows a predictable lob_<resource>_<verb> pattern (lob_postcards_create, lob_letters_list, lob_webhooks_delete), which is highly readable. A few outliers break the verb convention, e.g. lob_identity_validation (noun-only) and lob_us_verifications_get, but overall consistency is strong.
78 tools is far above what an agent can comfortably navigate and select from, even accounting for the broad Lob API surface. The per-resource list/get/create/cancel pattern is defensible but the sheer volume makes tool selection error-prone and context-heavy.
Coverage is broad: full lifecycle for postcards, letters, self-mailers, checks, templates/versions, campaigns, bank accounts, webhooks, and addresses, plus verifications, QR analytics, and design specs. Minor gaps like no card update/delete exist, but these largely reflect genuine API limitations.
Maintenance
Related MCP Connectors
Verify US & international addresses and send physical mail (postcards, letters, checks) via Lob.
Lob MCP — US address verification, bulk verification, and autocompletion (docs.lob.com). BYO-key…
Connect AI agents to Emitd email sending, message tracking, templates, and automations. Emitd hosts a Model Context Protocol server for integrating supported email operations into AI-agent workflows. Connect a compatible client to the hosted endpoint (https://mcp.emitd.com/mcp) and authenticate with an Emitd API key. Available tools depend on the key's permissions and enabled features. Emitd's capability areas include sending email, message activity, templates, contacts, audiences, segments, domains, analytics, inbound email, broadcasts, automations, webhooks, and suppressions. Use restricted keys, sending guardrails, and approval settings appropriate to each workflow. For more information check https://emitd.com
Email inboxes, webhook URLs, mock APIs and 170+ tools for coding agents over one MCP connection.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to send physical letters and postcards to over 200 countries using Solana cryptocurrency for payment. It provides tools for generating mail quotes, managing wallet balances, and automating physical correspondence directly through the Model Context Protocol.489 npm1MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to search, read, and send emails with attachment support through the Gmail API. It also provides tools for comprehensive label management and uses secure OAuth2 authentication for mailbox access.283 npmMIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server providing tools for DB queries, API calls, file I/O, and text transformations, enabling AI agents like Claude to perform real-world actions.10MIT
- FlicenseNot gradedqualityDmaintenanceA secure Model Context Protocol server providing HTTP endpoints for AI agent tool execution, including file system operations, shell commands, and LLM-based code generation.1-