# AfterShip MCP for AI Agents MCP

> AfterShip connects your AI agent to global package tracking data. Monitor shipments from over 1,000 couriers worldwide using natural language commands. You can create new trackings, get the latest status updates, auto-detect which courier is handling a number, and even set up email or SMS alerts for delivery milestones.

## Overview
- **Category:** ecommerce
- **Price:** Free
- **Tags:** package-tracking, delivery-updates, courier-integration, shipment-monitoring, notifications

## Description

This MCP lets your agent manage complex logistics tasks without you ever leaving your chat window. Instead of visiting dozen different carrier websites to check on a package, you just ask your AI client, and it does the work. You can instantly monitor shipments from major carriers like FedEx or DHL, even if you only have a tracking number. If the shipment status is unclear, the tool automatically detects which courier is responsible for that number so you don't have to guess.

It’s built to handle the full lifecycle of an order: starting by creating a new package record with all necessary details, and finishing by marking it as delivered when the carrier hasn't updated the status yet. If you're already using Vinkius for other integrations, adding AfterShip makes your agent capable of handling end-to-end supply chain visibility, simplifying operations immediately.

## Tools

### create_tracking
Creates a new package tracking record, accepting the number and optional details like customer emails or order IDs.

### delete_tracking
Removes a specific tracking entry from your monitored list; this action cannot be undone.

### detect_courier
Uses a provided tracking number to return a ranked list of the most likely shipping companies responsible for it.

### get_tracking
Retrieves all details and checkpoints for a single, known package tracking ID.

### list_couriers
Returns a comprehensive list of all supported courier companies that can be used for monitoring packages.

### list_trackings
Retrieves a filtered list of all monitored package trackings, allowing searches by date range or status.

### mark_tracking_completed
Updates the status of an existing tracking record to 'delivered' when manual confirmation is available.

### retrack_tracking
Restarts the monitoring process for a stalled tracking entry, fetching fresh checkpoint updates from the carrier.

### update_tracking
Makes minor updates to an existing tracking record without changing the core number or courier information.

## Prompt Examples

**Prompt:** 
```
I need to know what happened with 9400111899223344556677?
```

**Response:** 
```
**📦 Tracking Summary for USPS**

* **Status:** Delivered
* **Estimated Delivery:** Jan 18, 2024
* **Latest Checkpoint:** Signed for at recipient's home on Jan 18. 

**History Log:**
* Arrived at local facility: Jan 17 (3 PM)
* Out for delivery: Jan 18 (6 AM)
```

**Prompt:** 
```
What couriers handle this number?
```

**Response:** 
```
**🔍 Courier Detection Results**

Based on the format, we're highly confident it's a USPS package. 

* **Primary Match:** USPS (98% confidence)
* **Secondary Options:** DHL eCommerce (1.5%), UPS Ground (0.5%)
```

**Prompt:** 
```
Show me all shipments pending delivery this week.
```

**Response:** 
```
**📋 Active Shipment List**

You have 3 packages flagged for action:

* **Order #A12:** FedEx | Status: Out for Delivery. Expected today.
* **Order #B45:** DHL | Status: Pending Pickup. Needs attention.
* **Order #C90:** UPS | Status: In Transit (Chicago Facility). ETA tomorrow.
```

## Capabilities

### Create a new package tracking entry
Initiate monitoring for a shipment by providing the core tracking number and optional details like order IDs or customer emails.

### Find out which carrier handles a number
Auto-detect the likely shipping company when you only know the tracking number, returning a ranked list of possibilities.

### Retrieve specific shipment details
Pull the current and full history for any active or past package tracking entry.

### List all monitored shipments
View a filtered list of every package you've tracked, narrowing down results by date range or delivery status.

### Mark a shipment as delivered
Update the record when physical evidence shows the package has arrived, even if the carrier hasn't posted the final status online.

### Restart monitoring for expired tracks
Refresh an old or stalled tracking entry to pull the most current checkpoints and updates from the carrier.

## Use Cases

### A customer asks about an unknown package
The user pastes a 12-digit tracking number. The agent calls `detect_courier`, identifies it as USPS, and then uses `get_tracking` to provide the current status: 'Out for Delivery today.' The customer is immediately satisfied.

### Batch updating old orders
The Ops Manager needs to update 50 packages that were physically delivered last week but haven't updated their internal tracking records. They use `list_trackings` to find the batch, and then call `mark_tracking_completed` for all of them in one go.

### Auditing supply chain data
A developer needs a list of every shipment that is currently 'Pending' across multiple couriers. They use the filtering capabilities of `list_trackings` to pull a clean, actionable dataset for reporting.

### Resuming an interrupted workflow
The agent was tasked with tracking a shipment but lost connection before completion. The user can now simply tell it to 'recheck that package status,' triggering `retrack_tracking` and getting the absolute latest checkpoints.

## Benefits

- Instantly determine the courier: When you only have a tracking number, use `detect_courier` to find out which of the 1000+ carriers handles it. No guessing required.
- Full visibility into history: Instead of seeing just 'In Transit,' the tool provides detailed checkpoints and timestamps, giving you complete delivery history with `get_tracking`.
- Keep your records clean: Use `list_trackings` to pull all active shipments across multiple couriers, letting you manage status by date range or specific tag.
- Automate finalization: When a package arrives but the carrier fails to update its system, use `mark_tracking_completed` to accurately close out your internal records.
- Handle stalled deliveries: If a tracking number seems stuck in limbo, trigger `retrack_tracking` to force a fresh pull of status updates and checkpoint data.

## How It Works

The bottom line is that your AI client acts as a single interface, consolidating information from thousands of carrier systems into one chat response.

1. First, connect your preferred AI client to this MCP on Vinkius and enter your AfterShip API Key.
2. Next, prompt your agent with a specific request, like 'Track order 12345' or 'List all pending shipments.'
3. The agent uses the appropriate tool (like `get_tracking` or `list_trackings`) to gather real-time data and presents the status directly in plain language.

## Frequently Asked Questions

**How does the AfterShip MCP help me track packages from multiple carriers?**
The AfterShip MCP consolidates tracking data from over 1,000 couriers into a single chat interface. You don't need to visit separate carrier websites; your agent pulls all status updates for you.

**Can I use the AfterShip MCP if I only have a partial or unknown tracking number?**
Yes. If you just provide the number, the tool can automatically detect which courier handles it by analyzing the number's format. It returns a list of likely carriers and their confidence scores.

**Is there an easy way to update my records when packages are delivered?**
The AfterShip MCP lets you mark shipments as delivered using `mark_tracking_completed`. This keeps your internal inventory records accurate, even if the carrier hasn't updated its site yet.

**Does AfterShip help me see my shipment history?**
Yes. You can use the MCP to retrieve complete delivery histories, including specific checkpoint timestamps and locations throughout the entire journey of the package.

**What if a tracking status seems stuck or expired?**
You don't have to wait for it to update. The AfterShip MCP has functions that restart monitoring on stalled entries, forcing a fresh pull of checkpoint data from the courier.