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 "Install 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: UPS MCP Server
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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kodeas/deftship-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server