Logistics Tracking
Track international packages by tracking number only. Supports 3100+ carriers worldwide.
When to Use
- - User asks "where is my package" or provides a tracking number
- User needs to check shipment status or delivery estimate
- User asks about customs clearance or logistics exceptions
- User needs to track multiple packages at once
How It Works
| Mode | API Key Required? | Description |
|---|
| With TRACK17APIKEY | Yes (1 key) | Uses the official api.17track.net — most reliable, 3100+ carriers. |
| Without key |
No | Uses Playwright (headless Chromium) to query t.17track.net. Requires
playwright npm package. |
Recommendation: Set TRACK17_API_KEY for the best reliability. Get a free key at https://api.17track.net
Option A: Deploy as HTTP Service (users need no key)
You deploy the MCP HTTP server with TRACK17_API_KEY on your server. End users connect via URL — they don't need any API key.
1. Start the server (your side)
CODEBLOCK0
2. User/client MCP config (Streamable HTTP)
CODEBLOCK1
Users only need a tracking number — no API key required on their end.
Option B: Local stdio (zero-config or with key)
Zero-config (no key, uses Playwright fallback — requires playwright installed):
CODEBLOCK2
Recommended — with API key for broader carrier coverage and better reliability:
CODEBLOCK3
Get a free 17track API key: https://api.17track.net
Using with OpenClaw
Add this skill to OpenClaw:
CODEBLOCK4
Then in OpenClaw's MCP configuration, add either the HTTP or stdio config shown above.
Example prompts:
- - "Track package YT2412345678901234"
- "Where is my package LX123456789CN?"
- "Check status of 1ZABCDEF1234567890"
Available Tools
track_package
Query tracking info for a single package.
- - Input:
trackingNumber (required), carrier (optional, auto-detected) - Returns: status, current location, timeline of events
detect_carrier
Identify the carrier from a tracking number's format.
- - Input: INLINECODE6
- Returns: carrier name, confidence level
batch_track
Track up to 40 packages at once.
- - Input:
trackingNumbers array - Returns: array of tracking results
explain_status
Get a human-readable explanation of a tracking status code.
- - Input:
statusCode (e.g. InTransit, CustomsClearance, Delivered) - Returns: description and advice in English
Tracking Number Format Guide
| Pattern | Carrier | Example |
|---|
| INLINECODE9 | China Post | LX123456789CN |
| INLINECODE10 |
China EMS | EA123456789CN |
|
YT + 16 digits | Yanwen | YT1234567890123456 |
|
LP + 14+ digits | Cainiao | LP12345678901234 |
|
SF + 12+ digits | SF Express | SF1234567890123 |
|
1Z + 16 chars | UPS | 1ZABCDEF1234567890 |
|
94/93/92 + 20 digits | USPS | 9400111899223100012345 |
|
10-11 digits | DHL | 1234567890 |
|
12-15 digits | FedEx | 123456789012 |
Typical Delivery Times (International)
| Route | Standard | Express |
|---|
| China to US | 15-30 days | 5-10 days |
| China to EU |
15-30 days | 5-10 days |
| China to SE Asia | 7-15 days | 3-7 days |
| China to Japan/Korea | 5-10 days | 3-5 days |
Status Codes Explained
- - InfoReceived: Carrier has the info but hasn't picked up the package (1-3 day wait)
- InTransit: Package is moving through the logistics network
- CustomsClearance: Going through customs (3-7 business days typical)
- OutForDelivery: Final delivery attempt today
- Delivered: Successfully delivered
- Exception: Problem occurred (customs hold, wrong address, failed delivery)
- Returned: Being sent back to origin
Tips
- 1. No key needed: Without TRACK17APIKEY, the tool uses Playwright to query 17track directly. Install Playwright with
npm install playwright for this to work. - 3100+ carriers: With a 17track API key, auto-detects carrier from the tracking number.
- Wait 24-48 hours after shipment before tracking — data may not be available on day one.
- Allow at least 2 hours between queries for the same tracking number to avoid rate limiting.
- Use
batch_track for multiple packages — more efficient than individual queries.
物流追踪
仅通过追踪号码追踪国际包裹。支持全球3100多家承运商。
使用场景
- - 用户询问我的包裹在哪里或提供追踪号码
- 用户需要查询运输状态或预计送达时间
- 用户询问清关或物流异常情况
- 用户需要同时追踪多个包裹
工作原理
| 模式 | 需要API密钥? | 描述 |
|---|
| 使用TRACK17APIKEY | 是(1个密钥) | 使用官方api.17track.net — 最可靠,支持3100+承运商 |
| 无密钥 |
否 | 使用Playwright(无头Chromium)查询t.17track.net。需要安装playwright npm包 |
推荐: 设置TRACK17APIKEY以获得最佳可靠性。在https://api.17track.net获取免费密钥
方案A:部署为HTTP服务(用户无需密钥)
您在服务器上使用TRACK17APIKEY部署MCP HTTP服务器。终端用户通过URL连接——他们不需要任何API密钥。
1. 启动服务器(您的操作)
bash
export TRACK17APIKEY=your-17track-api-key
npx -y @shopmeagent/logistics-tracking-mcp serve
默认:http://0.0.0.0:3000/mcp
可通过PORT和HOST环境变量覆盖
2. 用户/客户端MCP配置(Streamable HTTP)
json
{
mcpServers: {
logistics-tracking: {
type: streamable-http,
url: https://your-domain.com/mcp
}
}
}
用户只需要一个追踪号码——他们端不需要API密钥。
方案B:本地stdio(零配置或带密钥)
零配置(无密钥,使用Playwright回退——需要安装playwright):
json
{
mcpServers: {
logistics-tracking: {
command: npx,
args: [-y, @shopmeagent/logistics-tracking-mcp]
}
}
}
推荐——使用API密钥以获得更广泛的承运商覆盖和更好的可靠性:
json
{
mcpServers: {
logistics-tracking: {
command: npx,
args: [-y, @shopmeagent/logistics-tracking-mcp],
env: {
TRACK17APIKEY: your-17track-api-key
}
}
}
}
获取免费的17track API密钥:https://api.17track.net
与OpenClaw配合使用
将此技能添加到OpenClaw:
bash
npx skills add shopmeskills/mcp
然后在OpenClaw的MCP配置中,添加上面显示的HTTP或stdio配置。
示例提示:
- - 追踪包裹YT2412345678901234
- 我的包裹LX123456789CN在哪里?
- 查询1ZABCDEF1234567890的状态
可用工具
track_package
查询单个包裹的追踪信息。
- - 输入:trackingNumber(必填),carrier(可选,自动检测)
- 返回:状态、当前位置、事件时间线
detect_carrier
根据追踪号码格式识别承运商。
- - 输入:trackingNumber
- 返回:承运商名称、置信度
batch_track
一次追踪最多40个包裹。
- - 输入:trackingNumbers数组
- 返回:追踪结果数组
explain_status
获取追踪状态代码的人类可读解释。
- - 输入:statusCode(例如InTransit、CustomsClearance、Delivered)
- 返回:英文描述和建议
追踪号码格式指南
| 模式 | 承运商 | 示例 |
|---|
| XX123456789CN | 中国邮政 | LX123456789CN |
| EX123456789CN |
中国EMS | EA123456789CN |
| YT + 16位数字 | 燕文 | YT1234567890123456 |
| LP + 14位以上数字 | 菜鸟 | LP12345678901234 |
| SF + 12位以上数字 | 顺丰速运 | SF1234567890123 |
| 1Z + 16个字符 | UPS | 1ZABCDEF1234567890 |
| 94/93/92 + 20位数字 | USPS | 9400111899223100012345 |
| 10-11位数字 | DHL | 1234567890 |
| 12-15位数字 | FedEx | 123456789012 |
典型送达时间(国际)
| 路线 | 标准 | 快递 |
|---|
| 中国到美国 | 15-30天 | 5-10天 |
| 中国到欧盟 |
15-30天 | 5-10天 |
| 中国到东南亚 | 7-15天 | 3-7天 |
| 中国到日本/韩国 | 5-10天 | 3-5天 |
状态代码说明
- - InfoReceived:承运商已收到信息但尚未取件(等待1-3天)
- InTransit:包裹正在物流网络中运输
- CustomsClearance:正在清关(通常3-7个工作日)
- OutForDelivery:今天进行最终派送
- Delivered:已成功送达
- Exception:出现问题(海关扣留、地址错误、派送失败)
- Returned:正在退回发件地
提示
- 1. 无需密钥:没有TRACK17APIKEY时,工具使用Playwright直接查询17track。使用npm install playwright安装Playwright即可。
- 3100+承运商:使用17track API密钥时,从追踪号码自动检测承运商。
- 发货后等待24-48小时再追踪——第一天可能没有数据。
- 同一追踪号码的查询间隔至少2小时,以避免限速。
- 多个包裹使用batch_track——比单独查询更高效。