Deftship MCP Server
The Deftship MCP Server enables AI agents to manage the full shipping lifecycle via natural language, including quoting, shipping, tracking, voiding, and managing parcels, freight, pickups, insurance, batches, and account operations.
Parcel Shipping
Get rates, create draft orders, purchase labels, void shipments, get/track parcels, merge labels into a single PDF, mark orders as shipped outside Deftship, and list e-commerce draft parcels.
Freight Shipping
Get LTL/FTL rates, create draft orders, book BOLs, void shipments, and get/track freight (BOL, label, POD, pickup window).
Pickup Management
Get pickup rates, create pickup orders, arrange (book) pickups, void pickups, and fetch pickup order details.
Insurance
Get insurance rates, purchase (book) insurance, and void insurance policies.
Batch Shipping (Beta)
Create batches (up to 1,000 shipments), add/remove items, get batch status and validation results, and ship all valid items in a batch.
Account & Utilities
Check account balance, fetch saved addresses, validate addresses, list available carrier services and codes, check carrier operational status, and create support tickets.
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., "@Deftship MCP Serverget parcel rates from Chicago to Seattle for a 10lb box"
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.
Deftship MCP Server
A Model Context Protocol server for the Deftship multi-carrier shipping API. It lets any MCP-capable AI client (Claude Desktop, Claude Code, Cursor, Codex CLI, and others) quote, ship, track, void and manage shipments in natural language using your Deftship API token.
What it can do
The full shipping lifecycle is exposed as tools:
Domain | Tools |
Parcel | get rates, create draft, ship, void, get/track, merge labels, mark as shipped, list e-commerce orders |
Freight | get rates, create draft, ship, void, get/track |
Pickup | get rates, create, arrange, void, get |
Insurance | get rate, book, void |
Batch (beta) | create, add items, remove items, get, ship |
Account | check balance, address book, validate address, service names, carrier status, create ticket |
A typical flow: deftship_get_parcel_rates → choose a rate_id → deftship_ship_parcel
→ deftship_get_parcel to fetch the label and track it.
Related MCP server: Easyship MCP
Safety guardrails
Because an AI agent can drive this end to end, spending is deliberately hard to do by accident:
Sandbox by default. With
DEFTSHIP_ENV=sandbox(the default) every operation runs against the isolated sandbox with a $10,000 dummy balance and never touches production. Going live is a deliberate one-line change.Explicit confirmation. Every tool that spends your balance or is irreversible (
ship,void,book_insurance,arrange_pickup,ship_batch) refuses to run unless called with"confirm": true, forcing the agent to surface the action to you first.Honest tool hints. Read-only tools are marked
readOnlyHint; spending tools are markeddestructiveHint, so clients can prompt for approval.
Setup
1. Get an API token
Generate a sandbox token from your Deftship organisation's API page. Use sandbox while you test; switch to a production token only when you are ready to spend real money.
2. Configure your MCP client
Claude Desktop / Claude Code (claude_desktop_config.json or .mcp.json):
{
"mcpServers": {
"deftship": {
"command": "npx",
"args": ["-y", "@deftship/mcp"],
"env": {
"DEFTSHIP_API_TOKEN": "bearer-your-token-here",
"DEFTSHIP_ENV": "sandbox"
}
}
}
}Codex CLI (~/.codex/config.toml):
[mcp_servers.deftship]
command = "npx"
args = ["-y", "@deftship/mcp"]
env = { DEFTSHIP_API_TOKEN = "bearer-your-token-here", DEFTSHIP_ENV = "sandbox" }Cursor (.cursor/mcp.json): same shape as the Claude example above.
Environment variables
Variable | Required | Default | Description |
| yes | — | Your Deftship API token. |
| no |
|
|
Local development
npm install
npm run build # compile TypeScript to dist/
npm run dev # watch mode
DEFTSHIP_API_TOKEN=bearer-... npm startThe server speaks MCP over stdio. Do not write anything to stdout in tool code — stdout carries the JSON-RPC stream; diagnostics go to stderr.
Project structure
src/
config.ts env parsing, sandbox/production base URL resolution
http.ts fetch wrapper: auth, error + rate-limit normalization
schemas.ts shared Zod schemas (address, package, item, ...)
server.ts assembles the server and registers all tool modules
index.ts stdio entry point
tools/
helpers.ts registration wrapper, confirm gate, result formatting
parcel.ts freight.ts pickup.ts insurance.ts batch.ts account.tsTool schemas mirror the field tables in the official Deftship developer docs.
License
MIT
Available Tools
32 toolsdeftship_add_batch_itemsAdd items to a batchA
Add more shipments to an existing batch. The batch must not be validating, processing or completed. Batch returns to 'validating' while new items are checked.
Inputs: batch_id (required), batch_shipments (required).
deftship_arrange_pickupArrange (book) a pickupADestructive
Book a previously created pickup order with the carrier. Returns the pickup confirmation number (prn). May charge your balance depending on carrier. Requires confirm=true.
Inputs: pickup_order_id (required), confirm.
deftship_book_insuranceBook insuranceADestructive
Purchase a previously quoted insurance by insurance_id. THIS CHARGES YOUR BALANCE. Requires confirm=true.
Inputs: insurance_id (required), confirm.
deftship_check_balanceCheck account balanceARead-only
Return your organisation's current Deftship balance and currency. Useful before shipping to confirm there are enough funds.
Inputs: no named parameters.
deftship_create_batchCreate shipment batchA
Create a shipment batch (beta; own-USPS-account only) with up to 1,000 shipments that share a shipper and service. Items are validated asynchronously; poll deftship_get_batch until status is 'ready', then deftship_ship_batch. Does not spend money yet.
Inputs: service (required), shipper_id (required), batch_shipments (required).
deftship_create_freight_orderCreate draft freight orderA
Create a draft freight order visible on the Open Orders page. Does not purchase. Returns the shipment_order_id. Pass shipment_order_id to update an existing draft.
Inputs: items (required), to_address (required), pickup_date (required), from_address (required), +7 more.
deftship_create_parcel_orderCreate draft parcel orderA
Create a draft parcel order that appears on the Open Orders page in the dashboard. Does not purchase a label. Returns the shipment_order_id. Pass shipment_order_id to update an existing draft.
Inputs: to_address (required), package_list (required), length_unit, weight_unit, +6 more.
deftship_create_pickup_orderCreate pickup orderA
Create a pickup order visible on the Pickup Orders page. Returns the full pickup order object including its id. Use deftship_arrange_pickup to actually book it with the carrier.
Inputs: pieces (required), carrier (required), id, close_time, +4 more.
deftship_create_ticketCreate a support ticketA
Open a support ticket against existing shipments (e.g. a claim or issue) by tracking number. Some ticket types carry a fee. Provide ticket_type_id, a reference, a message and the related tracking numbers.
Inputs: message (required), reference (required), ticket_type_id (required), tracking_numbers (required), +1 more.
deftship_get_address_bookGet saved addressesARead-only
Fetch your saved addresses. Use destination 'from' for sender addresses or 'to' for recipient addresses. Returns address records with their ids for use as from_address_id / to_address_id.
Inputs: destination (required).
deftship_get_batchGet batch statusARead-only
Fetch a batch's status, validation results, per-item details and (when completed) merged label PDF URLs. Optionally filter items by status: valid, invalid, completed, failed.
Inputs: batch_id (required), status.
deftship_get_carrier_statusGet carrier statusARead-only
Check the current operational status of a carrier (e.g. known outages or degraded service).
Inputs: carrier (required).
deftship_get_freightGet / track freightARead-only
Fetch a freight order's BOL number, label, POD and confirmed pickup window, either by shipment_order_id or by bol_number. Provide exactly one identifier.
Inputs: bol_number, shipment_order_id.
deftship_get_freight_ratesGet freight ratesARead-only
Quote LTL/FTL freight rates from all allowed carriers. Returns rates each with an id (rate_id) to ship, carrier, service, final_price, load_type (ltl/ftl), is_guaranteed, and has_enough_credits. Does not spend money.
Inputs: items (required), to_address (required), pickup_date (required), from_address (required), +6 more.
deftship_get_insurance_ratesGet insurance rateARead-only
Quote insurance for a shipment. Creates an insurance record and returns its id (insurance_id) and price. Use deftship_book_insurance with the id to purchase. Does not spend money.
Inputs: carrier (required), to_address (required), package_list (required), service_code (required), +5 more.
deftship_get_parcelGet / track a parcelARead-only
Fetch a parcel order's status, tracking numbers and label URL, either by shipment_order_id or by tracking_number. Use this to poll for a label after shipping and to track a shipment. Provide exactly one of the two identifiers.
Inputs: tracking_number, shipment_order_id.
deftship_get_parcel_ratesGet parcel ratesARead-only
Quote parcel shipping rates from all allowed carriers for a given from/to address and package list. Returns a list of rates, each with an id (rate_id) used to ship, carrier, service, final_price, eta, and has_enough_credits. Does not spend money. Optionally pass carrier to restrict to one carrier and speed up the response.
Inputs: to_address (required), package_list (required), carrier, length_unit, +6 more.
deftship_get_pickupGet a pickup orderARead-only
Fetch a previously created pickup order by id, including pieces and status.
Inputs: pickup_order_id (required).
deftship_get_pickup_ratesGet pickup ratesARead-only
Quote a carrier pickup. Returns the pickup order id plus base_price, fuel_price and final_price. Does not spend money.
Inputs: pieces (required), carrier (required), id, close_time, +4 more.
deftship_get_service_namesList carrier servicesARead-only
List available carrier services and their service codes. Use type 'shipment' for parcel/freight services or 'pickup' for pickup services.
Inputs: type.
deftship_list_ecommerce_parcelsList e-commerce draft parcelsARead-only
List draft parcel orders imported from connected e-commerce platforms (50 per page). Supports optional date range, platform and order_number filters. Rate limited to 20/min.
Inputs: end_date, platform, start_date, order_number.
deftship_mark_as_shippedMark orders as shippedA
Mark draft orders as shipped outside of Deftship (e.g. shipped with another provider). Optionally push fulfillment back to the connected e-commerce platform. Each order is identified by id or ecommerce_id (not both).
Inputs: orders (required), send_fulfillment.
deftship_merge_parcel_labelsMerge parcel labelsA
Merge multiple already-generated parcel labels into a single PDF. Returns the merged label URL. Only works for labels that already exist.
Inputs: ids (required).
deftship_remove_batch_itemsRemove items from a batchA
Remove specific items from a batch by their item hash ids (max 10,000). Also deletes the associated shipment orders. The batch must not be validating, processing or completed.
Inputs: batch_id (required), batch_shipment_ids (required).
deftship_ship_batchShip a batchADestructive
Ship all valid items in a batch. The batch must be in 'ready' status. THIS CHARGES YOUR BALANCE for every item in the batch. Processing is asynchronous; poll deftship_get_batch for labels. Requires confirm=true.
Inputs: batch_id (required), confirm.
deftship_ship_freightShip freight (book BOL)ADestructive
Book a freight shipment using a rate_id from deftship_get_freight_rates. THIS CHARGES YOUR BALANCE. The BOL and label are delivered asynchronously to your token's webhook, or retrieved later with deftship_get_freight. Requires confirm=true.
Inputs: rate_id (required), confirm.
deftship_ship_parcelShip a parcel (buy label)ADestructive
Purchase a parcel label using a rate_id from deftship_get_parcel_rates. THIS CHARGES YOUR BALANCE. The label and tracking numbers are delivered asynchronously to your token's webhook, or retrieved later with deftship_get_parcel. Requires confirm=true.
Inputs: rate_id (required), confirm.
deftship_validate_addressValidate an addressARead-only
Validate an address before shipping to avoid correction surcharges. Returns suggested/corrected address candidates and whether the address is residential.
Inputs: zip (required), country (required), street_1 (required), city, +6 more.
deftship_void_freightVoid a freight shipmentADestructive
Void a previously created freight order by shipment_order_id. May incur a void_fee. Requires confirm=true.
Inputs: shipment_order_id (required), confirm.
deftship_void_insuranceVoid insuranceADestructive
Void a previously booked insurance by insurance_id. Requires confirm=true.
Inputs: insurance_id (required), confirm.
deftship_void_parcelVoid a parcel shipmentADestructive
Void a previously created parcel order by shipment_order_id. May incur a void fee (returned as void_fee). Requires confirm=true.
Inputs: shipment_order_id (required), confirm.
deftship_void_pickupVoid a pickupADestructive
Void a previously created pickup order by id. Requires confirm=true.
Inputs: pickup_order_id (required), confirm.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
TDQS
Scored across 32 tools
Each tool has a distinct action-noun pattern with clear prefixes, and descriptions clarify boundaries (e.g., create vs. ship vs. void). Even similar operations like parcel vs. freight are clearly separated by domain.
All tools follow a consistent 'deftship_verb_noun' naming convention with clear, descriptive verbs and nouns. No mixing of styles or vague terms.
32 tools is significantly above the typical 3-15 range, covering a complex domain. While each tool serves a purpose, the count feels heavy for a single server, potentially overwhelming agents.
The tool surface covers the full lifecycle: rate quoting, order creation, shipping, voiding, insurance, pickup, batch operations, address validation, and support tickets. No obvious gaps for a shipping API.
Maintenance
Related MCP Connectors
Multi-carrier shipping for AI agents: compare rates, buy labels, track packages, validate addresses
Manage Shipday orders, drivers, driver earnings, reports from your AI assistants.
Furgonetka MCP Server is an extension for LLMs (such as Claude) that integrates AI assistants with Poland's most popular courier brokerage platform. The server enables models to interact directly with services from various couriers (including InPost, DPD, DHL, UPS, and Poczta Polska) through a single, unified interface. With this integration, your AI stops just "writing about logistics" and starts actually managing it.
Multi-carrier shipping functionality with built-in, discounted carrier accounts. Compare rates, generate PDF shipping labels, schedule pickups and track packages in automated way or in your chatbox, no coding required. This is a demo server that is functional with no account needed and no auth. For production use please find our production version.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to create shipments, track packages, get rates, validate addresses, schedule pickups, and find UPS locations via the UPS API.95 npm2MIT

Easyship MCPofficial
AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage global shipping operations, including rate comparison, shipment creation, label purchasing, tracking, pickup scheduling, address validation, billing, and analytics, via natural language.32 npmMIT- AlicenseBqualityBmaintenanceIntegrates the Machship freight management platform with MCP-compatible LLMs, enabling shipment creation, quotes, labels, and carrier management via natural language.125373 npm1ISC
- FlicenseAqualityCmaintenanceEnables AI agents to query orders, manage routes, track drivers, and analyze delivery performance on the FleetSync last-mile delivery platform through natural language.18-