mirror of
https://github.com/alibaba/higress.git
synced 2026-06-10 05:07:30 +08:00
add mcp servers (#2076)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# Logistics Tracking Query
|
||||
|
||||
The APP Code required for API authentication can be applied for at the Alibaba Cloud API Marketplace: https://market.aliyun.com/apimarket/detail/cmapi00048162
|
||||
|
||||
# MCP Server Function Overview Document
|
||||
|
||||
## Function Overview
|
||||
|
||||
The **logistics-tracking-query** server is primarily used to handle queries related to express delivery, including but not limited to automatically identifying the courier company associated with a tracking number and obtaining detailed transportation path information for a specified package. This service is very useful for applications that need to integrate information from multiple different courier service providers, as it simplifies the process of connecting to multiple independent APIs and provides a unified data access interface.
|
||||
|
||||
## Tool Introduction
|
||||
|
||||
### Tracking Number to Identify Courier Company
|
||||
|
||||
- **Purpose**: Intelligently match the corresponding courier service provider based on the tracking number provided by the user.
|
||||
- **Use Case**: Suitable for e-commerce platforms, order management systems, and other scenarios where it is necessary to quickly determine the courier company used by customers.
|
||||
- **Parameter Description**:
|
||||
- `mailNo` (Required): The tracking number input by the user, used to find the associated courier company information.
|
||||
|
||||
### Logistics Tracking Query
|
||||
|
||||
- **Purpose**: Call the API to obtain the latest logistics updates based on the tracking number and related information.
|
||||
- **Use Case**: Suitable for all services that wish to provide real-time package location updates to their users, such as shopping websites and third-party logistics monitoring applications.
|
||||
- **Parameter Description**:
|
||||
- `cpCode` (Required): The unique identifier code of the courier company.
|
||||
- `mailNo` (Required): The tracking number to be queried.
|
||||
- `phone` (Optional): When involving SF Express or Fengwang, provide the full phone number or the last four digits of the recipient's/sender's phone number to enhance verification accuracy.
|
||||
|
||||
Together, these two tools effectively provide a one-stop solution for users, from identifying the courier company to tracking the entire status of the package, greatly enhancing the user experience while also reducing the integration burden for developers.
|
||||
@@ -0,0 +1,40 @@
|
||||
# 物流轨迹查询
|
||||
|
||||
API认证需要的APP Code请在阿里云API市场申请: https://market.aliyun.com/apimarket/detail/cmapi00048162
|
||||
|
||||
## 什么是云市场API MCP服务
|
||||
|
||||
阿里云云市场是生态伙伴的交易服务平台,我们致力于为合作伙伴提供覆盖上云、商业化和售卖的全链路服务,帮助客户高效获取、部署和管理优质生态产品。云市场的API服务涵盖以下几个类目:应用开发、身份验证与金融、车辆交通与物流、企业服务、短信与运营商、AI应用与OCR、生活服务。
|
||||
云市场API依托Higress提供MCP服务,您只需在云市场完成订阅并获取AppCode,通过Higress MCP Server进行配置,即可无缝集成云市场API服务。
|
||||
|
||||
## 如何在使用云市场API MCP服务
|
||||
|
||||
1. 进入API详情页,订阅该API。您可以优先使用免费试用。
|
||||
2. 前往云市场用户控制台,使用阿里云账号登陆后查看已订阅API服务的AppCode,并配置到Higress MCP Server的配置中。注意:在阿里云市场订阅API服务后,您将获得AppCode。对于您订阅的所有API服务,此AppCode是相同的,您只需使用这一个AppCode即可访问所有已订阅的API服务。
|
||||
3. 云市场用户控制台会实时展示已订阅的预付费API服务的可用额度,如您免费试用额度已用完,您可以选择重新订阅。
|
||||
|
||||
# MCP服务器功能简介文档
|
||||
|
||||
## 功能简介
|
||||
|
||||
**logistics-tracking-query** 服务器主要用于处理与快递相关的查询请求,包括但不限于自动识别快递单号所属的快递公司以及获取指定快递包裹的运输路径详情。此服务对于需要整合多种不同快递服务商信息的应用程序非常有用,它简化了开发者对接多个独立API的过程,并提供了一个统一的数据访问接口。
|
||||
|
||||
## 工具简介
|
||||
|
||||
### 单号识别快递公司
|
||||
|
||||
- **用途**:基于用户提供的快递单号智能匹配出对应的快递服务提供商。
|
||||
- **应用场景**:适用于电商平台、订单管理系统等需要快速确定顾客使用的快递公司的场合。
|
||||
- **参数说明**:
|
||||
- `mailNo` (必填):用户输入的快递单号,用于查找相关联的快递公司信息。
|
||||
|
||||
### 物流轨迹查询
|
||||
|
||||
- **用途**:根据快递单号及相关信息调用API获取最新的物流动态更新。
|
||||
- **应用场景**:适合所有希望向其用户提供实时包裹位置更新的服务,如购物网站、第三方物流监控应用等。
|
||||
- **参数说明**:
|
||||
- `cpCode` (必填):快递公司的唯一标识码。
|
||||
- `mailNo` (必填):待查询的快递单号。
|
||||
- `phone` (选填):当涉及顺丰或丰网时需提供收件人/寄件人的手机号全号或者后四位数字以增强验证准确性。
|
||||
|
||||
这两个工具共同作用下,能够有效地为用户提供从识别快递公司到全程跟踪包裹状态的一站式解决方案,极大提升了用户体验的同时也减轻了开发者的集成负担。
|
||||
@@ -0,0 +1,186 @@
|
||||
{
|
||||
"info": {
|
||||
"description": "【快递查询api,快递物流自动单号识别】可查询快递物流信息近600+家全国快递查询API,单号自动识别,包括全球快递物流查询接口:顺丰、邮政,极兔,申通、圆通、韵达、中通、百世、EMS、天天、国通、德邦、宅急送等600+家快递物流查询接口,支持物流监控推送",
|
||||
"title": "【快递助手】物流轨迹查询API-全球快递查询-物流更新推送-快递查询接口-快递单号查询-快递实时查询-自动识别单号-轨迹展示",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"openapi": "3.0.1",
|
||||
"paths": {
|
||||
"/logistics/discern": {
|
||||
"post": {
|
||||
"operationId": "单号识别快递公司",
|
||||
"summary": "智能识别单号对应的快递公司",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/x-www-form-urlencoded": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"mailNo": {
|
||||
"description": "快递单号",
|
||||
"type": "string",
|
||||
"example": "YT1223434234"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"mailNo"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"description": "响应状态码"
|
||||
},
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"companyName": {
|
||||
"type": "string",
|
||||
"description": "快递公司名称",
|
||||
"example": "圆通快递"
|
||||
},
|
||||
"cpCode": {
|
||||
"type": "string",
|
||||
"description": "快递公司代码",
|
||||
"example": "YTO"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "成功响应"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/logistics/search": {
|
||||
"post": {
|
||||
"operationId": "物流轨迹查询",
|
||||
"summary": "查询各大快递公司物流轨迹",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/x-www-form-urlencoded": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cpCode": {
|
||||
"description": "快递公司编码",
|
||||
"type": "string",
|
||||
"example": "YTO"
|
||||
},
|
||||
"mailNo": {
|
||||
"description": "快递单号",
|
||||
"type": "string",
|
||||
"example": "YT1020302302"
|
||||
},
|
||||
"phone": {
|
||||
"description": "顺丰、丰网快递需要传收件或寄件人手机号或者手机号后四位",
|
||||
"type": "string",
|
||||
"example": "13000000000或者0000"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"cpCode",
|
||||
"mailNo"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "integer",
|
||||
"example": 100
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"cpCode": {
|
||||
"type": "string",
|
||||
"example": "YTO"
|
||||
},
|
||||
"logisticsCompanyName": {
|
||||
"type": "string",
|
||||
"example": "圆通快递"
|
||||
},
|
||||
"logisticsStatus": {
|
||||
"type": "string",
|
||||
"example": "SIGN"
|
||||
},
|
||||
"logisticsStatusDesc": {
|
||||
"type": "string",
|
||||
"example": "已签收"
|
||||
},
|
||||
"logisticsTraceDetailList": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"desc": {
|
||||
"type": "string",
|
||||
"example": "广东省广州市海珠区滨江中大公司,已揽收"
|
||||
},
|
||||
"logisticsStatus": {
|
||||
"type": "string",
|
||||
"example": "ACCEPT"
|
||||
},
|
||||
"time": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"example": 1628158737000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"mailNo": {
|
||||
"type": "string",
|
||||
"example": "YT9704205606839"
|
||||
},
|
||||
"theLastMessage": {
|
||||
"type": "string",
|
||||
"example": "山东省菏泽市单县公司,已签收"
|
||||
},
|
||||
"theLastTime": {
|
||||
"type": "string",
|
||||
"example": "2021-08-08T09:24:40Z"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "成功响应"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://kdzsgw.market.alicloudapi.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
server:
|
||||
name: logistics-tracking-query
|
||||
config:
|
||||
appCode: ""
|
||||
tools:
|
||||
- name: mail-company-query
|
||||
description: 智能识别单号对应的快递公司
|
||||
args:
|
||||
- name: mailNo
|
||||
description: 快递单号
|
||||
type: string
|
||||
required: true
|
||||
position: body
|
||||
requestTemplate:
|
||||
url: https://kdzsgw.market.alicloudapi.com/logistics/discern
|
||||
method: POST
|
||||
headers:
|
||||
- key: Content-Type
|
||||
value: application/x-www-form-urlencoded
|
||||
- key: Authorization
|
||||
value: APPCODE {{.config.appCode}}
|
||||
- key: X-Ca-Nonce
|
||||
value: '{{uuidv4}}'
|
||||
responseTemplate:
|
||||
prependBody: |+
|
||||
# API Response Information
|
||||
|
||||
Below is the response from an API call. To help you understand the data, I've provided:
|
||||
|
||||
1. A detailed description of all fields in the response structure
|
||||
2. The complete API response
|
||||
|
||||
## Response Structure
|
||||
|
||||
> Content-Type: application/json
|
||||
|
||||
- **code**: 响应状态码 (Type: integer)
|
||||
- **data**: (Type: array)
|
||||
- **data[].companyName**: 快递公司名称 (Type: string)
|
||||
- **data[].cpCode**: 快递公司代码 (Type: string)
|
||||
|
||||
## Original Response
|
||||
|
||||
- name: common-logistics-tracking-query
|
||||
description: 查询各大快递公司物流轨迹
|
||||
args:
|
||||
- name: cpCode
|
||||
description: 快递公司编码
|
||||
type: string
|
||||
required: true
|
||||
position: body
|
||||
- name: mailNo
|
||||
description: 快递单号
|
||||
type: string
|
||||
required: true
|
||||
position: body
|
||||
- name: phone
|
||||
description: 顺丰、丰网快递需要传收件或寄件人手机号或者手机号后四位
|
||||
type: string
|
||||
position: body
|
||||
requestTemplate:
|
||||
url: https://kdzsgw.market.alicloudapi.com/logistics/search
|
||||
method: POST
|
||||
headers:
|
||||
- key: Content-Type
|
||||
value: application/x-www-form-urlencoded
|
||||
- key: Authorization
|
||||
value: APPCODE {{.config.appCode}}
|
||||
- key: X-Ca-Nonce
|
||||
value: '{{uuidv4}}'
|
||||
responseTemplate:
|
||||
prependBody: |+
|
||||
# API Response Information
|
||||
|
||||
Below is the response from an API call. To help you understand the data, I've provided:
|
||||
|
||||
1. A detailed description of all fields in the response structure
|
||||
2. The complete API response
|
||||
|
||||
## Response Structure
|
||||
|
||||
> Content-Type: application/json
|
||||
|
||||
- **code**: (Type: integer)
|
||||
- **data**: (Type: object)
|
||||
- **data.cpCode**: (Type: string)
|
||||
- **data.logisticsCompanyName**: (Type: string)
|
||||
- **data.logisticsStatus**: (Type: string)
|
||||
- **data.logisticsStatusDesc**: (Type: string)
|
||||
- **data.logisticsTraceDetailList**: (Type: array)
|
||||
- **data.logisticsTraceDetailList[].desc**: (Type: string)
|
||||
- **data.logisticsTraceDetailList[].logisticsStatus**: (Type: string)
|
||||
- **data.logisticsTraceDetailList[].time**: (Type: integer)
|
||||
- **data.mailNo**: (Type: string)
|
||||
- **data.theLastMessage**: (Type: string)
|
||||
- **data.theLastTime**: (Type: string)
|
||||
|
||||
## Original Response
|
||||
|
||||
Reference in New Issue
Block a user