接口说明
通过 MCP API 你可以查询归类实例、税号编码、统一搜索结果和编码详情。下方提供快速开始与接口级说明。
标准 MCP 端点(推荐)
- 端点地址:
POST https://www.hsciq.com/mcp/rpc,遵循标准 Model Context Protocol(Streamable HTTP,Stateless,JSON-RPC 2.0)。 - 鉴权方式与 REST 端点相同:
X-API-Key请求头,或Authorization: Bearer <key>。 - 提供与 REST 端点完全相同的 9 个工具(search_instance / search_code / search_unified / get_code_detail / create_guilei_form / get_guilei_form / list_my_guilei_forms / add_guilei_dialog_message / list_guilei_categories),参数与返回结构一致。
- 错误语义差异:REST 端点超限/失败返回 HTTP 429/400;标准 MCP 端点按协议返回 HTTP 200,结果中
isError=true,错误文本以错误码开头(如daily_quota_exceeded: 每日调用次数已达上限(150次))。 - 下方 REST 端点继续可用;新接入建议使用标准 MCP 端点。
客户端配置示例(Claude Code / Cursor 等 mcp.json)
{
"mcpServers": {
"hsciq": {
"type": "http",
"url": "https://www.hsciq.com/mcp/rpc",
"headers": { "X-API-Key": "your_api_key" }
}
}
}
curl 调用示例(Stateless 模式无需握手,逐条独立 POST)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\",\"params\":{}}"
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"search_code\",\"arguments\":{\"keywords\":\"自行车\",\"country\":\"CN\"}}}"
接入说明
- 本站提供两种接入方式:标准 MCP 端点
POST /mcp/rpc(推荐),以及旧版 REST 端点(已废弃,仅兼容存量调用,见页面底部)。 - 基础地址按站点域名拼接,所有请求使用 HTTPS。
- 地址完整性示例:
https://www.hsciq.com/mcp/rpc(正确),不要写成https://www.hsciq.com/MCP/mcp/rpc。 - 两种方式提供的 9 个工具完全相同,工具参数与返回结构一致(见下方"工具说明")。
- 分页类工具统一返回
pageIndex/pageSize/totalPageCount/totalItemCount/isPreviousPage/isNextPage/items。
鉴权方式
X-API-Key: your_api_key
ClawHub 技能安装
- 技能页面:
https://clawhub.ai/toucao/skills/hsciq-mcp
方式 1:命令行安装
clawhub install hsciq-mcp
方式 2:网页安装
访问技能页点击 Install。
search_instance 参数与返回值说明
keywords 为商品名称关键词,如"自行车"、"塑料软管"、"手机壳"等具体商品名,不要使用描述性长句或短语。items 类型:
InstanceSearchResult[]| 字段 | 类型 | 说明 |
|---|---|---|
pageIndex | int | 当前页 |
pageSize | int | 每页条数 |
totalPageCount | int | 总页数 |
totalItemCount | int | 总条数 |
isPreviousPage | bool | 是否有上一页 |
isNextPage | bool | 是否有下一页 |
items[].InstanceName | string | 实例名(高亮版本) |
items[].InstanceNamePlain | string | 实例名纯文本 |
items[].Count | int | 关联条数 |
items[].IndexDocumentId | string | 索引文档ID |
items[].IndexTokens | string[] | 检索分词 |
items[].IndexInstanceNameTokens | string[] | 实例名分词 |
items[].IndexInstanceNameAsciiTokens | string[] | 实例名ASCII分词 |
items[].IndexCategoryNameTokens | string[] | 类目分词 |
items[].Index2CodeNameTokens | string[] | 2位类目分词 |
items[].Index4CodeNameTokens | string[] | 4位类目分词 |
items[].Index6CodeNameTokens | string[] | 6位类目分词 |
items[].MatchRank | double | 匹配排序得分 |
items[].ShortNamePenalty | double | 短词惩罚项 |
items[].ChineseHitPenalty | double | 中文命中惩罚项 |
items[].PrimaryHitPenalty | double | 主命中惩罚项 |
items[].MissingTokens | int | 未命中词数 |
items[].MissingRatio | double | 未命中比例 |
items[].MatchedTokens | int | 命中词数 |
items[].OrderPenalty | double | 顺序惩罚 |
items[].SpanLen | int | 跨度长度 |
items[].FirstPos | int | 首命中位置 |
items[].NameLength | int | 名称长度 |
items[].MaxScore | double | 最大原始分值 |
items[].CategoryResults | array | 类目树结果 |
search_code 返回参数字段说明
items 类型:
CNCode[] / JPCode[] / USCode[]分页外层字段
| 字段 | 类型 | 说明 |
|---|---|---|
pageIndex | int | 当前页 |
pageSize | int | 每页条数 |
totalPageCount | int | 总页数 |
totalItemCount | int | 总条数 |
isPreviousPage | bool | 是否有上一页 |
isNextPage | bool | 是否有下一页 |
items | array | 结果列表,具体项类型取决于 country |
公共字段(CN/JP/US)
| 字段 | 类型 | 说明 |
|---|---|---|
Status | int | 状态值 |
CreateTime | datetime? | 创建时间 |
UpdateTime | datetime? | 更新时间 |
Unit1 | string? | 法定第一计量单位 |
Unit2 | string? | 法定第二计量单位 |
UnitofMeasure | string? | 计量单位描述 |
Code | string | 海关编码 |
Name | string | 编码名称 |
CategoryId | string? | 类目ID |
CategoryName | string? | 类目名称 |
_2Code | string | 2位编码 |
_2CodeName | string | 2位编码名称 |
_4Code | string | 4位编码 |
_4CodeName | string | 4位编码名称 |
_6Code | string | 6位编码 |
_6CodeName | string | 6位编码名称 |
CNCode 扩展字段
| 字段 | 类型 | 说明 |
|---|---|---|
OldData | object | 中国税则原始对象 |
Import | string? | 进口税率摘要 |
Export | string? | 出口税率摘要 |
RCEP | string? | RCEP税率摘要 |
CT | string? | 协定税率摘要 |
ExportRebateCode | string? | 出口退税码 |
Remark | string? | 备注 |
Tokens | string[] | 检索分词 |
DocumentId | string | 索引文档ID |
JPCode 扩展字段
| 字段 | 类型 | 说明 |
|---|---|---|
General | string? | 一般税率 |
Temporary | string? | 暂定税率 |
WTO | string? | WTO税率 |
GSP | string? | 普惠税率 |
LDC | string? | 最不发达国家税率 |
Asean | string? | 东盟税率 |
Singapore | string? | 新加坡税率 |
Mexico | string? | 墨西哥税率 |
Malaysia | string? | 马来西亚税率 |
Chile | string? | 智利税率 |
Thailand | string? | 泰国税率 |
Indonesia | string? | 印尼税率 |
Brunei | string? | 文莱税率 |
Philippines | string? | 菲律宾税率 |
Switzerland | string? | 瑞士税率 |
Vietnam | string? | 越南税率 |
India | string? | 印度税率 |
Peru | string? | 秘鲁税率 |
Australia | string? | 澳大利亚税率 |
Mongolia | string? | 蒙古税率 |
CPTPP | string? | CPTPP税率 |
EU | string? | 欧盟税率 |
UK | string? | 英国税率 |
US | string? | 美国税率 |
RCEP_China | string? | RCEP中国税率 |
RCEP_Korea | string? | RCEP韩国税率 |
RCEP_Australia | string? | RCEP澳洲税率 |
Law | string? | 法律备注 |
Tokens | string[] | 检索分词 |
DocumentId | string | 索引文档ID |
USCode 扩展字段
| 字段 | 类型 | 说明 |
|---|---|---|
Indent | string? | 层级缩进标记 |
GeneralRateofDuty | string? | 一般税率 |
SpecialRateofDuty | string? | 特别税率 |
Column2RateofDuty | string? | 第二栏税率 |
QuotaQuantity | string? | 配额数量 |
AdditionalDuties | string? | 附加税说明 |
Tokens | string[] | 检索分词 |
DocumentId | string | 索引文档ID |
search_unified 返回参数字段说明
items 类型:
CIQ[] / HazardousChemicals[] / PortSearchResult[]分页外层字段
| 字段 | 类型 | 说明 |
|---|---|---|
pageIndex | int | 当前页 |
pageSize | int | 每页条数 |
totalPageCount | int | 总页数 |
totalItemCount | int | 总条数 |
isPreviousPage | bool | 是否有上一页 |
isNextPage | bool | 是否有下一页 |
items | array | 结果列表,具体项类型取决于 unifiedType |
当 unifiedType=ciq(CIQ)
| 字段 | 类型 | 说明 |
|---|---|---|
Status | int | 状态值 |
CreateTime | datetime? | 创建时间 |
UpdateTime | datetime? | 更新时间 |
Code | string | 海关编码 |
Id | string | CIQ项目编号 |
Name | string | CIQ项目名称 |
Number | string | 监管条件编号 |
Tokens | string[] | 检索分词 |
DocumentId | string | 索引文档ID |
当 unifiedType=hazardous(HazardousChemicals)
| 字段 | 类型 | 说明 |
|---|---|---|
Id | int | 危化品主键 |
Name | string | 危化品名称 |
Alias | string? | 别名 |
CAS | string? | CAS号 |
HSCode | string? | 关联HS编码 |
Remarks | string? | 备注 |
CreateTime | datetime | 创建时间 |
Tokens | string[] | 检索分词 |
DocumentId | string | 索引文档ID |
当 unifiedType=port(PortSearchResult)
| 字段 | 类型 | 说明 |
|---|---|---|
Id | int | 港口主键 |
Code | string | 港口代码(高亮版本) |
CodePlain | string | 港口代码纯文本 |
CName | string | 中文名(高亮版本) |
CNamePlain | string | 中文名纯文本 |
EName | string | 英文名(高亮版本) |
ENamePlain | string | 英文名纯文本 |
Country | object? | 国家对象,含 Id/Name |
ShippingLine | object? | 航线对象,含 Id/Name |
get_code_detail 返回参数字段说明
返回对象类型:
MCPCodeDetailResult(非分页)顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
Country | string | 国家:CN / JP / US |
Code | string | 海关编码 |
Name | string | 编码名称 |
Status | int | 状态值 |
UpdateTime | datetime? | 更新时间 |
Unit1 | string? | 法定第一计量单位 |
Unit2 | string? | 法定第二计量单位 |
UnitOfMeasure | string? | 计量单位描述 |
Remark | string? | 备注 |
Taxes | Dictionary<string,string> | 税率键值映射 |
Extensions | object | 分国家扩展对象 |
Taxes 常见键
| 国家 | 键名示例 | 说明 |
|---|---|---|
| CN | mfnImportRate、generalImportRate、vatRate、exportTaxRebateRate | 中国税率键 |
| JP | general、temporary、wto、rcepChina | 日本税率键 |
| US | generalRateOfDuty、specialRateOfDuty、column2RateOfDuty | 美国税率键 |
Extensions.Cn
| 字段 | 类型 | 说明 |
|---|---|---|
Reporting | array | 申报要素列表(MCPCodeItem) |
Regulatory | Dictionary<string,string> | 监管条件映射 |
Inspect | Dictionary<string,string> | 检验检疫映射 |
RegulatoryCodes | array | 禁限管制识别码列表(MCPRegulatoryCodeItem) |
Ciqs | array | CIQ列表(MCPCodeItem) |
HSMap | array | 税号注释映射(MCPCodeItem) |
ExportRebateCodes | array | 出口退税码列表(MCPExportRebateCodeItem) |
Ct | Dictionary<string,string> | 协定税率映射 |
Rcep | Dictionary<string,string> | RCEP税率映射 |
Extensions.Jp
| 字段 | 类型 | 说明 |
|---|---|---|
AgreementRates | Dictionary<string,string> | 日本协定税率映射 |
Extensions.Us
| 字段 | 类型 | 说明 |
|---|---|---|
QuotaQuantity | string? | 配额数量 |
AdditionalDuties | string? | 附加税说明 |
明细对象
| 对象 | 字段 | 说明 |
|---|---|---|
MCPCodeItem | Key | 键值(代码/序号) |
MCPCodeItem | Value | 显示文本 |
MCPCodeItem | IsRequired | 是否必填 |
MCPRegulatoryCodeItem | Code | 禁限管制识别码 |
MCPRegulatoryCodeItem | Name | 管制名称 |
MCPRegulatoryCodeItem | Mofcomcode | 商务部代码 |
MCPRegulatoryCodeItem | Iemark | 进出口标记 |
MCPRegulatoryCodeItem | Reportingcategorycode | 申报类别代码 |
MCPRegulatoryCodeItem | ReportingElements | 申报要素列表(MCPReportingElementItem) |
MCPReportingElementItem | Elementname | 要素名称 |
MCPReportingElementItem | Elementorder | 排序 |
MCPExportRebateCodeItem | Id | 退税扩展码 |
MCPExportRebateCodeItem | Name | 退税名称 |
MCPExportRebateCodeItem | Rate | 退税率 |
create_guilei_form 参数与返回值说明
创建 HS 归类咨询单,AI 可直接提交产品信息和图片(base64 编码)。每人每天有独立配额限制。
请求示例(标准 MCP 端点)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{
""jsonrpc"": ""2.0"",
""id"": 1,
""method"": ""tools/call"",
""params"": {
""name"": ""create_guilei_form"",
""arguments"": {
""productNameCn"": ""智能手机壳"",
""productNameEn"": ""Smartphone Case"",
""uses"": ""手机保护套"",
""ingredients"": ""硅胶"",
""brand"": ""某品牌"",
""model"": ""X1"",
""images"": [
{
""fileName"": ""front.jpg"",
""data"": ""base64编码的图片数据""
}
]
}
}
}"
输入参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
productNameCn | string | 是 | 产品中文名称 |
productNameEn | string? | 否 | 产品英文名称 |
categoryId | int? | 否 | 行业分类 ID,通过 list_guilei_categories 获取可用列表 |
uses | string? | 否 | 产品用途 |
ingredients | string? | 否 | 产品成分/材质 |
cas | string? | 否 | CAS 号 |
brand | string? | 否 | 品牌 |
model | string? | 否 | 型号 |
otherProductInfo | string? | 否 | 其他产品信息 |
qq | string? | 否 | QQ 联系方式 |
weixin | string? | 否 | 微信联系方式 |
processingMethod | string? | 否 | 加工方法 |
dimensions | string? | 否 | 尺寸 |
applicableGender | string? | 否 | 适用性别 |
workingPrinciple | string? | 否 | 工作原理 |
function | string? | 否 | 功能 |
weavingProcess | string? | 否 | 织造工艺 |
material | string? | 否 | 材质 |
gramWeight | string? | 否 | 克重 |
width | string? | 否 | 宽度 |
endTime | string? | 否 | 截止时间(ISO 8601 格式) |
isPaid | bool? | 否 | 是否加急咨询 |
images | array? | 是 | 图片列表(至少1张),每项含 fileName(文件名)和 data(base64 数据) |
图片限制:至少 1 张,最多 3 张,每张 ≤ 1MB,支持 JPG / PNG / GIF / WebP 格式(通过文件头魔数校验,不依赖扩展名)。
成功返回示例
以下为工具返回的数据部分:标准 MCP 端点位于
result.structuredContent,旧版 REST 端点位于 data。{
"formId": "a1b2c3d4-...",
"url": "https://www.hsciq.com/GuiLei/a1b2c3d4-...",
"status": "已创建",
"imageCount": 1,
"imageUrls": [ "https://www.hsciq.com/uploads/guilei/..." ]
}
返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
formId | string | 创建的归类咨询单 GUID |
url | string | 咨询单的完整访问链接 |
status | string | 创建状态:已创建 |
imageCount | int | 成功上传的图片数量 |
imageUrls | string[] | 图片的公开访问 URL 列表 |
get_guilei_form 参数与返回值说明
获取归类咨询单详情,包含所有字段的讨论对话、归类结论等信息。AI 可借此获知专家在哪个字段上提出了问题。
请求示例(标准 MCP 端点)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{
""jsonrpc"": ""2.0"",
""id"": 1,
""method"": ""tools/call"",
""params"": {
""name"": ""get_guilei_form"",
""arguments"": {
""formId"": ""a1b2c3d4-...""
}
}
}"
输入参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
formId | string | 是 | 归类咨询单 GUID |
返回值说明
返回
GuiLeiFormDetail 对象,包含以下顶层字段:| 字段 | 类型 | 说明 |
|---|---|---|
form | object | 归类单基本信息,核心字段见下表 |
acl | array | 访问控制列表 |
dialogs | array | 字段讨论对话列表,每项含 fieldKey(字段名)、messages(消息列表) |
shares | array | 分享链接列表 |
finalization | object? | 归类结论(含 confirmedCode 和 classificationReason) |
finalizationHistory | array | 归类结论修改历史 |
Dialogs 消息结构
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 对话 ID |
fieldKey | string | 关联的字段名(如 ProductNameCn、Ingredients) |
messages[].senderId | string | 消息发送者 ID |
messages[].content | string | 消息内容 |
messages[].createTime | datetime | 消息时间 |
messages[].messageType | int? | 消息类型 |
form 核心字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 表单 GUID |
status | int | 状态:0=已关闭,1=进行中 |
productNameCn | string? | 产品中文名称 |
productNameEn | string? | 产品英文名称 |
categoryId | int? | 行业分类 ID |
categoryName | string? | 行业分类名称 |
uses | string? | 用途 |
ingredients | string? | 成分/材质 |
cas | string? | CAS 号 |
brand | string? | 品牌 |
model | string? | 型号 |
isPaid | bool | 是否加急咨询 |
isFinalized | bool | 是否已出归类结论 |
confirmedCode | string? | 最终确认的 HS 编码 |
isUnclassifiable | bool | 是否无法归类 |
source | string? | 来源(mcp 表示通过 API 创建) |
createTime | datetime | 创建时间 |
updateTime | datetime | 更新时间 |
list_my_guilei_forms 参数与返回值说明
分页列出当前 API Key 所属用户的所有归类咨询单。
请求示例(标准 MCP 端点)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{
""jsonrpc"": ""2.0"",
""id"": 1,
""method"": ""tools/call"",
""params"": {
""name"": ""list_my_guilei_forms"",
""arguments"": {
""pageIndex"": 1,
""pageSize"": 20
}
}
}"
输入参数
| 字段 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
pageIndex | int? | 否 | 1 | 页码 |
pageSize | int? | 否 | 20 | 每页条数,最大 100 |
成功返回示例
以下为工具返回的数据部分:标准 MCP 端点位于
result.structuredContent,旧版 REST 端点位于 data。{
"items": [
{
"id": "a1b2c3d4-...",
"productNameCn": "智能手机壳",
"status": 1,
"isFinalized": false,
"createTime": "2026-05-08T10:30:00"
}
],
"pageIndex": 1,
"pageSize": 20,
"totalItemCount": 3,
"totalPageCount": 1
}
返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
items | array | 表单列表,每项为 GuiLeiForm 对象 |
pageIndex | int | 当前页码 |
pageSize | int | 每页条数 |
totalItemCount | int | 总条数 |
totalPageCount | int | 总页数 |
items 中每个对象的字段参见上方 get_guilei_form 的「form 核心字段」表。
add_guilei_dialog_message 参数与返回值说明
在归类咨询单的某个字段上创建新对话,或回复已有的对话。AI 可用此工具代表用户回复专家的提问。
请求示例(创建新对话,标准 MCP 端点)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{
""jsonrpc"": ""2.0"",
""id"": 1,
""method"": ""tools/call"",
""params"": {
""name"": ""add_guilei_dialog_message"",
""arguments"": {
""formId"": ""a1b2c3d4-..."",
""fieldKey"": ""Ingredients"",
""content"": ""主要成分是聚乙烯,不含阻燃剂""
}
}
}"
请求示例(回复已有对话,仅示 arguments 部分)
"arguments": {
"formId": "a1b2c3d4-...",
"fieldKey": "Ingredients",
"content": "已确认,确实不含阻燃剂",
"dialogId": "d5e6f7a8-..."
}
输入参数
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
formId | string | 是 | 归类咨询单 GUID |
fieldKey | string | 是 | 字段名(如 ProductNameCn、Uses、Ingredients、Cas、Brand、Model、OtherProductInfo 等) |
content | string | 是 | 消息内容 |
dialogId | string? | 否 | 如提供则回复已有对话;否则创建新对话 |
messageType | int? | 否 | 消息类型,透传至后台 |
成功返回示例
以下为工具返回的数据部分:标准 MCP 端点位于
result.structuredContent,旧版 REST 端点位于 data。{
"dialogId": "d5e6f7a8-...",
"messageId": "b9c0d1e2-...",
"action": "reply"
}
返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
dialogId | string | 对话 ID |
messageId | string | 消息 ID |
action | string | 操作类型:created(新建对话)或 reply(回复已有对话) |
list_guilei_categories 参数与返回值说明
获取可用的行业分类列表,用于创建归类咨询单时选择
categoryId。请求示例(标准 MCP 端点)
curl -X POST "https://www.hsciq.com/mcp/rpc" ^
-H "Content-Type: application/json" ^
-H "Accept: application/json, text/event-stream" ^
-H "X-API-Key: your_api_key" ^
-d "{
""jsonrpc"": ""2.0"",
""id"": 1,
""method"": ""tools/call"",
""params"": {
""name"": ""list_guilei_categories"",
""arguments"": {}
}
}"
无需输入参数。
成功返回示例
以下为工具返回的数据部分:标准 MCP 端点位于
result.structuredContent,旧版 REST 端点位于 data。[
{ "id": 1, "name": "活动物;动物产品" },
{ "id": 2, "name": "植物产品" },
{ "id": 3, "name": "动、植物油脂" }
]
返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
id | int | 行业分类 ID,用于 create_guilei_form 的 categoryId 参数 |
name | string | 行业分类名称 |
错误码说明
401 类错误两个端点相同(HTTP 401)。400/429/500 类在旧版 REST 端点按下表 HTTP 状态码返回;在标准 MCP 端点按协议返回 HTTP 200,结果中
isError=true,错误文本以错误码开头(如 daily_quota_exceeded: 每日调用次数已达上限(150次))。| HTTP | error | 含义 |
|---|---|---|
| 401 | missing_api_key | 未提供 API key |
| 401 | invalid_api_key | API key 无效 |
| 401 | api_key_expired | API key 已过期 |
| 401 | api_key_revoked | API key 已撤销 |
| 400 | invalid_params | 参数不合法(如 productNameCn 为空、图片格式不支持等) |
| 400 | forbidden_keyword | 关键词触发拦截 |
| 400 | unknown_tool | 工具名称不支持 |
| 429 | daily_quota_exceeded | 每日总调用次数已达上限 |
| 429 | daily_guilei_quota_exceeded | 每日创建归类咨询次数已达上限(默认5次) |
| 500 | internal_error | 服务器内部错误 |
以下 REST 接口已废弃,仅为兼容存量调用保留,不再更新;新接入请使用标准 MCP 端点
POST /mcp/rpc(见顶部"标准 MCP 端点(推荐)")。
GET /mcp 已废弃
返回服务元信息和工具入口地址。REST 接口统一返回 JSON,成功结构为
{ "ok": true, "toolName": "...", "data": ... }。{
"name": "HSCIQ2 MCP",
"version": "1.0",
"standardMcpEndpoint": "/mcp/rpc",
"toolsEndpoint": "/mcp/tools/list",
"callEndpoint": "/mcp/tools/call"
}
POST /mcp/tools/list 已废弃
返回可用工具与输入参数定义。
curl -X POST "https://www.hsciq.com/mcp/tools/list" ^
-H "Content-Type: application/json" ^
-H "X-API-Key: your_api_key"
{
"version": "1.0",
"tools": [
{ "name": "search_instance" },
{ "name": "search_code" },
{ "name": "search_unified" },
{ "name": "get_code_detail" },
{ "name": "create_guilei_form" },
{ "name": "get_guilei_form" },
{ "name": "list_my_guilei_forms" },
{ "name": "add_guilei_dialog_message" },
{ "name": "list_guilei_categories" }
]
}
POST /mcp/tools/call(search_instance / search_code / search_unified) 已废弃
前三个工具都通过该入口调用,返回统一分页结构。
curl -X POST "https://www.hsciq.com/mcp/tools/call" ^
-H "Content-Type: application/json" ^
-H "X-API-Key: your_api_key" ^
-d "{
""toolName"": ""search_code"",
""arguments"": {
""keywords"": ""塑料软管"",
""country"": ""CN"",
""pageIndex"": 1,
""pageSize"": 10,
""filterFailureCode"": true
}
}"
- 分页外层字段:
pageIndex、pageSize、totalPageCount、totalItemCount、isPreviousPage、isNextPage、items。 items类型:search_instance → InstanceSearchResult[],search_code → CNCode[]/JPCode[]/USCode[],search_unified → CIQ[]/HazardousChemicals[]/PortSearchResult[]。
POST /mcp/tools/call(get_code_detail) 已废弃
按国家+编码返回非分页详情对象。
{
"toolName": "get_code_detail",
"arguments": {
"country": "CN",
"code": "3926909090"
}
}
详细返回字段见上方
get_code_detail 工具章节。