Lob MCP server for AI agents

Live

API KEY

DIRECT MAIL

Marketing

Lob gives your agent direct mail operations: create and mail postcards, letters, self mailers, and checks, run print-and-mail campaigns, verify US and international addresses, and manage templates and short links.

  • Per-user credentials: each call uses the actual user's API key, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
Lob
agent · Acme Q3
Run
Which letters in the October renewal campaign are still processing?
S
lob_list_letters
134ms
Direct mail agent
38 letters in the October renewal campaign are still processing. The other 212 are in transit.
Sources: 1 campaign, 250 letters
lob
250 letters
18:29
Message Claude...

Tools your direct mail agent reaches for on Lob, scoped per user.

CALL ANY TOOL
63 tools for direct mail in Lob: create and cancel mailpieces, send campaigns, verify addresses, and manage templates, bank accounts, and short links.
lob_autocomplete_us_address
Autocomplete us address
Suggest US street addresses that match a typed prefix, optionally filtered by city, state or ZIP. Returns an object with `suggestions`, each holding a `primary_line`, `city`, `state` and `zip_code`. Use autocomplete_us_address for type-ahead address entry. Use verify_us_address to confirm a full address.
Parameters
Name
Type
Required
Description
address_prefix
string
Required
Street number and street name typed so far, alphanumeric only. Example: `210 King`.
case
string
Optional
Casing of suggestions: `upper` (default) or `proper`. One of: `upper`, `proper`.
city
string
Optional
City to filter suggestions by. Case insensitive; partial names do not match.
state
string
Optional
State to filter suggestions by. Case insensitive.
valid_addresses_only
boolean
Optional
If true, every suggestion is a valid deliverable address. If false (default), suggestions may need verification.
zip_code
string
Optional
ZIP code to filter suggestions by. Partial entries match.
lob_cancel_check
Check cancel
lob_cancel_postcard
Cancel postcard
lob_create_address
Create address
lob_create_billing_group
Create billing group
lob_create_check
Check create
lob_create_domain
Create domain
lob_create_link
Create link
lob_create_self_mailer
Create self mailer
lob_delete_address
Delete address
lob_delete_campaign
Delete campaign
lob_delete_link
Delete link
lob_get_address
Get address
lob_get_billing_group
Get billing group
lob_get_check
Check get
lob_get_domain
Get domain
lob_get_link
Get link
lob_get_self_mailer
Get self mailer
lob_list_addresses
List addresses
lob_list_billing_groups
List billing groups
lob_list_checks
List checks
lob_list_letters
List letters
lob_list_postcards
List postcards
lob_list_template_versions
List template versions
lob_reverse_geocode
Reverse geocode
lob_send_campaign
Send campaign
lob_update_billing_group
Update billing group
lob_update_creative
Update creative
lob_update_template
Update template
lob_verify_intl_address
Verify intl address

For more tools, view docs.

Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// Lob tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["lob"], toolNames: [
    "lob_verify_us_address",
    "lob_create_postcard",
    "lob_list_postcards"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Verify this address and mail it the welcome postcard" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["lob"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Verify this address and mail it the welcome postcard" }],
  tools,
});

// Execute the tool call with the user's vaulted Lob API key
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["lob"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Verify this address and mail it the welcome postcard" }],
  tools,
});

// Tool call runs with the user's vaulted Lob API key
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["lob"] }, pageSize: 100,
});

const agent = new Agent({
  name: "direct_mail_agent",
  model: "gemini-2.5-pro",
  instruction: "Lob tools scoped to this user",
  tools,
});

await agent.run("Verify this address and mail it the welcome postcard");
Try these prompts
Copy any prompt into your agent. Each maps directly to a Lob tool. Click to copy, paste into your agent, done.
Mailpieces
Copy the prompt
Copied
Send a postcard to 120 Market St, San Francisco using the welcome template.
Copy the prompt
Copied
Cancel the letter to Jordan Lee before it goes to production.
Copy the prompt
Copied
List the self mailers we sent this week.
Addresses
Copy the prompt
Copied
Verify 500 Main Street, Springfield, IL 62701.
Copy the prompt
Copied
Which cities belong to ZIP code 94107?
Copy the prompt
Copied
Save Acme Corp's headquarters address to the address book.
Campaigns and templates
Copy the prompt
Copied
Create a draft campaign for the spring catalog mailing.
Copy the prompt
Copied
Publish version 3 of the renewal letter template.
Copy the prompt
Copied
Create a short link to acme.com/offer for the postcard QR code.
SEE HOW AUTH WORKS
Each user connects their own Lob API key once, and Scalekit sends it with every call. Keys stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
Lob
once. We tie it to their identity and the meetings they approved — no shared bot account, no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
Lob
token lives in a vault scoped to them. User A's meetings are never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tokens:
auto-refreshed
3
Resolve
When your agent calls a
Lob
tool, we fetch the right token server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
Lob
tool call is logged — who triggered it, which meeting was fetched, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other marketing and messaging connectors.
GTM and RevOps Teams
Outbound prospecting agent
Searches Apollo for prospects matching your ICP, scores and ranks them, drafts personalized outreach in Gmail, and logs every send to Google Sheets. Mail goes out as the rep, not from a shared inbox.
Test other agents
See the same per-user auth pattern across other marketing and messaging connectors.
SALES
Outbound prospecting agent
Search Apollo for ICP matches, rank them, draft personalised Gmail outreach, and log every send to Google Sheets.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared Lob API key looks fine in a demo. In production every mailpiece and check looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared key
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
Lob today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access Lob as the user or through a shared key?
As the user. Each user connects their own Lob API key once, and Scalekit sends it with every call. Audit logs attribute every mailpiece, check, and campaign to that user, not a shared service account.
Where is the Lob API key stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new API key. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in Lob?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the address verification and list tools without lob_create_check or lob_send_campaign, which mail real, billed pieces in live mode. Scalekit also enforces scope checks before every API call.
What happens when a user revokes Lob access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Does the agent mail real pieces through Lob?
In live mode, yes. lob_create_postcard, lob_create_letter, lob_create_self_mailer, and lob_create_check print and mail real pieces and are billed, and lob_send_campaign mails a campaign to its audience. Cancel tools such as lob_cancel_letter only work before the piece goes to production.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""lob"": {
""url"": ""https://mcp.scalekit.com/lob"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.lob]
url = ""https://mcp.scalekit.com/lob""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""lob"": {
""url"": ""https://mcp.scalekit.com/lob"",
""type"": ""http""
}
}
}