
Updated November 2026. Facts verified against vendor and carrier documentation; see references at the end.
There are 2 ways to connect a shipping API to an AI agent. Connect the Ship.com MCP server at https://app.ship.com/mcp when the agent lives in a client like Claude Code, Cursor or VS Code. Call the REST API under https://app.ship.com/public/ when your own server code runs the show. Both use the same Bearer token, both buy USPS and UPS labels from your Ship.com balance, and label purchases in your code should go through the MCP buy_label tool with a preview and a price cap.
Each section below covers one decision, and most link to a post with the full details.
Use MCP when a model decides what to call. Use REST when your code decides. Most real builds use both: MCP for the agent, REST for the boring, predictable steps like creating an order from a checkout.
| MCP server | REST API | |
|---|---|---|
| Endpoint | https://app.ship.com/mcp | Paths under https://app.ship.com/public/ |
| Transport | Streamable HTTP, JSON-RPC 2.0 over POST, stateless (no session IDs) | JSON over HTTPS |
| Auth | Connection key as Authorization: Bearer, or OAuth sign-in (40 tools on both) | Authorization: Bearer <token>, the same token as the MCP connection key |
| Buy labels | buy_label and trigger_batch_purchase, on either connection | In our code examples, buying goes through the MCP tools (see below) |
| Tracking, voids, address checks | track_order, cancel_shipping_label, validate_address | Not in REST |
| Errors | HTTP status codes plus tool errors with isError: true | Always HTTP 200; check the success field |
| Rate limit | 60 requests per minute per token; 429 with Retry-After: 60 | Not documented |
| Support | help@ship.com | api-support@ship.com |
One rule covers both: keep the key on the server. Our MCP endpoint refuses browser requests from other websites (403 forbidden_origin), and anyone can copy a key out of front-end code.
The API is self-serve. Sign up at ship.com/sign-up, then in app.ship.com go to Settings > API Integration. The token starts with OAUTH2.. Despite the prefix, it is a plain bearer token, and it lasts 180 days.
The same token works for MCP and REST, so replacing it affects both. Clicking Generate API Key or calling the REST token refresh (POST /public/refresh) issues a new token and retires the old one for every MCP client and every REST integration at once. "Show my connection key" returns the same token while it is still valid, so it won't break anything.
You don't need your own USPS account or eVS. Ship.com buys the postage from your Ship.com balance, so you skip the USPS OAuth and payment-account setup we covered in our USPS Web Tools migration post.
In Claude Code it is one command:
claude mcp add --transport http shipcom https://app.ship.com/mcp --header "Authorization: Bearer YOUR_TOKEN"
Keep the --header part to use your connection key. Without it, Claude Code signs in through OAuth, which also gets all 40 tools. Cursor, VS Code and Windsurf take a short JSON file with the same URL and header. All 4 configs are in our MCP setup guide for Claude Code, Cursor and VS Code.
Claude's web, desktop and mobile apps connect with OAuth sign-in. Both connection types get all 40 tools, so they can quote, buy, track and manage orders. Exactly which Claude surface can do what is in Use Ship.com in Claude.
From your own code, connect with your framework's MCP client and pass the key as a header. The OpenAI Agents SDK uses MCPServerStreamableHttp with a headers param, and the Vercel AI SDK uses createMCPClient from @ai-sdk/mcp with an HTTP transport. Walkthroughs: shipping tools for the OpenAI Agents SDK and Stripe Checkout to shipping label in Next.js.
You rate the order, preview the purchase, then confirm it with a cap. Here is the whole flow as raw MCP calls from a server shell, with the key in an environment variable. The order ID and ZIP are the examples from our docs.
export SHIPCOM_TOKEN="YOUR_TOKEN" # server-side only, never in browser code
# 1. Rate an existing order (weights in ounces)
curl -s https://app.ship.com/mcp \
-H "Authorization: Bearer $SHIPCOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_rates","arguments":{"order_id":48210551,"weight_oz":12}}}'
# 2. Preview the purchase: confirm is false, nothing is bought
curl -s https://app.ship.com/mcp \
-H "Authorization: Bearer $SHIPCOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"buy_label","arguments":{"order_id":48210551,"rate_id":"RATE_ID_FROM_STEP_1","package_id":"PACKAGE_ID_FROM_STEP_1","method":"METHOD_FROM_STEP_1","service_level":"SERVICE_LEVEL_FROM_STEP_1","max_cost":8.00,"confirm":false}}}'
# 3. After a person approves the previewed price, buy with the same cap
curl -s https://app.ship.com/mcp \
-H "Authorization: Bearer $SHIPCOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"buy_label","arguments":{"order_id":48210551,"rate_id":"RATE_ID_FROM_STEP_1","package_id":"PACKAGE_ID_FROM_STEP_1","method":"METHOD_FROM_STEP_1","service_level":"SERVICE_LEVEL_FROM_STEP_1","max_cost":8.00,"confirm":true}}}'
Step 1 returns a package_id and a list of rates, each with its own rate_id, method and service_level. Rate tokens are long, so copy them exactly. Step 2 returns the price, pay_as_you_go_fee, total_charge and balance_after. Show those to a person. Step 3 buys, and the reply carries label_url, tracking_number and tracking_url.
If the rate is over the cap, the server refuses: "Refusing to buy: rate is $<price> which exceeds max_cost $<max>. Nothing was purchased." The cap covers postage only, not fees or insurance. The server doesn't require a preview before a confirm, so make your agent show the previewed total and wait for approval. And a clean preview can still fail on confirm, because the preview doesn't check billing, plan limits or the address.
Why MCP for buying, even from code? It has the confirm preview and the max_cost cap built in, and the same tools give you tracking and voids. We use this pattern in every code post. The full checklist, with logging and approvals, is in how to let an AI agent buy shipping labels safely.
REST is for the fixed steps your code runs the same way every time: create orders, rate them, manage customers and register a tracking webhook. The main endpoints:
POST /public/order creates one order. POST /public/order/batch takes an array, but it isn't transactional: if one order fails, the earlier ones are already created.POST /public/quote rates a ZIP-to-ZIP shipment with no order. POST /public/shipping-info rates an existing order by orderID.GET /public/order/{id} returns the order with a shipment object holding trackingNumber, trackingURL and shippingLabelURL.GET, POST and PUT on customers, and POST /public/webhook for tracking notifications.A minimal quote looks like this:
curl -s -X POST https://app.ship.com/public/quote \
-H "Authorization: Bearer $SHIPCOM_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fromZip": "90210", "toZip": "10001", "weight": 12}'
Every REST response is HTTP 200, success or not. Read the success boolean, then error (and message when present). A failed auth looks like {"success": false, "error": "Invalid or Expired Credentials"}. ZIP fields take 5 digits. The REST pages don't state units for weight and dimensions; the MCP docs use ounces and inches, so check a quote before you trust a number. Full field lists are in the REST reference.
trigger_batch_purchase buys labels for many Ready to ship orders at once. Without confirm it rates every order and returns per-order prices and a postage total. With confirm: true it queues the batch, and labels are usually bought within about a minute. You follow it with get_batch_status.
Know the limits before you build on it. Batches buy USPS Ground Advantage only, there is no service choice, and one batch runs at a time per account. max_total has no default, so always set it. Orders that already have a label aren't bought twice, and voided or canceled orders drop out. Batch shipping needs a Growth or Executive plan. The 200-order walkthrough is in batch label purchase with an AI agent.
Retry-After: 60. Every authenticated request counts, including initialize and tools/list.missing_bearer_token, invalid_token or expired_token. Pasting the whole "Authorization: Bearer ..." string into a header field gives you invalid_token.external_order_id to create_order or bulk_create_orders. A retry then returns the existing order instead of a duplicate. Don't fire parallel creates with the same ID.cancel_shipping_label voids within 29 days of the ship date. The refund goes to your postage balance, typically about 14 days after the carrier accepts the void, and not at all if the package was already scanned.The full error table, with what your agent should do for each one, is in error handling for shipping agents.
Use a webhook for label notifications and polling for shipment status. Register one webhook URL per account with POST /public/webhook. Deliveries carry X-Ship-Signature, an HMAC-SHA256 over the timestamp, a period and the raw body, and retries resend the same EventId, so dedupe on it. For shipment status, poll GET /public/order/{id} or call the MCP track_order tool.
Postage is up to 89% off USPS and up to 87% off UPS. On top of plan pricing, buy_label adds a $0.30 pay-as-you-go fee per label when your auto-recharge amount is $0.01 or less, and quote rates already include any per-label charge your plan adds. Optional insurance on US orders is $0.99 for each $100, or part of $100, of insured value. Plan details are on our pricing page.
If you are building a vendor shortlist, read the best MCP servers for shipping in 2026 and the best EasyPost alternatives.
Yes. On Ship.com an agent buys through the MCP tools buy_label and trigger_batch_purchase, using a connection key sent as a Bearer header or OAuth sign-in. Both tools preview by default and only buy with confirm: true. Pass max_cost or max_total so the server refuses anything over your cap, and have a person approve the previewed price first.
Use MCP when a model chooses the calls, in a client like Claude Code or through your framework's MCP client. Use REST for fixed steps in your own server code, like creating an order after checkout. Ship.com uses one Bearer token for both. Tracking, voids and address checks are MCP tools only, so most agent builds end up using both.
No. You don't need your own USPS account or eVS. Ship.com buys the postage from your Ship.com balance, and auto-recharge can top it up from your card on file. That means no USPS OAuth credentials, no Enterprise Payment Account and no label approval process on your side. You sign up, copy your key from Settings and start rating.
That is how the REST API reports results: every response is HTTP 200 and JSON, whether the call worked or not. Your code has to read the success boolean in the body. When it is false, the error field, and sometimes a message field, explains why. The MCP endpoint is different: it uses HTTP codes like 401 and 429 and marks failed tool calls with isError.
One URL and one key gets your agent rating, buying, batching and tracking USPS and UPS labels at up to 89% off USPS and up to 87% off UPS.
Create orders, rate them and get tracking webhooks from your own server, with postage at up to 89% off USPS and up to 87% off UPS. Questions go to api-support@ship.com.