AfterShip MCP Server for Cloudflare Workers
20 tools available in the AfterShip MCP server. Each tool can be called by AI assistants to perform specific actions.
aftership_list_all_couriersList all couriers supported by AfterShip (over 1000+).
Returns the complete list of all couriers AfterShip supports, regardless of your account activation status.
Args:
Returns: Array of all supported courier objects.
{
"type": "object",
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string",
"default": "json",
"description": "Response format"
}
}
}aftership_mark_as_completedMark a tracking as completed with a specific reason.
Args:
Returns: The updated tracking object.
{
"type": "object",
"required": [
"slug",
"tracking_number"
],
"properties": {
"slug": {
"type": "string",
"description": "Courier slug (required)"
},
"tracking_number": {
"type": "string",
"description": "Tracking number (required)"
}
}
}aftership_get_last_checkpointGet the last checkpoint for a tracking.
Returns the most recent checkpoint/status update for a tracking, which is more efficient than fetching the full tracking when you only need the current status.
Args:
Returns: Last checkpoint object with tracking info and the most recent checkpoint.
{
"type": "object",
"required": [
"slug",
"tracking_number"
],
"properties": {
"lang": {
"type": "string",
"description": "Language for checkpoint messages"
},
"slug": {
"type": "string",
"description": "Courier slug (required)"
},
"fields": {
"type": "string",
"description": "Comma-separated checkpoint fields"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string",
"default": "json",
"description": "Response format"
},
"tracking_number": {
"type": "string",
"description": "Tracking number (required)"
}
}
}aftership_get_last_checkpoint_by_idGet the last checkpoint for a tracking by AfterShip ID.
Args:
Returns: Last checkpoint object with tracking info and the most recent checkpoint.
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "AfterShip tracking ID (required)"
},
"lang": {
"type": "string",
"description": "Language for checkpoint messages"
},
"fields": {
"type": "string",
"description": "Comma-separated checkpoint fields"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string",
"default": "json",
"description": "Response format"
}
}
}aftership_list_couriersList couriers activated in your AfterShip account.
Returns a list of couriers that you have activated for your account.
Args:
Returns: Array of courier objects with slug, name, phone, web_url, and required fields.
{
"type": "object",
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string",
"default": "json",
"description": "Response format"
}
}
}aftership_detect_couriersDetect which couriers match a tracking number format.
Given a tracking number, returns a list of possible couriers that use that tracking number format.
Args:
Returns: Array of detected courier objects with slug and name.
{
"type": "object",
"required": [
"tracking_number"
],
"properties": {
"slug": {
"type": "array",
"items": {
"type": "string"
},
"description": "Limit detection to these courier slugs"
},
"tracking_number": {
"type": "string",
"description": "Tracking number to detect (required)"
},
"tracking_ship_date": {
"type": "string",
"description": "Ship date (YYYYMMDD)"
},
"tracking_postal_code": {
"type": "string",
"description": "Postal code"
},
"tracking_account_number": {
"type": "string",
"description": "Account number with courier"
},
"tracking_destination_country": {
"type": "string",
"description": "Destination country code"
}
}
}aftership_get_trackingGet a tracking by courier slug and tracking number.
Args:
Returns: The tracking object with checkpoints.
{
"type": "object",
"required": [
"slug",
"tracking_number"
],
"properties": {
"lang": {
"type": "string",
"description": "Language for checkpoint messages"
},
"slug": {
"type": "string",
"description": "Courier slug (required)"
},
"fields": {
"type": "string",
"description": "Comma-separated list of fields to return"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string",
"default": "json",
"description": "Response format"
},
"tracking_number": {
"type": "string",
"description": "Tracking number (required)"
}
}
}aftership_predict_eddPredict estimated delivery dates for shipments.
Uses AfterShip's AI-powered predictive model to estimate when packages will be delivered. Can predict for multiple shipments in a single request (max 5).
Args:
Note: Either pickup_time or estimated_pickup is required for each prediction. Either origin_address.state or origin_address.postal_code is required. Either destination_address.state or destination_address.postal_code is required.
Returns: Array of prediction results with estimated_delivery_date, estimated_delivery_date_max, and confidence_score.
{
"type": "object",
"required": [
"slug"
],
"properties": {
"slug": {
"type": "string",
"description": "Courier slug (required)"
},
"unit": {
"enum": [
"kg",
"lb"
],
"type": "string",
"description": "Weight unit"
},
"state": {
"type": "string",
"description": "Destination state/province"
},
"value": {
"type": "number",
"description": "Weight value"
},
"country": {
"type": "string",
"description": "Destination country ISO3 code"
},
"pickup_time": {
"type": "string",
"description": "Local pickup time (ISO 8601)"
},
"postal_code": {
"type": "string",
"description": "Destination postal code"
},
"estimated_pickup": {
"type": "string",
"description": "Estimated pickup date (YYYY-MM-DD)"
},
"service_type_name": {
"type": "string",
"description": "Service type name"
}
}
}aftership_get_notificationGet notification settings for a tracking.
Returns the email addresses and phone numbers that will receive notifications for this tracking.
Args:
Returns: Notification object with emails and smses arrays.
{
"type": "object",
"required": [
"slug",
"tracking_number"
],
"properties": {
"slug": {
"type": "string",
"description": "Courier slug (required)"
},
"tracking_number": {
"type": "string",
"description": "Tracking number (required)"
}
}
}aftership_get_notification_by_idGet notification settings for a tracking by AfterShip ID.
Args:
Returns: Notification object with emails and smses arrays.
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "AfterShip tracking ID (required)"
}
}
}aftership_add_notificationAdd notification receivers to a tracking.
Adds email addresses and/or phone numbers to receive tracking updates.
Args:
Returns: Updated notification object.
{
"type": "object",
"required": [
"slug",
"tracking_number"
],
"properties": {
"slug": {
"type": "string",
"description": "Courier slug (required)"
},
"smses": {
"type": "array",
"items": {
"type": "string"
},
"description": "Phone numbers to add"
},
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "Email addresses to add"
},
"tracking_number": {
"type": "string",
"description": "Tracking number (required)"
}
}
}aftership_add_notification_by_idAdd notification receivers to a tracking by AfterShip ID.
Args:
Returns: Updated notification object.
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "AfterShip tracking ID (required)"
},
"smses": {
"type": "array",
"items": {
"type": "string"
},
"description": "Phone numbers to add"
},
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "Email addresses to add"
}
}
}aftership_retrackRetrack an expired tracking. Can be called up to 3 times per tracking.
Args:
Returns: The retracked tracking object.
{
"type": "object",
"required": [
"slug",
"tracking_number"
],
"properties": {
"slug": {
"type": "string",
"description": "Courier slug (required)"
},
"tracking_number": {
"type": "string",
"description": "Tracking number (required)"
}
}
}aftership_remove_notificationRemove notification receivers from a tracking.
Removes specified email addresses and/or phone numbers from receiving tracking updates.
Args:
Returns: Updated notification object.
{
"type": "object",
"required": [
"slug",
"tracking_number"
],
"properties": {
"slug": {
"type": "string",
"description": "Courier slug (required)"
},
"smses": {
"type": "array",
"items": {
"type": "string"
},
"description": "Phone numbers to remove"
},
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "Email addresses to remove"
},
"tracking_number": {
"type": "string",
"description": "Tracking number (required)"
}
}
}aftership_remove_notification_by_idRemove notification receivers from a tracking by AfterShip ID.
Args:
Returns: Updated notification object.
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "AfterShip tracking ID (required)"
},
"smses": {
"type": "array",
"items": {
"type": "string"
},
"description": "Phone numbers to remove"
},
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "Email addresses to remove"
}
}
}aftership_create_trackingCreate a new tracking in AfterShip.
Args:
Returns: The created tracking object.
{
"type": "object",
"required": [
"tracking_number"
],
"properties": {
"slug": {
"type": "string",
"description": "Courier slug (e.g., ups, fedex, usps)"
},
"smses": {
"type": "array",
"items": {
"type": "string"
},
"description": "Phone numbers for SMS notifications"
},
"title": {
"type": "string",
"description": "Title for the tracking"
},
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "Email addresses for notifications"
},
"order_id": {
"type": "string",
"description": "Order ID"
},
"order_number": {
"type": "string",
"description": "Order number"
},
"customer_name": {
"type": "string",
"description": "Customer name"
},
"tracking_number": {
"type": "string",
"description": "Tracking number (required)"
}
}
}aftership_get_tracking_by_idGet a tracking by its AfterShip ID.
Args:
Returns: The tracking object with checkpoints.
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"description": "AfterShip tracking ID (required)"
},
"lang": {
"type": "string",
"description": "Language for checkpoint messages"
},
"fields": {
"type": "string",
"description": "Comma-separated list of fields to return"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}aftership_list_trackingsList trackings with optional filters.
Args:
Status tags: Pending, InfoReceived, InTransit, OutForDelivery, AttemptFail, Delivered, AvailableForPickup, Exception, Expired
Returns: Paginated list of trackings.
{
"type": "object",
"properties": {
"page": {
"type": "integer",
"minimum": 1,
"description": "Page number (1-indexed)"
},
"slug": {
"type": "string",
"description": "Filter by courier slug"
},
"limit": {
"type": "integer",
"maximum": 200,
"minimum": 1,
"description": "Number per page (max 200)"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"origin": {
"type": "string",
"description": "Filter by origin country"
},
"keyword": {
"type": "string",
"description": "Search keyword"
},
"destination": {
"type": "string",
"description": "Filter by destination country"
},
"created_at_max": {
"type": "string",
"description": "Created before (ISO 8601)"
},
"created_at_min": {
"type": "string",
"description": "Created after (ISO 8601)"
}
}
}aftership_update_trackingUpdate a tracking by courier slug and tracking number.
Args:
Returns: The updated tracking object.
{
"type": "object",
"required": [
"slug",
"tracking_number"
],
"properties": {
"slug": {
"type": "string",
"description": "Courier slug (required)"
},
"smses": {
"type": "array",
"items": {
"type": "string"
},
"description": "New phone numbers"
},
"title": {
"type": "string",
"description": "New title"
},
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "New email addresses"
},
"order_id": {
"type": "string",
"description": "New order ID"
},
"order_number": {
"type": "string",
"description": "New order number"
},
"custom_fields": {
"type": "object",
"description": "New custom fields"
},
"customer_name": {
"type": "string",
"description": "New customer name"
},
"tracking_number": {
"type": "string",
"description": "Tracking number (required)"
}
}
}aftership_delete_trackingDelete a tracking by courier slug and tracking number.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"slug",
"tracking_number"
],
"properties": {
"slug": {
"type": "string",
"description": "Courier slug (required)"
},
"tracking_number": {
"type": "string",
"description": "Tracking number (required)"
}
}
}