
Updated November 2026. Facts verified against vendor and carrier documentation; see references at the end.
To let an AI agent buy shipping labels safely, split every purchase into a quote, a preview a human approves, and a capped buy. Show the exact price, service and address before anything is charged, set a hard spending limit the model cannot change, and make retries safe with an idempotency key. Then keep a void path and a log of every call. Below is the pattern, with Ship.com's real MCP parameters as the worked example.
Rating, tracking and address checks are read-only. If the agent gets one wrong, you ask again. Buying a label spends real postage, and a retry loop or a misread order can buy the same label twice or ship to the wrong address.
The OWASP MCP Security Cheat Sheet puts it directly: "Require explicit user confirmation for destructive, financial, or data-sharing operations." It also says to never auto-approve tool calls, and to enforce spending limits "in the component that makes payments, outside the model's context." A line in your prompt like "don't spend more than $20" only asks the model to behave. A cap on the server call holds no matter what the model decides.
Use a read tool. On Ship.com, quote_shipping returns rates with no order needed, and get_rates returns rates for an existing order. Validate the address first with validate_address (US only). None of these spend money.
Ship.com's money tools, buy_label and trigger_batch_purchase, take a confirm parameter that defaults to false. Called without confirm: true, they return a preview and buy nothing.
Build the preview step into your agent's instructions or app code, so your agent shows the cost first and nothing is bought until a person approves.
Show the human the fields behind expensive mistakes: price, carrier and service level, ship-to address and order. OWASP also recommends binding an approval to the specific action and arguments, so a "yes" for one label cannot be reused for another.
Put the cap on the server call, where the model can't talk its way past it. Ship.com's buy_label takes these parameters:
| Parameter | Required | What it does |
|---|---|---|
order_id, rate_id, package_id, method, service_level | Yes | Identify the order and the exact rate being bought |
confirm | No (default false) | false returns a preview; true buys |
max_cost | No | Postage ceiling in dollars; the buy is refused if the rate is higher |
ship_date, insurance, insured_value | No | Ship date and optional insurance |
A confirmed call looks like this:
{
"name": "buy_label",
"arguments": {
"order_id": "...",
"rate_id": "...",
"package_id": "...",
"method": "...",
"service_level": "...",
"max_cost": 12.50,
"confirm": true
}
}
If the rate comes back higher than the cap, the server answers "Refusing to buy: rate is $<price> which exceeds max_cost $<max>. Nothing was purchased." Note that max_cost covers postage only, not fees or insurance. The price is sealed in the rate_id from get_rates, so the client can't change it.
For batches, trigger_batch_purchase takes max_total, a spending ceiling for the batch's postage (insurance premiums not counted). There is no ceiling by default, so always set one. Omit order_ids and the batch covers every Ready to ship order, which is another reason to preview first. A batch confirm re-rates every order, so confirm with the same order_ids and a max_total near the previewed total.
create_order or bulk_create_orders, pass your own external_order_id. A retry or re-import then returns the existing order instead of creating a duplicate.buy_label returns it without charging. In a batch, "An order that already has a label isn't bought twice."There are 2 gaps. Simultaneous calls with the same external_order_id can still create duplicates, so don't fire parallel creates for one order. And the email tools have no duplicate protection: confirming twice sends two emails.
On Ship.com, cancel_shipping_label voids a label within 29 days of the ship date. The refund goes to your postage balance, not your card, once the carrier accepts the void, typically within about 14 days. If the carrier already scanned the package, there is no refund. cancel_order also voids the label if the order has not shipped. Both cancel tools use the same confirm preview.
Ship.com's MCP endpoint allows 60 requests per minute per token. Over the limit you get HTTP 429 with Retry-After: 60. Have your client wait the full 60 seconds instead of retrying in a tight loop.
OWASP also says to "Log all MCP tool invocations with full parameters, user context, and timestamps," with secrets and personal data redacted. For a shipping agent, log every quote, preview, confirm and void, with the price the human saw next to the price charged.
Ship.com has two ways to connect, and both can buy:
buy_label and trigger_batch_purchase. It lasts 180 days.Treat the connection key like a password. Anyone who has it can act on your account. Keep it in environment variables or your OS's credential store, never in a committed config file. Your kill switch is Generate API Key on the API Integration tab: it ends the old token right away, for the MCP and the REST API. The setup for each editor is in our guide to adding a shipping MCP server to Claude Code, Cursor and VS Code.
Any developer can get a key. Sign up at https://www.ship.com/sign-up, then in app.ship.com go to Settings > API Integration.
A good first run: preview the purchase, then buy one cheap label with a tight max_cost. If you don't need it, void it with cancel_shipping_label and the postage goes back to your balance.
Only if you let it. Ship.com's buy_label buys whenever it is called with confirm: true, so build the approval into your client. Make your client call it without confirm, show the price, service and address to a person, and only then confirm with a max_cost cap. OWASP recommends never auto-approving financial tool calls.
Set the limit on the server call, not in the prompt. On Ship.com, pass max_cost to buy_label or max_total to trigger_batch_purchase. If the postage is higher, the server refuses and nothing is purchased. Both caps cover postage only, not fees or insurance. Batches have no ceiling by default, so always set max_total.
On Ship.com, if the order already has a label, buy_label returns the existing label without charging again, and batches never buy a labeled order twice. Create orders with your own external_order_id so retries return the existing order. Avoid parallel calls with the same ID, since simultaneous requests can still create a duplicate order.
Yes, within limits. Ship.com's cancel_shipping_label voids a label within 29 days of its ship date. The money goes back to your postage balance, not your card, typically within about 14 days after the carrier accepts the void. If the carrier has already scanned the package, the label cannot be refunded.
Both. A connection key is an access token you send as a Bearer header, it lasts 180 days and it gets all 40 tools, including buy_label and trigger_batch_purchase. OAuth sign-in gets the same 40 tools and currently works with Claude clients only.
Comparing vendors first? Read our rundown of the best MCP servers for shipping in 2026, or see how Ship AI handles approvals with Suggest mode and daily spend caps.
Our MCP server has previews, spending caps and voids built in, on USPS and UPS labels at up to 89% off USPS and up to 87% off UPS. Check pricing for plan details.