TL;DR: Claude’s Model Context Protocol (MCP) lets you build AI agents that connect directly to your business tools — ERP, email, databases, file systems — through a standardized interface. Combined with Resend’s MCP server for email and a multi-agent architecture, you can automate the entire document-to-action pipeline in manufacturing: receive a PO by email, extract the data, create the order in your ERP, check inventory, generate a supplier PO, and send confirmations — all orchestrated by Claude agents. This guide covers the architecture, working code, and deployment patterns.
What Is MCP and Why Does It Matter for Manufacturing?
Model Context Protocol (MCP) is an open standard created by Anthropic that gives AI models like Claude a standardized way to connect to external tools and data sources. Think of it as a universal adapter — instead of building custom integrations for every system, you configure MCP servers that expose your tools, and Claude interacts with them using a common protocol.
For manufacturing, this solves a critical problem: your operations run on a patchwork of systems that don’t talk to each other. Your ERP doesn’t integrate with your supplier’s email. Your quality system doesn’t connect to your shipping software. Your engineering changes live in PDFs that someone manually reconciles with the BOM in your ERP. MCP lets Claude bridge these gaps by connecting to each system through its own MCP server and orchestrating actions across all of them.
MCP Architecture: Three Interfaces
Every MCP server exposes up to three types of interfaces:
- Resources — Read-only data the agent can query. Examples: current inventory levels, supplier price lists, customer order history, BOM structures.
- Tools — Actions the agent can execute. Examples: create a purchase order, send an email, update a record, generate a report.
- Prompts — Pre-defined templates for common interactions. Examples: “Process this PO,” “Generate a supplier evaluation,” “Draft an order acknowledgment.”
Architecture: Multi-Agent Manufacturing Automation
The most effective pattern for manufacturing automation is a multi-agent architecture where specialized agents handle different domains, coordinated by an orchestrator. Here’s the reference architecture:
┌─────────────────────────────────────────────────────────────────────────┐ │ CLAUDE MCP MULTI-AGENT ARCHITECTURE │ │ (Manufacturing Back-Office Automation) │ ├─────────────────────────────────────────────────────────────────────────┤ │ │ │ ┌──────────────────────┐ │ │ │ ORCHESTRATOR │ │ │ │ (Claude Agent) │ │ │ │ │ │ │ │ Routes tasks to │ │ │ │ specialist agents │ │ │ │ Aggregates results │ │ │ │ Handles exceptions │ │ │ └──────┬───────────────┘ │ │ │ │ │ ┌──────────────┼──────────────┬──────────────┐ │ │ ▼ ▼ ▼ ▼ │ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │ │ EMAIL │ │ PROCUREMENT│ │ DOCUMENT │ │ ERP │ │ │ │ AGENT │ │ AGENT │ │ AGENT │ │ AGENT │ │ │ │ │ │ │ │ │ │ │ │ │ │ Read inbox │ │ Check │ │ Read PDFs │ │ Create SO │ │ │ │ Send PO │ │ inventory │ │ Extract │ │ Create PO │ │ │ │ Send ack │ │ Select │ │ data │ │ Update inv │ │ │ │ Notify │ │ supplier │ │ Validate │ │ Query data │ │ │ │ exceptions │ │ Place order│ │ Classify │ │ Run reports│ │ │ └──────┬─────┘ └──────┬─────┘ └──────┬─────┘ └──────┬─────┘ │ │ │ │ │ │ │ │ ▼ ▼ ▼ ▼ │ │ ┌─────────────────────────────────────────────────────────────┐ │ │ │ MCP SERVER LAYER │ │ │ │ │ │ │ │ ┌─────────┐ ┌──────────┐ ┌──────────┐ ┌───────────────┐ │ │ │ │ │ Resend │ │ Database │ │ File │ │ Custom ERP │ │ │ │ │ │ MCP │ │ MCP │ │ System │ │ MCP Server │ │ │ │ │ │ Server │ │ Server │ │ MCP │ │ │ │ │ │ │ │ │ │ │ │ Server │ │ • REST API │ │ │ │ │ │ • send │ │ • query │ │ │ │ • DB queries │ │ │ │ │ │ • read │ │ • insert │ │ • read │ │ • Browser │ │ │ │ │ │ • batch │ │ • update │ │ • write │ │ automation │ │ │ │ │ │ • inbox │ │ • schema │ │ • search │ │ │ │ │ │ │ └─────────┘ └──────────┘ └──────────┘ └───────────────┘ │ │ │ └─────────────────────────────────────────────────────────────┘ │ │ │ │ │ │ │ │ ▼ ▼ ▼ ▼ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────────┐ │ │ │ Email │ │ Postgres │ │ Local │ │ SAP / Dynamics│ │ │ │ (Resend) │ │ / SQLite │ │ Files │ │ / Epicor ERP │ │ │ └──────────┘ └──────────┘ └──────────┘ └──────────────┘ │ │ │ └──────────────────────────────────────────────────────────────────────┘
Setting Up the Resend MCP Server for Email Automation
Resend’s official MCP server gives Claude agents full email capabilities — sending, receiving, managing contacts, and handling attachments. For manufacturing, this enables automated order acknowledgments, supplier PO transmittals, exception notifications, and daily operations summaries.
Installation
The Resend MCP server is available on NPM and configures in one command:
# For Claude Code
claude mcp add --env RESEND_API_KEY=re_your_key_here resend -- npx -y resend-mcp
# For Claude Desktop (add to claude_desktop_config.json)
{
"mcpServers": {
"resend": {
"command": "npx",
"args": ["-y", "resend-mcp"],
"env": {
"RESEND_API_KEY": "re_your_key_here"
}
}
}
}
# For Cursor IDE
{
"mcpServers": {
"resend": {
"command": "npx",
"args": ["-y", "resend-mcp"],
"env": {
"RESEND_API_KEY": "re_your_key_here"
}
}
}
}
Resend MCP Capabilities
Once configured, Claude can perform these email operations through natural language:
| Category | Operations | Manufacturing Use Case |
|---|---|---|
| Emails | Send, batch send, schedule, cancel, list | Order confirmations, PO transmittals, shipping notices |
| Received Emails | List inbox, read emails, download attachments | Incoming POs, supplier invoices, delivery notifications |
| Contacts | Create, update, segment, manage subscriptions | Supplier database, customer contacts, approval routing |
| Broadcasts | Create campaigns, schedule, personalize | Price change notifications, capacity alerts, newsletter |
| Domains | Add, verify, configure tracking | Branded sender domains for professional communications |
| Webhooks | Create, manage event notifications | Delivery confirmations, bounce handling, open tracking |
Building the Email-to-Order Pipeline
Here’s a complete example of a Claude MCP agent pipeline that processes incoming customer POs received by email, creates orders in the ERP, and handles supplier communication.
Step 1: Define the Agent Configuration
# CLAUDE.md - Project configuration for manufacturing agent
## Manufacturing PO Processing Agent
### Tech Stack
- Runtime: Node.js 20+
- MCP Servers: resend-mcp, postgres-mcp, filesystem-mcp
- LLM: Claude Sonnet via Anthropic API
- Database: PostgreSQL 16 for order tracking
- Email: Resend for all outbound/inbound email
### Agent Architecture
- Orchestrator: Routes incoming emails to appropriate sub-agents
- Document Agent: Extracts structured data from PO attachments
- ERP Agent: Creates and manages orders in the ERP system
- Email Agent: Sends confirmations, notifications, and POs to suppliers
### Business Rules
- Auto-approve orders under $5,000 from existing customers
- Route new customer orders to sales team
- Route orders above $5,000 to procurement lead
- Match prices against active price list (2% tolerance)
- Generate supplier POs for items below reorder point
### Forbidden Patterns
- Never delete orders or financial records
- Never modify pricing without human approval
- Never send emails to customers without order validation completing first
- Never commit credentials to code
Step 2: Build the Email Processing Agent
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic();
async function processIncomingPO(emailData) {
const response = await client.messages.create({
model: "claude-sonnet-4-20250514",
max_tokens: 4096,
system: `You are a manufacturing procurement agent. When you receive
a purchase order email, extract all structured data from the
attachment or email body. Return a JSON object with: customer_name,
po_number, line_items (array of {part_number, description, quantity,
unit_price, delivery_date}), total_value, shipping_address, and
payment_terms. Flag any fields you're uncertain about.`,
tools: [
{
type: "mcp",
server: "resend",
// Resend MCP tools are auto-discovered
},
{
type: "mcp",
server: "postgres",
}
],
messages: [
{
role: "user",
content: `Process this incoming email and extract the PO data:
From: ${emailData.from}
Subject: ${emailData.subject}
Body: ${emailData.body}
Attachments: ${emailData.attachments.map(a => a.filename).join(', ')}
After extraction:
1. Validate part numbers against the parts table in postgres
2. Check pricing against the active_price_list table
3. If valid, insert into the orders table
4. Send an order acknowledgment email to the customer
5. If any items are below reorder point, draft a supplier PO`
}
]
});
return response;
}
Step 3: Configure the Notification Pipeline
The email agent handles all outbound communication through Resend’s MCP server. Here’s how it’s configured for different manufacturing scenarios:
// Order Acknowledgment - sent to customer after PO is validated
const orderAckConfig = {
tool: "send_email",
params: {
from: "orders@yourmanufacturer.com",
to: customerEmail,
subject: `Order Acknowledgment - ${poNumber}`,
html: generateOrderAckHTML(orderData),
reply_to: "orders@yourmanufacturer.com",
tags: [
{ name: "type", value: "order_acknowledgment" },
{ name: "po_number", value: poNumber }
]
}
};
// Supplier PO - sent when materials need to be ordered
const supplierPOConfig = {
tool: "send_email",
params: {
from: "procurement@yourmanufacturer.com",
to: supplierEmail,
subject: `Purchase Order ${internalPONumber} - ${yourCompanyName}`,
html: generateSupplierPOHTML(poData),
attachments: [
{
filename: `PO-${internalPONumber}.pdf`,
path: generatedPDFPath
}
],
tags: [
{ name: "type", value: "supplier_po" },
{ name: "supplier", value: supplierName }
]
}
};
// Exception Notification - sent when human review is needed
const exceptionConfig = {
tool: "send_email",
params: {
from: "system@yourmanufacturer.com",
to: "procurement-lead@yourmanufacturer.com",
subject: `[ACTION REQUIRED] PO Exception - ${poNumber}`,
html: generateExceptionHTML(exceptionData),
tags: [
{ name: "type", value: "exception" },
{ name: "priority", value: "high" }
]
}
};
Multi-Agent Orchestration Pattern
For complex manufacturing workflows that span multiple systems, the orchestrator pattern coordinates specialist agents. Each agent has access to specific MCP servers and handles one domain:
// Orchestrator Agent Configuration
const orchestrator = {
model: "claude-sonnet-4-20250514",
system_prompt: `You are the manufacturing operations orchestrator.
You coordinate specialist agents to process orders end-to-end.
Available agents:
- document_agent: Reads and extracts data from PDFs, emails, images
- erp_agent: Creates/updates orders, checks inventory, manages BOMs
- email_agent: Sends emails via Resend, reads inbox, manages contacts
- quality_agent: Generates compliance docs, CofCs, inspection reports
Workflow for incoming PO:
1. document_agent extracts PO data
2. erp_agent validates and creates order
3. erp_agent checks material availability
4. If materials needed: erp_agent creates supplier PO
5. email_agent sends order acknowledgment to customer
6. email_agent sends PO to supplier (if applicable)
7. Log all actions for audit trail
On exception: email_agent notifies the responsible person.
Never proceed past validation if confidence < 0.90.`,
sub_agents: {
document_agent: {
mcp_servers: ["filesystem"],
capabilities: ["pdf_extraction", "ocr", "data_validation"]
},
erp_agent: {
mcp_servers: ["postgres", "erp-api"],
capabilities: ["order_management", "inventory", "bom_management"]
},
email_agent: {
mcp_servers: ["resend"],
capabilities: ["send_email", "read_inbox", "manage_contacts"]
},
quality_agent: {
mcp_servers: ["filesystem", "postgres"],
capabilities: ["document_generation", "compliance_check"]
}
}
};
Building a Custom ERP MCP Server
For ERPs without existing MCP servers (most manufacturing ERPs), you build a lightweight custom MCP server that wraps your ERP's API or database:
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
const server = new McpServer({
name: "manufacturing-erp",
version: "1.0.0"
});
// Resource: Get current inventory levels
server.resource(
"inventory",
"erp://inventory/current",
async (uri) => {
const inventory = await erpDb.query(
`SELECT item_number, description, qty_on_hand,
reorder_point, preferred_supplier
FROM inventory
WHERE qty_on_hand <= reorder_point * 1.2`
);
return {
contents: [{
uri,
mimeType: "application/json",
text: JSON.stringify(inventory.rows)
}]
};
}
);
// Tool: Create a purchase order
server.tool(
"create_purchase_order",
{
supplier_id: z.string(),
line_items: z.array(z.object({
item_number: z.string(),
quantity: z.number(),
unit_price: z.number()
})),
delivery_date: z.string(),
notes: z.string().optional()
},
async (params) => {
const po = await erpDb.transaction(async (tx) => {
const header = await tx.query(
`INSERT INTO purchase_orders (supplier_id, delivery_date, status, notes)
VALUES ($1, $2, 'draft', $3)
RETURNING po_number`,
[params.supplier_id, params.delivery_date, params.notes]
);
for (const item of params.line_items) {
await tx.query(
`INSERT INTO po_line_items (po_number, item_number, quantity, unit_price)
VALUES ($1, $2, $3, $4)`,
[header.rows[0].po_number, item.item_number,
item.quantity, item.unit_price]
);
}
return header.rows[0];
});
return {
content: [{
type: "text",
text: `Created PO ${po.po_number} with ${params.line_items.length} line items`
}]
};
}
);
// Tool: Create a sales order from customer PO
server.tool(
"create_sales_order",
{
customer_id: z.string(),
customer_po_number: z.string(),
line_items: z.array(z.object({
item_number: z.string(),
quantity: z.number(),
unit_price: z.number(),
delivery_date: z.string()
})),
shipping_address: z.string()
},
async (params) => {
const so = await erpDb.transaction(async (tx) => {
const header = await tx.query(
`INSERT INTO sales_orders
(customer_id, customer_po, shipping_address, status)
VALUES ($1, $2, $3, 'confirmed')
RETURNING so_number`,
[params.customer_id, params.customer_po_number,
params.shipping_address]
);
for (const item of params.line_items) {
await tx.query(
`INSERT INTO so_line_items
(so_number, item_number, quantity, unit_price, delivery_date)
VALUES ($1, $2, $3, $4, $5)`,
[header.rows[0].so_number, item.item_number,
item.quantity, item.unit_price, item.delivery_date]
);
}
return header.rows[0];
});
return {
content: [{
type: "text",
text: `Created SO ${so.so_number} for customer PO ${params.customer_po_number}`
}]
};
}
);
Deployment Architecture
version: '3.8'
services:
orchestrator:
build: ./agents/orchestrator
environment:
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
depends_on:
- resend-mcp
- erp-mcp
- postgres
restart: unless-stopped
resend-mcp:
image: node:20-slim
command: npx -y resend-mcp --http --port 3001
environment:
- RESEND_API_KEY=${RESEND_API_KEY}
- SENDER_EMAIL_ADDRESS=operations@yourcompany.com
ports:
- "3001:3001"
erp-mcp:
build: ./mcp-servers/erp
environment:
- ERP_DB_URL=${ERP_DB_URL}
ports:
- "3002:3002"
postgres:
image: postgres:16
environment:
- POSTGRES_DB=manufacturing_ops
- POSTGRES_PASSWORD=${DB_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
volumes:
pgdata:
Cost Analysis
| Component | Monthly Cost | Notes |
|---|---|---|
| Claude API (Sonnet) | $100–$500 | $3/M input + $15/M output tokens; ~200-500 POs/month |
| Resend | $0–$20 | Free tier: 3,000 emails/month; Pro: $20/50K emails |
| Cloud hosting | $50–$200 | Docker on AWS/Azure/GCP or on-premise |
| PostgreSQL | $0–$50 | Self-hosted or managed (RDS/Cloud SQL) |
| Total | $150–$770/month | For a mid-size manufacturer processing 200-500 POs/month |
This is 90–95% cheaper than commercial procurement automation platforms ($5,000–$15,000/month) and replaces $8,000–$15,000/month in manual processing labor.
Frequently Asked Questions
What is MCP in simple terms?
MCP (Model Context Protocol) is a standardized way for AI models like Claude to connect to external tools and data. Instead of the AI only being able to read and write text, MCP gives it the ability to send emails (via Resend), query databases, read files, and interact with your business systems — all through a consistent, secure interface. Think of MCP as giving Claude hands to operate your business tools, with you controlling exactly which tools it can access and what it's allowed to do.
Can this work with our on-premise ERP?
Yes. The custom ERP MCP server runs inside your network, connecting to your ERP's database or API. Only the Claude API calls go to the cloud — your ERP data stays on-premise. For fully air-gapped environments, you can run a local LLM (Llama 3, Mixtral via Ollama) instead of Claude's API, keeping everything on-premise at the cost of some accuracy.
How does this compare to n8n, Make, or Zapier?
Workflow automation tools like n8n and Zapier connect systems with predefined triggers and actions. They work well for structured, predictable workflows. MCP agents handle what these tools cannot: reading unstructured documents (PDFs, scanned POs, free-text emails), making contextual decisions (is this price reasonable? Is this delivery date achievable?), and adapting to variations without reprogramming. The best approach is often both: use n8n for simple A-to-B integrations and MCP agents for the complex, judgment-heavy workflows.
Is Resend reliable enough for business-critical email?
Resend delivers 99.99% uptime with email delivery infrastructure built on AWS SES. It handles sender reputation, bounce management, and deliverability optimization. For manufacturing operations where email delivery is critical (PO transmittals, order confirmations), Resend's delivery rates and tracking capabilities are production-grade. Webhooks notify your agent immediately if an email bounces or fails, enabling automatic retry or human escalation.
Getting Started
Start with one workflow: incoming customer PO emails. Configure the Resend MCP server to read your orders inbox, build a document extraction prompt, and have Claude create a structured order record. This single pipeline proves the concept and delivers immediate value — automated order acknowledgments go out in minutes instead of hours, and your order entry team gets their time back.
From there, add the ERP integration (create sales orders automatically), then the supplier PO generation (automated procurement), then the exception handling (intelligent routing of problems to the right person). Each layer builds on the previous one and the MCP architecture makes each addition a configuration change, not a rewrite.
Kamna builds these exact pipelines for manufacturing SMBs as part of our agentic AI practice. We configure Claude MCP agents for your specific ERP, suppliers, and workflows, and deploy them in production within 60–90 days. Talk to us about automating your manufacturing email and document workflows, or explore our AI consulting services to see how we work.