loading…
Search for a command to run...
loading…
A Model Context Protocol server that enables LLMs to interact with the Lob.com API for address verification and sending physical mail. It provides 76 tools acro
A Model Context Protocol server that enables LLMs to interact with the Lob.com API for address verification and sending physical mail. It provides 76 tools across 12 resource groups including postcards, letters, checks, and templates with built-in safety features for production use.
A Model Context Protocol server for the Lob.com API. Lets any MCP-compatible LLM (Claude, 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. Mail-piece create tools (
lob_postcards_create,lob_letters_create,lob_self_mailers_create,lob_checks_create,lob_*_orders_create) are billable. Develop with atest_…API key. Switch tolive_…only when you are ready to ship real mail. Always pass anidempotency_keyso retries don't duplicate sends.
extra parameter on every create/update tool — accepts any Lob parameter not enumerated in the schema, so you're never blocked by SDK lagnpx lob-mcp
npm install -g lob-mcp
lob-mcp
git clone https://github.com/optimize-overseas/lob-mcp.git
cd lob-mcp
npm install
npm run build
node build/index.js
The server is configured entirely through environment variables.
| Variable | Required | Description |
|---|---|---|
LOB_API_KEY |
Yes | Your Lob API key. Use a test_… key during development; mail-piece tools will not produce real mail in test mode. |
LOB_API_VERSION |
No | Pin a specific Lob API version via the Lob-Version header (e.g. 2020-02-11). Omit to use your account default. |
LOB_BASE_URL |
No | Override the Lob API base URL. Defaults to https://api.lob.com/v1. |
Add to your claude_desktop_config.json:
{
"mcpServers": {
"lob": {
"command": "npx",
"args": ["-y", "lob-mcp"],
"env": {
"LOB_API_KEY": "test_your_key_here"
}
}
}
}
Restart Claude Desktop. The Lob tools should appear in the tool picker.
claude mcp add lob --env LOB_API_KEY=test_your_key_here -- npx -y lob-mcp
npm run inspector
Then open the URL printed to your terminal. Set LOB_API_KEY in the inspector's environment panel before invoking tools.
All tools are namespaced lob_<resource>_<action>. Annotation hints (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) are set per the MCP spec so hosts can render appropriate confirmation prompts for billable / destructive operations.
lob_addresses_create · lob_addresses_list · lob_addresses_get · lob_addresses_deletelob_us_verifications_create · lob_us_verifications_getlob_us_autocompletions_createlob_intl_verifications_createlob_bulk_us_verifications_create · lob_bulk_intl_verifications_createlob_identity_validationlob_postcards_create · lob_postcards_list · lob_postcards_get · lob_postcards_cancellob_letters_create · lob_letters_list · lob_letters_get · lob_letters_cancellob_self_mailers_create · lob_self_mailers_list · lob_self_mailers_get · lob_self_mailers_cancellob_checks_create · lob_checks_list · lob_checks_get · lob_checks_cancellob_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_deletelob_campaigns_create · lob_campaigns_list · lob_campaigns_get · lob_campaigns_update · lob_campaigns_deletelob_creatives_create · lob_creatives_list · lob_creatives_get · lob_creatives_update · lob_creatives_deletelob_buckslips_create · lob_buckslips_list · lob_buckslips_getlob_buckslip_orders_create · lob_buckslip_orders_listlob_cards_create · lob_cards_list · lob_cards_getlob_card_orders_create · lob_card_orders_listlob_informed_delivery_campaigns_create · lob_informed_delivery_campaigns_list · lob_informed_delivery_campaigns_getlob_qr_codes_listlob_resource_proofs_create · lob_resource_proofs_get · lob_resource_proofs_updatelob_bank_accounts_create · lob_bank_accounts_list · lob_bank_accounts_get · lob_bank_accounts_delete · lob_bank_accounts_verifylob_webhooks_create · lob_webhooks_list · lob_webhooks_get · lob_webhooks_update · lob_webhooks_deleteThis server enforces three safety practices appropriate for a real-money API:
test_… key produces no real mail; a live_… key produces real, billable mail.idempotency_key parameter. Pass a UUID (or any unique string up to 256 characters) per logical request. Lob will return the original response for any subsequent request reusing the same key, preventing duplicate mail on network retries.extra escape hatchLob's API has many resource-specific options that aren't worth enumerating in a tool schema (custom envelope IDs, perforation pages, billing groups, marketing flags, etc.). Every create/update tool accepts an optional extra object whose keys are merged verbatim into the request body:
{
"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.
npm install
npm run build
npm run typecheck
npm run inspector
The compiled output lives in build/. Source is in src/.
src/
├── index.ts # stdio entry — boots McpServer + LobClient
├── env.ts # env loading + test/live mode detection
├── lob/
│ ├── client.ts # fetch-based HTTP client (Basic auth, idempotency, errors)
│ ├── errors.ts # LobApiError + tool-friendly formatter
│ └── redact.ts # PII redaction
├── schemas/
│ ├── common.ts # address, pagination, idempotency, metadata schemas
│ └── mail.ts # mail-piece-shared schemas
└── tools/
├── helpers.ts # registerTool helper with consistent error mapping
├── register.ts # wires every group into the server
└── *.ts # one file per resource group
The 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, and PII handling. New Lob endpoints can be added by registering one more tool against the resource group file (or via the extra escape hatch on existing tools).
asForm: true) but not yet exposed in any tool — the current tools accept HTML strings, URLs, template IDs, and base64 data URIs, which covers the documented Lob content-source forms.Issues and pull requests welcome at https://github.com/optimize-overseas/lob-mcp.
MIT — see LICENSE.
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.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"lob-mcp": {
"command": "npx",
"args": []
}
}
}