# J&T Express Malaysia MCP

> J&T Express Malaysia MCP orchestrates Malaysian logistics right from your agent. You can track shipments by bill code, calculate real-time shipping rates, manage full order lifecycles (creation, cancellation), and validate precise delivery addresses across all states.

## Overview
- **Category:** transportation
- **Price:** Free
- **Tags:** jtexpress, malaysia-logistics, parcel-tracking, shipping-api, waybill-generation, e-commerce-delivery

## Description

This MCP connects your AI agents directly to J&T Express Malaysia's systems. Instead of logging into multiple portals or dealing with messy spreadsheets, you talk to your agent, and it handles the logistics API calls for you. Need to know where a package is? Your agent tracks it instantly. Want to create a new shipment order? It generates the record using official protocols. You can even validate if an address works before you start shipping. When you connect this MCP via Vinkius, your AI client gets all these functions in one place. This means e-commerce developers and ops teams stop switching tools and just focus on getting their shipments out the door.

## Tools

### cancel_order
Cancels an existing delivery order that was previously created with J&T Express.

### create_order
Programmatically generates and submits a brand new J&T Express delivery order.

### get_order_details
Retrieves comprehensive status information for a specific, existing shipment order.

### get_shipping_rates
Calculates the estimated cost of shipping by taking origin and destination parameters.

### get_waybill_image
Pulls the digital image file needed for a shipment's official waybill label.

### list_area_codes
Retrieves a list of internal area codes used by J&T Express within Malaysia.

### list_cities
Lists all known cities that fall under a specified state or province.

### list_districts
Provides a list of specific districts within a chosen city for validation purposes.

### list_provinces
Lists all official Malaysian states or provinces that can be used as origins or destinations.

### track_order
Tracks the movement of one or multiple shipments using their associated bill codes.

## Prompt Examples

**Prompt:** 
```
Track J&T parcel 'JT999888777' and show its current location.
```

**Response:** 
```
Connecting to J&T tracking service... Parcel 'JT999888777' is currently 'In Transit' and was last scanned at the Subang Jaya Distribution Center today at 10:15 AM. Would you like to see the full event history?
```

**Prompt:** 
```
List all active shipment orders in my J&T VIP account.
```

**Response:** 
```
Retrieving orders from J&T VIP... I've found 5 active shipment orders. 3 are 'Pending Pickup' and 2 are 'Awaiting Payment'. Which one would you like to inspect?
```

**Prompt:** 
```
Check if J&T express provides delivery service to postal code '50450'.
```

**Response:** 
```
Searching J&T network coverage... Yes! Postal code 50450 (Kuala Lumpur) is fully covered by J&T Express Malaysia. Both standard and express delivery services are available for this area.
```

## Capabilities

### Track Shipments
Find the real-time status, location history, or last scanned event for one or more parcels using a bill code.

### Manage Orders
Create new delivery orders or cancel existing ones programmatically through the official VIP system.

### Calculate Shipping Rates
Determine the cost of sending a package by providing specific origin and destination details.

### Validate Addresses
Confirm if a desired city, district, or postal code exists within the Malaysian logistics network.

### Generate Waybills
Retrieve the official waybill label image and metadata required for authorized shipments.

## Use Cases

### A customer needs to know if we ship to their rural area.
The agent first calls `list_provinces` and then `list_area_codes` with the user's location data. It confirms coverage, telling the user they are good to go before attempting a rate calculation.

### An ops team needs to bulk-check the status of 50 recent pickups.
Instead of entering 50 tracking numbers manually, the agent accepts a list and calls `track_order` for all of them. It compiles one clean report showing which items are 'In Transit' versus those that are delayed.

### A developer needs to integrate checkout flow with J&T.
The agent handles the entire sequence: it calls `list_cities` for validation, then uses `get_shipping_rates` to get costs, and finally executes `create_order` when the user clicks 'Pay'.

### We need to cancel a shipment due to inventory shortage.
The agent retrieves the order status using `get_order_details`, verifies it hasn't left the facility, and then calls `cancel_order` immediately. This keeps records clean.

## Benefits

- Stop guessing costs. You can use `get_shipping_rates` to calculate live delivery prices before committing, preventing unexpected billing issues.
- No more status page refreshing. Your agent uses `track_order` to pull the most current location and event history for any bill code instantly.
- Streamline order fulfillment by letting your agent call `create_order` or `cancel_order`, handling the API payload without you touching a form.
- Validate addresses upfront using tools like `list_provinces` and `list_districts`. This stops failed shipments due to bad data before they even leave the warehouse.
- Keep records clean. Generating and retrieving waybill labels via `get_waybill_image` ensures you always have an auditable record of every shipment.

## How It Works

The bottom line is, your AI client manages the sequence of lookups and actions so you don't have to think about the API calls.

1. First, your agent uses lookup tools like `list_provinces` or `list_cities` to validate that the address provided by the user is legitimate within the Malaysian network.
2. Next, you tell your agent exactly what you need—for example, 'create a new order' or 'calculate rates.' The agent then calls the appropriate function and handles any necessary input parameters.
3. Finally, the tool returns structured data: either the live tracking status, the cost estimate, or the newly created order confirmation.

## Frequently Asked Questions

**How do I check if an address is deliverable using list_provinces and list_cities?**
You start by calling `list_provinces` to get all states. Then, you pass that data into `list_cities` to filter down the options for the user's location. This confirms both existence and hierarchy.

**Can I cancel an order using cancel_order if it has already been picked up?**
No. You must first call `get_order_details` to verify the shipment status. If the details show 'Picked Up,' then `cancel_order` will fail because the physical process has begun.

**What is the difference between get_shipping_rates and track_order?**
`get_shipping_rates` calculates cost based on origin/destination. `track_order` uses a bill code to report real-time location status; they serve completely different functions.

**Do I need to use get_waybill_image for every single shipment?**
If the shipment is authorized and requires an official label, yes. `get_waybill_image` pulls the specific image file needed for customs or local delivery documentation.

**Before I run `create_order`, what credentials do I need to make sure the transaction goes through?**
You must supply your J&T Customer Code and API URL for successful authentication. The MCP uses these primary credentials to authorize and submit the new delivery order against the official VIP system.

**If I need a full history of a shipment, how do I retrieve all past events using `get_order_details`?**
The tool fetches a complete historical record for a given order number. This includes status changes, initial creation data, and associated metadata across the entire lifecycle of that specific parcel.

**How do I validate if an area code is currently supported by J&T using `list_area_codes`?**
Running `list_area_codes` provides the current, active dataset of internal codes. You compare your required input against this returned list to confirm validity before submitting any transaction or order.

**If I need to track dozens of parcels at once, is `track_order` the right tool for me?**
Yes, that's the correct way. This MCP accepts a batch of multiple bill codes simultaneously. It runs the tracking query against all provided numbers in one go, returning grouped status updates.

**Can I automatically track a J&T parcel just by providing the tracking number?**
Yes! Use the `track_parcel` tool with the tracking number (e.g., 'JT123456789'). Your agent will retrieve the current status, location, and the full history of logistics events from the J&T system.

**How do I calculate shipping prices between two Malaysian cities?**
Use the `calculate_shipping` tool with the origin and destination city names or postal codes. The agent will return the estimated price based on J&T's standard rates.

**Can I retrieve the waybill image for an existing order?**
Yes! Use the `get_waybill` tool with the Order ID. Your agent will retrieve the metadata and the URL to download or print the official waybill label.