快递鸟MCP服务 - 提供快递物流查询的MCP协议服务
Project description
快递鸟物流服务 - KDNiao Logistics MCP Service
基于快递鸟API的MCP服务,为AI助手提供物流查询、单号识别、时效预估、地址解析、网点查询和跨境物流查询功能。
功能特性
- 物流轨迹查询:支持100+快递公司的实时物流轨迹查询
- 智能单号识别:自动识别快递单号对应的快递公司
- 时效预估:预估快递配送时间和路线
- 智能地址解析:解析完整地址信息,拆分省市区街道、姓名、电话等
- 网点查询:查询快递公司在指定地区的服务网点信息
- 跨境物流查询:支持国际快递的物流轨迹查询,包含清关状态
快速开始
1. 安装
git clone <repository-url>
cd mcptrae
pip install -r requirements.txt
2. 获取API密钥
- 访问 快递鸟官网 注册账户
- 获取
EBusinessID和APIKey
3. 启动服务
MCP客户端配置:
{
"mcpServers": {
"kdniao-mcp": {
"command": "python",
"args": ["-m", "kdnmcp.main"],
"env": {
"EBUSINESS_ID": "your_ebusiness_id",
"API_KEY": "your_api_key"
}
}
}
}
直接启动:
# Stdio模式(推荐)
EBUSINESS_ID=your_id API_KEY=your_key python -m kdnmcp.main
# Web模式
python -m kdnmcp.main --transport http --port 8000
可用工具
1. 物流轨迹查询 (track_logistics)
查询快递包裹的实时物流轨迹信息。
参数:
logistic_code(必需): 快递单号shipper_code(可选): 快递公司编码mobile(可选): 手机号后四位(顺丰需要)
2. 单号识别 (recognize_logistics_code)
自动识别快递单号对应的快递公司。
参数:
logistic_code(必需): 快递单号
3. 时效预估 (estimate_delivery_time)
预估快递配送时间和路线信息。
参数:
shipper_code(必需): 快递公司编码send_province/city/area(必需): 发件地址receive_province/city/area(必需): 收件地址logistic_code(可选): 快递单号
4. 智能地址解析 (parse_address)
解析完整地址信息,拆分为省市区街道、姓名、电话等。
参数:
content(必需): 待识别的完整地址
5. 网点查询 (query_service_points)
查询快递公司在指定地区的服务网点信息。
参数:
shipper_code(必需): 快递公司编码province_name(必需): 省份名称city_name/area_name(可选): 城市/区县名称address(可选): 地址关键词(顺丰和极兔必填)
6. 跨境物流查询 (track_cross_border_logistics)
查询国际快递的物流轨迹信息,支持清关状态。
参数:
shipper_code(必需): 物流公司编码logistic_code(必需): 快递单号order_code(可选): 订单编号
支持的快递公司
支持100+快递公司,主要包括:顺丰(SF)、圆通(YTO)、中通(ZTO)、申通(STO)、韵达(YD)、极兔(JTSD)、京东(JD)、邮政EMS、德邦(DBL)、百世(HTKY)等。
常见问题
API认证失败
- 检查
EBUSINESS_ID和API_KEY是否正确 - 确认快递鸟账户状态正常
参数验证错误
- 检查快递公司编码是否正确
- 验证快递单号格式
调试模式
EBUSINESS_ID=your_id API_KEY=your_key python -m kdnmcp.main --debug
许可证
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kdnmcp-1.0.4.tar.gz.
File metadata
- Download URL: kdnmcp-1.0.4.tar.gz
- Upload date:
- Size: 134.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be57ef2bbf9b39700a10d9a052ab31789c033c56fad06f33a9510d72020d4175
|
|
| MD5 |
abefeab40fc5fe66653381aa5debdce8
|
|
| BLAKE2b-256 |
fbaf3b216ec8cbcfabf0baf75383318b406d60d7a5263a9c9a2736361d9272b6
|
File details
Details for the file kdnmcp-1.0.4-py3-none-any.whl.
File metadata
- Download URL: kdnmcp-1.0.4-py3-none-any.whl
- Upload date:
- Size: 145.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
333c68050e03fb629e8c5fd708ce62a6f72084fb95d553f6d2d914f530c951d0
|
|
| MD5 |
ab59f48e24883e41d20ad97f92a6cc94
|
|
| BLAKE2b-256 |
8dc442a0405227e62026f6ad3e4402d737cd29f35197663b2453e71049fc28e4
|