2,500+ MCP servers ready to use
Vinkius

Lob MCP Server for Mastra AI 21 tools — connect in under 2 minutes

Built by Vinkius GDPR 21 Tools SDK

Mastra AI is a TypeScript-native agent framework built for modern web stacks. Connect Lob through the Vinkius and Mastra agents discover all tools automatically — type-safe, streaming-ready, and deployable anywhere Node.js runs.

Vinkius supports streamable HTTP and SSE.

typescript
import { Agent } from "@mastra/core/agent";
import { createMCPClient } from "@mastra/mcp";
import { openai } from "@ai-sdk/openai";

async function main() {
  // Your Vinkius token — get it at cloud.vinkius.com
  const mcpClient = await createMCPClient({
    servers: {
      "lob": {
        url: "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
      },
    },
  });

  const tools = await mcpClient.getTools();
  const agent = new Agent({
    name: "Lob Agent",
    instructions:
      "You help users interact with Lob " +
      "using 21 tools.",
    model: openai("gpt-4o"),
    tools,
  });

  const result = await agent.generate(
    "What can I do with Lob?"
  );
  console.log(result.text);
}

main();
Lob
Fully ManagedVinkius Servers
60%Token savings
High SecurityEnterprise-grade
IAMAccess control
EU AI ActCompliant
DLPData protection
V8 IsolateSandboxed
Ed25519Audit chain
<40msKill switch
Stream every event to Splunk, Datadog, or your own webhook in real-time

* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure

About Lob MCP Server

Lob MCP Server enables AI agents to send physical mail directly from your applications. Create and mail letters, postcards, and checks programmatically through Lob's print and mail API. Verify US and international addresses, autocomplete partial addresses, and manage your address book. Build reusable HTML templates for personalized mailings. Perfect for automating vendor payments, customer communications, marketing campaigns, payroll checks, and direct mail operations. All mail is printed, processed, and delivered within 24 hours via USPS integration.

Mastra's agent abstraction provides a clean separation between LLM logic and Lob tool infrastructure. Connect 21 tools through the Vinkius and use Mastra's built-in workflow engine to chain tool calls with conditional logic, retries, and parallel execution — deployable to any Node.js host in one command.

The Lob MCP Server exposes 21 tools through the Vinkius. Connect it to Mastra AI in under two minutes — no API keys to rotate, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.

How to Connect Lob to Mastra AI via MCP

Follow these steps to integrate the Lob MCP Server with Mastra AI.

01

Install dependencies

Run npm install @mastra/core @mastra/mcp @ai-sdk/openai

02

Replace the token

Replace [YOUR_TOKEN_HERE] with your Vinkius token

03

Run the agent

Save to agent.ts and run with npx tsx agent.ts

04

Explore tools

Mastra discovers 21 tools from Lob via MCP

Why Use Mastra AI with the Lob MCP Server

Mastra AI provides unique advantages when paired with Lob through the Model Context Protocol.

01

Mastra's agent abstraction provides a clean separation between LLM logic and tool infrastructure — add Lob without touching business code

02

Built-in workflow engine chains MCP tool calls with conditional logic, retries, and parallel execution for complex automation

03

TypeScript-native: full type inference for every Lob tool response with IDE autocomplete and compile-time checks

04

One-command deployment to any Node.js host — Vercel, Railway, Fly.io, or your own infrastructure

Lob + Mastra AI Use Cases

Practical scenarios where Mastra AI combined with the Lob MCP Server delivers measurable value.

01

Automated workflows: build multi-step agents that query Lob, process results, and trigger downstream actions in a typed pipeline

02

SaaS integrations: embed Lob as a first-class tool in your product's AI features with Mastra's clean agent API

03

Background jobs: schedule Mastra agents to query Lob on a cron and store results in your database automatically

04

Multi-agent systems: create specialist agents that collaborate using Lob tools alongside other MCP servers

Lob MCP Tools for Mastra AI (21)

These 21 tools become available when you connect Lob to Mastra AI via MCP:

01

autocomplete_us_address

Autocomplete a partial US address

02

cancel_letter

Only works if status is still "processing". Cancel a letter before it enters production

03

create_address

Requires name and address_line1. Create a new address in your Lob address book

04

create_bank_account

Requires description, routing_number, account_number, account_type (company/individual), and signatory. Add a bank account for sending checks

05

create_check

Requires recipient (to), bank account ID, and amount. Optional: memo, logo, description. Create and mail a physical check through Lob

06

create_letter

Requires recipient (to), sender (from), and file content. Supports HTML templates with merge variables, color options, and mail type selection. Create and mail a physical letter through Lob

07

create_postcard

Requires recipient (to) and front design. Optional: back design, message, merge variables. Create and mail a physical postcard through Lob

08

create_template

Create a reusable HTML template for mailings

09

delete_address

Delete an address from your Lob address book

10

get_address

Get details of a specific address

11

get_check

Get details of a specific check by ID

12

get_letter

Get details of a specific letter by ID

13

get_postcard

Get details of a specific postcard by ID

14

get_template

Get details of a specific template

15

list_addresses

Use optional limit to control result count. List addresses in your Lob address book

16

list_bank_accounts

Use optional limit to control result count. List bank accounts in your Lob account

17

list_checks

Track payments, audit disbursements. List physical checks sent through Lob

18

list_letters

Each letter includes status, tracking number, and expected delivery date. Use optional limit to control result count. List physical letters sent through Lob. Track mailings, check delivery status, and review letter history

19

list_postcards

Use optional limit to control result count. List physical postcards sent through Lob

20

list_templates

List HTML templates for mailings

21

verify_us_address

Verify and standardize a US address

Example Prompts for Lob in Mastra AI

Ready-to-use prompts you can give your Mastra AI agent to start working with Lob immediately.

01

"Send a letter to John Doe at 123 Main St, New York, NY 10001 with our welcome package HTML template"

02

"Verify if this address is deliverable: 185 Berry St, San Francisco, CA 94107"

03

"Send a $500 check to ABC Consulting for consulting services rendered in March"

Troubleshooting Lob MCP Server with Mastra AI

Common issues when connecting Lob to Mastra AI through the Vinkius, and how to resolve them.

01

createMCPClient not exported

Install: npm install @mastra/mcp

Lob + Mastra AI FAQ

Common questions about integrating Lob MCP Server with Mastra AI.

01

How does Mastra AI connect to MCP servers?

Create an MCPClient with the server URL and pass it to your agent. Mastra discovers all tools and makes them available with full TypeScript types.
02

Can Mastra agents use tools from multiple servers?

Yes. Pass multiple MCP clients to the agent constructor. Mastra merges all tool schemas and the agent can call any tool from any server.
03

Does Mastra support workflow orchestration?

Yes. Mastra has a built-in workflow engine that lets you chain MCP tool calls with branching logic, error handling, and parallel execution.

Connect Lob to Mastra AI

Get your token, paste the configuration, and start using 21 tools in under 2 minutes. No API key management needed.