Initialize the EasyPost API client with your API key; all requests go to https://api.easypost.com/v2 using HTTP Basic Auth with the API key as the username
Create a shipment via POST /shipments with to_address and from_address objects (each containing name, street1, city, state, zip, country) and parcel (length, width, height, weight in inches/oz)
Review the rates array returned in the shipment response, which contains rates from all enabled carriers; select a rate by its id based on service level or price
Purchase the shipment by POSTing to /shipments/{shipment_id}/buy with the selected rate id; the response includes the purchased rate, tracking_code, and postage_label with a label_url
Download the label PDF or PNG from label_url and store the tracking_code alongside the order record
Track updates by polling GET /trackers/{tracker_id} or register a webhook on the tracker.updated event to receive real-time status pushes
Known gotchas
Test API keys and production API keys are distinct; test mode purchases do not generate real labels, so labels created with test keys cannot be tendered to carriers
Dimensional weight pricing is applied automatically by EasyPost based on parcel dimensions; always provide accurate dimensions, not just weight, to get accurate rates
Address verification is available as a separate step but is not automatically applied during shipment creation; call the address verify endpoint before creating shipments to prevent delivery failures
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp