mirror of
https://github.com/alibaba/higress.git
synced 2026-05-28 06:37:26 +08:00
add mcp servers (#2076)
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
# Vehicle Restriction Query
|
||||
|
||||
The APP Code required for API authentication can be applied for on the Alibaba Cloud API Marketplace: https://market.aliyun.com/apimarket/detail/cmapi011138
|
||||
|
||||
# MCP Server Configuration Document
|
||||
|
||||
This document aims to provide a brief introduction to the main functions and tools of the `vehicle-restriction-query` MCP server. This server focuses on providing query services related to urban vehicle restriction information, implemented through two primary interfaces: city restriction queries and obtaining a list of supported cities.
|
||||
|
||||
## Function Overview
|
||||
|
||||
The `vehicle-restriction-query` server is primarily used to provide services that allow querying specific city's vehicle restriction policy information based on city codes and dates. Additionally, it allows users to obtain a list of all currently supported city codes and names. These features are particularly useful for applications that need to understand or comply with local traffic rules, such as map applications and navigation systems.
|
||||
|
||||
## Tool Introduction
|
||||
|
||||
### City Restriction Query Interface
|
||||
|
||||
- **Purpose**: Retrieve the vehicle restriction details of a specified city based on the provided city code and date.
|
||||
- **Use Case**: Suitable for any application or service that needs to update its information about vehicle restrictions in a specific area in real-time.
|
||||
- **Parameter Description**:
|
||||
- `city`: Required, represents the unique identifier of the queried city.
|
||||
- `date`: Required, defaults to the current day; used to specify the exact date for the query.
|
||||
- **Request Method**: GET
|
||||
- **Response Structure**:
|
||||
- Includes detailed information such as restricted areas, applicable dates, and restricted license plate numbers.
|
||||
- Each response field has a clearly defined data type, making it easy to parse and process.
|
||||
|
||||
### Get Cities Interface
|
||||
|
||||
- **Purpose**: Returns a list containing all queryable city codes and their corresponding Chinese names.
|
||||
- **Use Case**: Very useful when an application needs to display a dropdown menu for users to select different cities.
|
||||
- **Parameter Description**:
|
||||
- No additional parameters are required for this interface.
|
||||
- **Request Method**: GET
|
||||
- **Response Structure**:
|
||||
- Provides a simple JSON array format result, where each element contains a mapping of city code (`city`) and city name (`cityname`).
|
||||
- This structure makes it easy for the client to convert the data into a suitable form for display.
|
||||
|
||||
The above is a basic overview of the functions and services provided by the `vehicle-restriction-query` server. We hope this document will help developers better understand and utilize these API interfaces.
|
||||
@@ -0,0 +1,49 @@
|
||||
# 车辆限行查询
|
||||
|
||||
API认证需要的APP Code请在阿里云API市场申请: https://market.aliyun.com/apimarket/detail/cmapi011138
|
||||
|
||||
## 什么是云市场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服务器配置文档
|
||||
|
||||
本文档旨在提供对MCP服务器`vehicle-restriction-query`的主要功能及其工具的简要介绍。此服务器专注于提供与城市车辆限行信息相关的查询服务,通过两个主要接口实现:城市限行查询以及获取支持的城市列表。
|
||||
|
||||
## 功能简介
|
||||
|
||||
`vehicle-restriction-query`服务器主要用于提供基于城市代号及日期来查询特定城市的车辆限行政策信息的服务。此外,它还允许用户获取当前支持的所有城市代码和名称列表。这些功能对于需要了解或遵守地方交通规则的应用程序特别有用,例如地图应用、导航系统等。
|
||||
|
||||
## 工具简介
|
||||
|
||||
### 城市限行查询接口
|
||||
|
||||
- **用途**:根据指定的城市代号和日期检索该城市的车辆限行详情。
|
||||
- **使用场景**:适用于任何需要实时更新其关于特定地区车辆限制信息的应用程序或服务。
|
||||
- **参数说明**:
|
||||
- `city`: 必填项,代表所查询城市的唯一标识符。
|
||||
- `date`: 必填项,默认为当日;用于指定查询的具体日期。
|
||||
- **请求方法**: GET
|
||||
- **响应结构**:
|
||||
- 包含了诸如限行区域、适用日期、受限车牌号码等一系列详细信息。
|
||||
- 每个响应字段都有明确的数据类型定义,便于解析处理。
|
||||
|
||||
### 获取城市接口
|
||||
|
||||
- **用途**:返回一个包含所有可查询城市代号及其对应中文名的列表。
|
||||
- **使用场景**:当应用程序需要展示给用户一个下拉菜单供选择不同城市时非常有用。
|
||||
- **参数说明**:
|
||||
- 此接口无需额外参数输入。
|
||||
- **请求方法**: GET
|
||||
- **响应结构**:
|
||||
- 提供了一个简单的JSON数组格式结果,其中每个元素都包含了城市代码 (`city`) 和城市名称 (`cityname`) 的映射关系。
|
||||
- 这种结构使得客户端能够轻松地将数据转换成适合显示的形式。
|
||||
|
||||
以上就是`vehicle-restriction-query`服务器所提供功能和服务的基本概述。希望这份文档能够帮助开发者更好地理解和利用这些API接口。
|
||||
@@ -0,0 +1,171 @@
|
||||
{
|
||||
"info": {
|
||||
"description": "提供北京、天津、杭州、成都、兰州、贵阳、南昌、长春、哈尔滨、武汉、上海、深圳等城市的车辆限行时间、区域、尾号等查询。",
|
||||
"title": "【极速数据】车辆尾号限行_车辆尾号限行规则查询_车辆尾号限行城市查询_车辆尾号限行区域查询",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"openapi": "3.0.1",
|
||||
"paths": {
|
||||
"/vehiclelimit/city": {
|
||||
"get": {
|
||||
"operationId": "获取城市接口",
|
||||
"summary": "获取城市代号和城市名称。",
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"status": {
|
||||
"description": "状态码,0表示成功",
|
||||
"example": "0",
|
||||
"type": "string"
|
||||
},
|
||||
"msg": {
|
||||
"description": "响应消息",
|
||||
"example": "ok",
|
||||
"type": "string"
|
||||
},
|
||||
"result": {
|
||||
"description": "城市列表",
|
||||
"items": {
|
||||
"properties": {
|
||||
"city": {
|
||||
"description": "城市代码",
|
||||
"example": "beijing",
|
||||
"type": "string"
|
||||
},
|
||||
"cityname": {
|
||||
"description": "城市名称",
|
||||
"example": "北京",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "成功响应"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/vehiclelimit/query": {
|
||||
"get": {
|
||||
"operationId": "城市限行查询接口",
|
||||
"summary": "通过城市代号和日期获取城市车辆限行信息查询。",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "城市代号",
|
||||
"example": "hangzhou",
|
||||
"in": "query",
|
||||
"name": "city",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "日期 默认为今天 格式为:2015-12-02",
|
||||
"example": "2016-07-12",
|
||||
"in": "query",
|
||||
"name": "date",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "状态码",
|
||||
"example": "0"
|
||||
},
|
||||
"msg": {
|
||||
"type": "string",
|
||||
"description": "消息",
|
||||
"example": "ok"
|
||||
},
|
||||
"result": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"city": {
|
||||
"type": "string",
|
||||
"description": "城市代码",
|
||||
"example": "hangzhou"
|
||||
},
|
||||
"cityname": {
|
||||
"type": "string",
|
||||
"description": "城市名称",
|
||||
"example": "杭州"
|
||||
},
|
||||
"date": {
|
||||
"type": "string",
|
||||
"description": "日期",
|
||||
"example": 1449100800000
|
||||
},
|
||||
"week": {
|
||||
"type": "string",
|
||||
"description": "星期",
|
||||
"example": "星期四"
|
||||
},
|
||||
"time": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": "限行时间段",
|
||||
"example": [
|
||||
"07:00-09:00",
|
||||
"16:30-18:30"
|
||||
]
|
||||
},
|
||||
"area": {
|
||||
"type": "string",
|
||||
"description": "限行区域描述"
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "限行规则摘要",
|
||||
"example": "本市号牌尾号限行,外地号牌全部限行。法定上班的周六周日不限行。"
|
||||
},
|
||||
"numberrule": {
|
||||
"type": "string",
|
||||
"description": "限行号码规则",
|
||||
"example": "最后一位数字"
|
||||
},
|
||||
"number": {
|
||||
"type": "string",
|
||||
"description": "限行号码",
|
||||
"example": "4和6"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "成功响应"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://jisuclwhxx.market.alicloudapi.com"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
server:
|
||||
name: vehicle-restriction-query
|
||||
config:
|
||||
appCode: ""
|
||||
tools:
|
||||
- name: restriction-query
|
||||
description: 通过城市代号和日期获取城市车辆限行信息查询。
|
||||
args:
|
||||
- name: city
|
||||
description: 城市代号
|
||||
type: string
|
||||
required: true
|
||||
position: query
|
||||
- name: date
|
||||
description: 日期 默认为今天 格式为:2015-12-02
|
||||
type: string
|
||||
required: true
|
||||
position: query
|
||||
requestTemplate:
|
||||
url: https://jisuclwhxx.market.alicloudapi.com/vehiclelimit/query
|
||||
method: GET
|
||||
headers:
|
||||
- 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
|
||||
|
||||
- **msg**: 消息 (Type: string)
|
||||
- **result**: (Type: object)
|
||||
- **result.area**: 限行区域描述 (Type: string)
|
||||
- **result.city**: 城市代码 (Type: string)
|
||||
- **result.cityname**: 城市名称 (Type: string)
|
||||
- **result.date**: 日期 (Type: string)
|
||||
- **result.number**: 限行号码 (Type: string)
|
||||
- **result.numberrule**: 限行号码规则 (Type: string)
|
||||
- **result.summary**: 限行规则摘要 (Type: string)
|
||||
- **result.time**: 限行时间段 (Type: array)
|
||||
- **result.time[]**: Items of type string
|
||||
- **result.week**: 星期 (Type: string)
|
||||
- **status**: 状态码 (Type: string)
|
||||
|
||||
## Original Response
|
||||
|
||||
- name: get-city-list
|
||||
description: 获取城市代号和城市名称。
|
||||
args: []
|
||||
requestTemplate:
|
||||
url: https://jisuclwhxx.market.alicloudapi.com/vehiclelimit/city
|
||||
method: GET
|
||||
headers:
|
||||
- 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
|
||||
|
||||
- **msg**: 响应消息 (Type: string)
|
||||
- **result**: 城市列表 (Type: array)
|
||||
- **result[].city**: 城市代码 (Type: string)
|
||||
- **result[].cityname**: 城市名称 (Type: string)
|
||||
- **status**: 状态码,0表示成功 (Type: string)
|
||||
|
||||
## Original Response
|
||||
|
||||
Reference in New Issue
Block a user