API Documentation

With the MCP API, you can query classification examples, tariff codes, unified search results, and code details. A quick start guide and endpoint-level documentation are provided below.

Standard MCP Endpoint (Recommended)

  • Endpoint: POST https://www.hsciq.com/mcp/rpc, following the standard Model Context Protocol (Streamable HTTP, Stateless, JSON-RPC 2.0).
  • Authentication is the same as the REST endpoint: the X-API-Key request header, or Authorization: Bearer <key>.
  • Provides 15 tools in total: 9 tools (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) are identical to the REST endpoint in parameters and response structures; 3 additional customs announcement tools (search_gonggao / get_gonggao_detail / get_gonggao_by_code) and 3 ocean carrier notice tools (list_ocean_carriers / search_ocean_carrier_notice / get_ocean_carrier_notice_detail) are available only on the standard MCP endpoint.
  • Error semantics differ: the REST endpoint returns HTTP 429/400 when a quota is exceeded or a call fails; the standard MCP endpoint returns HTTP 200 per the protocol, with isError=true in the result and error text prefixed with an error code (e.g. daily_quota_exceeded: 每日调用次数已达上限(150次)).
  • The REST endpoints below remain available; new integrations are recommended to use the standard MCP endpoint.
Client Configuration Example (mcp.json for Claude Code / Cursor, etc.)
{
  "mcpServers": {
    "hsciq": {
      "type": "http",
      "url": "https://www.hsciq.com/mcp/rpc",
      "headers": { "X-API-Key": "your_api_key" }
    }
  }
}
curl Examples (Stateless mode requires no handshake; send each request as an independent 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\"}}}"

Integration Guide

  • This site offers two integration methods: the standard MCP endpoint POST /mcp/rpc (recommended), and the legacy REST endpoint (deprecated, kept only for compatibility with existing callers; see the bottom of this page).
  • The base address is built from the site domain; all requests use HTTPS.
  • Address example: https://www.hsciq.com/mcp/rpc (correct); do not write it as https://www.hsciq.com/MCP/mcp/rpc.
  • The standard MCP endpoint provides 15 tools in total; 9 are identical to the REST endpoint (see "Tools" below), and the 3 customs announcement tools plus 3 ocean carrier notice tools are available only on the standard MCP endpoint.
  • Paged tools uniformly return pageIndex/pageSize/totalPageCount/totalItemCount/isPreviousPage/isNextPage/items.

Authentication

X-API-Key: your_api_key

ClawHub Skill Installation

  • Skill page: https://clawhub.ai/toucao/skills/hsciq-mcp
Method 1: Command-Line Installation
openclaw skills install @toucao/hsciq-mcp
Method 2: Web Installation
Visit the skill page and click Install.

Local CLI (stdio) Installation

  • Use case: when an AI client only supports stdio local-process integration, use this CLI as a local bridge (internally it still calls the /mcp/rpc endpoint above, with identical authentication and quotas). If the client supports direct HTTP connections, using the standard endpoint directly is recommended.
  • Download links, configuration examples, and installation instructions have been moved to a dedicated page: CLI Download.

search_instance Parameters and Return Values

keywords is the product name keyword — use specific product names such as "自行车" (bicycle), "塑料软管" (plastic hose), "手机壳" (phone case); do not use long descriptive sentences or phrases.items type: MCPInstanceItem[] (lightweight model; internal fields such as search tokens and ranking scores are not exposed)
Request Parameters
ParameterTypeDescription
keywordsstringProduct name keywords
countrystringCountry code: CN / JP / US / EU / VN / MY / BR / MX / ID / CA (default CN)
pageIndexintPage number, starting from 1 (default 1)
pageSizeintItems per page (default 10, max 200)
filterFailureCodeboolWhether to filter invalid codes (default true)
chapterstring?Chapter number (optional, limit to a specific chapter)
Pagination & items Fields
FieldTypeDescription
pageIndexintCurrent page
pageSizeintItems per page
totalPageCountintTotal pages
totalItemCountintTotal items
isPreviousPageboolWhether a previous page exists
isNextPageboolWhether a next page exists
items[].instanceNamestringInstance name (plain text)
items[].instanceEnNamestring?Instance English name
items[].countintAssociated code count
items[].codesarrayAssociated HS codes (flattened from category tree, deduplicated, max 10)
items[].codes[].codestringHS code
items[].codes[].namestringCode name

search_code Response Fields

items type: MCPCodeSearchItem[] (lightweight model, unified across 10 countries; use get_code_detail for the full tariff table and agreement rates)
Request Parameters
ParameterTypeDescription
keywordsstringSearch keywords
countrystringCountry code: CN / JP / US / EU / VN / MY / BR / MX / ID / CA (default CN)
pageIndexintPage number, starting from 1 (default 1)
pageSizeintItems per page (default 10, max 200)
filterFailureCodeboolWhether to filter invalid codes (default true)
analyzerstring?Analyzer (optional, only effective for CN)
Pagination Outer Fields
FieldTypeDescription
pageIndexintCurrent page
pageSizeintItems per page
totalPageCountintTotal pages
totalItemCountintTotal items
isPreviousPageboolWhether a previous page exists
isNextPageboolWhether a next page exists
itemsarrayResult list; the item type depends on country
items Fields (common across 10 countries)
FieldTypeDescription
codestringHS code
namestringProduct name
unit1string?Legal primary unit of measure
unit2string?Legal secondary unit of measure
categoryNamestring?Section (category) name
twoCodestring?Chapter (2-digit code)
twoCodeNamestring?Chapter name
fourCodestring?Heading (4-digit code)
fourCodeNamestring?Heading name
sixCodestring?Subheading (6-digit code)
sixCodeNamestring?Subheading name
taxesobject?Key duty rates (keys vary by country, see below; empty keys are omitted)
statusintStatus: 1=active 2=removed 3=paused
createTimedatetimeCode creation time
updateTimedatetimeCode last update time
taxes Keys (by country)
countryKeyDescription
CNpreferentialImportMFN (preferential) import rate
vatVAT rate
exportTaxRebatesExport tax rebate rate
consumptionConsumption tax rate
USgeneralRateOfDutyGeneral rate of duty
specialRateOfDutySpecial rate of duty
column2RateOfDutyColumn 2 rate of duty
JPgeneralGeneral (base) rate
temporaryTemporary rate
wtoWTO agreement rate
gspGSP preferential rate
EUpreferentialImportMFN import rate (third-country)
provisionalImportProvisional import rate
exportExport rate
VNpreferentialImportPreferential import rate (MFN)
importedOrdinaryOrdinary import rate
exportExport rate
vatVAT rate
consumptionSpecial consumption tax rate
MYpreferentialImportImport rate (MFN)
exportExport rate
sstSST sales tax
exciseEXCISE duty
BR / MX / ID / CAsearch_code does not return a lightweight tax summary (data lives in long tables; load via get_code_detail)

search_unified Response Fields

items type: MCPCiqItem[] / MCPHazardousItem[] / MCPPortItem[] (lightweight models; internal fields such as search tokens are not exposed)
Pagination Outer Fields
FieldTypeDescription
pageIndexintCurrent page
pageSizeintItems per page
totalPageCountintTotal pages
totalItemCountintTotal items
isPreviousPageboolWhether a previous page exists
isNextPageboolWhether a next page exists
itemsarrayResult list; the item type depends on unifiedType
When unifiedType=ciq (MCPCiqItem)
FieldTypeDescription
codestringCIQ code
namestringCIQ name
numberstring?Regulatory condition number
When unifiedType=hazardous (MCPHazardousItem)
FieldTypeDescription
namestringHazardous chemical name
aliasstring?Alias
casstring?CAS number
hsCodestring?Associated HS code
remarksstring?Remarks
When unifiedType=port (MCPPortItem)
FieldTypeDescription
codestringPort code (plain text)
cNamestring?Port Chinese name (plain text)
eNamestring?Port English name (plain text)
countryNamestring?Country name
shippingLineNamestring?Shipping line name

get_code_detail Request & Response Fields

Request parameters
ParameterTypeDescription
codestringHS code; must be a complete declaration code (digits only): CN=10, JP=9, US/EU/CA=10, BR/MX/ID=8, VN=7-8, MY=8-10. Dot separators are allowed (e.g. 8471.30.0000) and are stripped automatically. Incomplete or over-length codes return an error with guidance in the message; if unsure of the full code, search by product name with search_code first
countrystringCountry code: CN / JP / US / EU / VN / MY / BR / MX / ID / CA (default CN)
Return object type: MCPCodeDetailResult (non-paged)
Top-Level Fields
FieldTypeDescription
CountrystringCountry: CN / JP / US / EU / VN / MY / BR / MX / ID / CA
CodestringHS code
NamestringCode name
StatusintStatus value
UpdateTimedatetime?Last update time
Unit1string?Legal primary unit of measure
Unit2string?Legal secondary unit of measure
UnitOfMeasurestring?Unit of measure description
Remarkstring?Remarks
TaxesDictionary<string,string>Tax rate key-value map
ExtensionsobjectPer-country extension object
Common Taxes Keys
CountryExample KeysDescription
CNmfnImportRate, generalImportRate, vatRate, exportTaxRebateRate, specialGoodsMarkChina rate keys
JPgeneral, temporary, wto, rcepChinaJapan rate keys
USgeneralRateOfDuty, specialRateOfDuty, column2RateOfDutyUS rate keys
EUpreferentialImport, provisionalImport, export, importedOrdinary, vat, consumptionEU code-level tax keys
VNpreferentialImport, importedOrdinary, export, vat, consumptionVietnam tax keys
MYpreferentialImport, export, sst, exciseMalaysia tax keys
BR / MX / ID / CANo top-level Taxes keys; tax data lives in Extensions.{Br|Mx|Id|Ca}.AdditionalTaxes (ID/CA also have AgreementRates)
Extensions.Cn
FieldTypeDescription
ReportingarrayDeclaration elements list (MCPCodeItem)
RegulatoryDictionary<string,string>Regulatory conditions map
InspectDictionary<string,string>Inspection and quarantine map
RegulatoryCodesarrayProhibition/restriction control code list (MCPRegulatoryCodeItem)
CiqsarrayCIQ list (MCPCodeItem)
HSMaparrayHS code annotation map (MCPCodeItem)
ExportRebateCodesarrayExport rebate code list (MCPExportRebateCodeItem)
CtDictionary<string,string>Agreement rate map
RcepDictionary<string,string>RCEP rate map
Extensions.Jp
FieldTypeDescription
AgreementRatesDictionary<string,string>Japan agreement rate map
Extensions.Us
FieldTypeDescription
QuotaQuantitystring?Quota quantity
AdditionalDutiesstring?Additional duties description
Extensions.Eu
FieldTypeDescription
AgreementRatesDictionary<string,string>Agreement rates (key = country/region Chinese name, e.g. Switzerland/Japan/Canada/Chile)
GspRatesDictionary<string,string>GSP beneficiary rates
GspPlusRatesDictionary<string,string>GSP+ beneficiary rates
EbaRatesDictionary<string,string>EBA (least-developed countries) rates
VatRatesDictionary<string,string>VAT rates across 27 EU member states
ExciseCategorystring?Excise category (none/alcohol/tobacco/energy)
VatCategorystring?VAT product category (food/pharma/books/other)
Lawstring?Legal basis
StartDatedatetime?Measure start date
EndDatedatetime?Measure end date
AntiDumpingsarrayAnti-dumping/countervailing measures (MCPCodeItem)
TariffQuotasarrayTariff quotas (MCPCodeItem)
ExportMeasuresarrayExport measures (MCPCodeItem)
Extensions.Vn
FieldTypeDescription
AgreementRatesDictionary<string,string>Agreement rates (keys include China/Japan (AJCEP/VJEPA)/Korea (AKFTA/VKFTA)/CPTPP members, etc.)
RcepRatesDictionary<string,string>RCEP rates (14 members)
VatRatesDictionary<string,string>VAT and VAT exemption notes
FtaRatesarrayFTA year-by-year rates (MCPFtaRateItem: Agreement, Country=period label, Rate)
ExportTaxesarrayExport rates (MCPFtaRateItem: Normal/CPTPP/EVFTA/UKVFTA, etc.)
ExciseDutiesarraySpecial consumption tax (MCPCodeItem)
VatNotestring?VAT exemption note (PL1/PL2 non-exemption reasons)
EnvironmentTaxstring?Environment tax note
Policystring?Product policy (quarantine/license/anti-dumping requirements)
EnNamestring?English product description
MappedHSstring?Mapped standard HS code (only for chapter-98 SEN codes)
Extensions.My
FieldTypeDescription
Trqstring?TRQ tariff quota (e.g. "In: 20% Out: 50%")
Sststring?SST sales tax
Excisestring?EXCISE duty
Cess1 / Cess2 / Cess3string?CESS additional taxes 1-3
ImportPermitstring?Import permit
ExportPermitstring?Export permit
FtaRatesarray16 FTA agreement rates aggregated (MCPFtaRateItem: Agreement=ACFTA/RCEP/CPTPP, etc.)
FtaNotesarrayFTA notes (MCPFtaRateItem, Rate field contains note text)
Extensions.Br / Extensions.Mx
FieldTypeDescription
AdditionalTaxesarrayAdditional taxes (MCPAdditionalTaxItem: TaxType/Rate/Period/Remark). BR has both II import rate (TEC) and II import rate (actually applied).
Extensions.Id / Extensions.Ca
FieldTypeDescription
AdditionalTaxesarrayAdditional taxes (MCPAdditionalTaxItem)
AgreementRatesarrayAgreement rates (MCPAgreementRateItem: Agreement/Country/Rate/Period/Remark). CA includes UST/UKT/CPTPT/CPUKT/CEUT/GPT/LDCT/CCCT codes.
Detail Objects
ObjectFieldDescription
MCPCodeItemKeyKey value (code/serial number)
MCPCodeItemValueDisplay text
MCPCodeItemIsRequiredWhether required
MCPRegulatoryCodeItemCodeProhibition/restriction control code
MCPRegulatoryCodeItemNameControl name
MCPRegulatoryCodeItemMofcomcodeMOFCOM code
MCPRegulatoryCodeItemIemarkImport/export flag
MCPRegulatoryCodeItemReportingcategorycodeDeclaration category code
MCPRegulatoryCodeItemReportingElementsDeclaration elements list (MCPReportingElementItem)
MCPReportingElementItemElementnameElement name
MCPReportingElementItemElementorderSort order
MCPExportRebateCodeItemIdRebate extension code
MCPExportRebateCodeItemNameRebate name
MCPExportRebateCodeItemRateRebate rate

create_guilei_form Parameters and Return Values

Creates an HS classification inquiry form; AI can directly submit product information and images (base64-encoded). Each user has an independent daily quota.
Request Example (Standard MCP Endpoint)
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_encoded_image_data""
          }
        ]
      }
    }
  }"
Input Parameters
FieldTypeRequiredDescription
productNameCnstringYesProduct Chinese name
productNameEnstring?NoProduct English name
categoryIdint?NoIndustry category ID; get the available list via list_guilei_categories
usesstring?NoProduct use
ingredientsstring?NoProduct ingredients/material
casstring?NoCAS number
brandstring?NoBrand
modelstring?NoModel
otherProductInfostring?NoOther product information
qqstring?NoQQ contact
weixinstring?NoWeChat contact
processingMethodstring?NoProcessing method
dimensionsstring?NoDimensions
applicableGenderstring?NoApplicable gender
workingPrinciplestring?NoWorking principle
functionstring?NoFunction
weavingProcessstring?NoWeaving process
materialstring?NoMaterial
gramWeightstring?NoGram weight
widthstring?NoWidth
endTimestring?NoDeadline (ISO 8601 format)
isPaidbool?NoWhether this is a paid inquiry
imagesarray?YesImage list (at least 1); each item contains fileName (file name) and data (base64 data)
Image limits: at least 1, at most 3, each ≤ 1MB; JPG / PNG / GIF / WebP formats supported (validated via file-header magic numbers, not file extensions).
Success Response Example
The following is the data portion returned by the tool: located at result.structuredContent for the standard MCP endpoint, and at data for the legacy REST endpoint.
{
  "formId": "a1b2c3d4-...",
  "url": "https://www.hsciq.com/GuiLei/a1b2c3d4-...",
  "status": "已创建",
  "imageCount": 1,
  "imageUrls": [ "https://www.hsciq.com/uploads/guilei/..." ]
}
Response Fields
FieldTypeDescription
formIdstringGUID of the created classification inquiry form
urlstringFull access URL of the inquiry form
statusstringCreation status: 已创建 (Created)
imageCountintNumber of successfully uploaded images
imageUrlsstring[]Public access URL list of the images

get_guilei_form Parameters and Return Values

Gets the details of a classification inquiry form, including discussion dialogs for all fields, the classification conclusion, and more. AI can use this to learn on which fields experts have raised questions.
Request Example (Standard MCP Endpoint)
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-...""
      }
    }
  }"
Input Parameters
FieldTypeRequiredDescription
formIdstringYesClassification inquiry form GUID
Return Value
Returns a GuiLeiFormDetail object with the following top-level fields:
FieldTypeDescription
formobjectBasic information of the classification form; core fields are listed in the table below
aclarrayAccess control list
dialogsarrayPer-field discussion dialog list; each item contains fieldKey (field name) and messages (message list)
sharesarrayShare link list
finalizationobject?Classification conclusion (contains confirmedCode and classificationReason)
finalizationHistoryarrayClassification conclusion revision history
Dialogs Message Structure
FieldTypeDescription
idstringDialog ID
fieldKeystringAssociated field name (e.g. ProductNameCn, Ingredients)
messages[].senderIdstringMessage sender ID
messages[].contentstringMessage content
messages[].createTimedatetimeMessage time
messages[].messageTypeint?Message type
form Core Fields
FieldTypeDescription
idstringForm GUID
statusintStatus: 0=Closed, 1=In progress
productNameCnstring?Product Chinese name
productNameEnstring?Product English name
categoryIdint?Industry category ID
categoryNamestring?Industry category name
usesstring?Use
ingredientsstring?Ingredients/material
casstring?CAS number
brandstring?Brand
modelstring?Model
isPaidboolWhether this is a paid inquiry
isFinalizedboolWhether a classification conclusion has been issued
confirmedCodestring?Final confirmed HS code
isUnclassifiableboolWhether unclassifiable
sourcestring?Source (mcp means created via API)
createTimedatetimeCreation time
updateTimedatetimeLast update time

list_my_guilei_forms Parameters and Return Values

Paged listing of all classification inquiry forms owned by the user associated with the current API key.
Request Example (Standard MCP Endpoint)
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"": 10
      }
    }
  }"
Input Parameters
FieldTypeRequiredDefaultDescription
pageIndexint?No1Page number
pageSizeint?No10Items per page, max 100
Success Response Example
The following is the data portion returned by the tool: located at result.structuredContent for the standard MCP endpoint, and at data for the legacy REST endpoint.
{
  "items": [
    {
      "id": "a1b2c3d4-...",
      "productNameCn": "智能手机壳",
      "status": 1,
      "isFinalized": false,
      "createTime": "2026-05-08T10:30:00"
    }
  ],
  "pageIndex": 1,
  "pageSize": 10,
  "totalItemCount": 3,
  "totalPageCount": 1
}
Response Fields
FieldTypeDescription
itemsarrayForm list; each item is a GuiLeiForm object
pageIndexintCurrent page
pageSizeintItems per page
totalItemCountintTotal items
totalPageCountintTotal pages
For the fields of each object in items, see the "form Core Fields" table under get_guilei_form above.

add_guilei_dialog_message Parameters and Return Values

Creates a new dialog on a field of a classification inquiry form, or replies to an existing dialog. AI can use this tool to answer experts' questions on behalf of the user.
Request Example (Create New Dialog, Standard MCP Endpoint)
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"": ""主要成分是聚乙烯,不含阻燃剂""
      }
    }
  }"
Request Example (Reply to Existing Dialog, arguments Part Only)
"arguments": {
  "formId": "a1b2c3d4-...",
  "fieldKey": "Ingredients",
  "content": "已确认,确实不含阻燃剂",
  "dialogId": "d5e6f7a8-..."
}
Input Parameters
FieldTypeRequiredDescription
formIdstringYesClassification inquiry form GUID
fieldKeystringYesField name (e.g. ProductNameCn, Uses, Ingredients, Cas, Brand, Model, OtherProductInfo, etc.)
contentstringYesMessage content
dialogIdstring?NoIf provided, replies to the existing dialog; otherwise creates a new dialog
messageTypeint?NoMessage type, passed through to the backend
Success Response Example
The following is the data portion returned by the tool: located at result.structuredContent for the standard MCP endpoint, and at data for the legacy REST endpoint.
{
  "dialogId": "d5e6f7a8-...",
  "messageId": "b9c0d1e2-...",
  "action": "reply"
}
Response Fields
FieldTypeDescription
dialogIdstringDialog ID
messageIdstringMessage ID
actionstringAction type: created (new dialog created) or reply (reply to an existing dialog)

list_guilei_categories Parameters and Return Values

Gets the available industry category list, used to select categoryId when creating a classification inquiry form.
Request Example (Standard MCP Endpoint)
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"": {}
    }
  }"
No input parameters required.
Success Response Example
The following is the data portion returned by the tool: located at result.structuredContent for the standard MCP endpoint, and at data for the legacy REST endpoint.
[
  { "id": 1, "name": "活动物;动物产品" },
  { "id": 2, "name": "植物产品" },
  { "id": 3, "name": "动、植物油脂" }
]
Response Fields
FieldTypeDescription
idintIndustry category ID, used as the categoryId parameter of create_guilei_form
namestringIndustry category name

search_gonggao Parameters and Return Values Standard MCP Endpoint Only

Searches customs announcements (fuzzy match on title / document number / content). When keywords is empty, returns the latest announcements ordered by publish time descending. Filterable by publish date range. Customs announcements are public data.
Request Parameters
ParameterTypeDescription
countrystringRequired. Country code: CN (US/JP reserved but not yet onboarded; customs announcements currently CN-only; US/JP return country_not_supported)
keywordsstring?Search keyword matching title / document number / content; leave empty to get the latest announcements
pageIndexintPage number, starting from 1 (default 1)
pageSizeintItems per page (default 10, max 50)
publishFromstring?Publish date from (yyyy-MM-dd, inclusive)
publishTostring?Publish date to (yyyy-MM-dd, inclusive)
Paging Envelope Fields
FieldTypeDescription
pageIndexintCurrent page
pageSizeintItems per page
totalPageCountintTotal pages
totalItemCountintTotal items
itemsarrayAnnouncement list (note: the announcement tools do not return isPreviousPage/isNextPage)
items Fields (announcement object; the gonggao field in get_gonggao_detail / get_gonggao_by_code has the same structure)
FieldTypeDescription
idintAnnouncement ID (used as the gonggaoId parameter of get_gonggao_detail)
titlestringAnnouncement title
contentstringAnnouncement body (HTML; may be a content snippet when matched by search)
fromstringSource
documentNumberstring?Document number
regulationsTypestring?Regulation type
publishTimedatetime?Publish time
effectiveTimedatetime?Effective time
potencestring?Legal effect status
documentIssuingAgencystring?Issuing agency
sourceUrlstring?Original URL (China Customs regulation library)
createTimedatetimeRecord creation time
updateTimedatetimeRecord update time

get_gonggao_detail Parameters and Return Values Standard MCP Endpoint Only

Gets a customs announcement by ID, including the body and 3 groups of related HS codes (created / updated / deleted).
Request Parameters
ParameterTypeDescription
gonggaoIdintRequired. Announcement ID (the id returned by search_gonggao)
countrystringRequired. Country code: CN (US/JP reserved but not yet onboarded; currently CN-only)
Returns a single object (not paged). Returns not_found if the announcement does not exist or is offline.
Top-Level Fields
FieldTypeDescription
gonggaoobjectAnnouncement object (same fields as search_gonggao items)
codeGroupsobjectRelated HS codes in 3 groups (see table below)
codeGroups Fields
FieldTypeDescription
createdstring[]Newly created codes (ascending)
updatedstring[]Modified codes
deletedstring[]Deleted codes
totalCountintTotal across the 3 groups

get_gonggao_by_code Parameters and Return Values Standard MCP Endpoint Only

Reverse lookup by HS code: returns announcements related to the given code; each item includes changeType (the code's change type in that announcement).
Request Parameters
ParameterTypeDescription
codestringRequired. CN 10-digit HS code (digits only; dot separators such as 8471.30.0000 are stripped automatically)
countrystringRequired. Country code: CN (US/JP reserved but not yet onboarded; currently CN-only)
pageIndexintPage number, starting from 1 (default 1)
pageSizeintItems per page (default 10, max 50)
Paging Envelope Fields
FieldTypeDescription
pageIndexintCurrent page
pageSizeintItems per page
totalPageCountintTotal pages
totalItemCountintTotal items
itemsarrayResult list (see table below)
items Fields
FieldTypeDescription
gonggaoobjectAnnouncement object (same fields as search_gonggao items)
changeTypestringThe code's change type in that announcement: create / update / delete

list_ocean_carriers Parameters & Return Values Standard MCP endpoint only

Lists enabled ocean carriers (SCAC code / name). The returned code can be used as the carrierCode filter of search_ocean_carrier_notice. No parameters.
Return fields (array, non-paged)
FieldTypeDescription
codestring?Carrier abbreviation / SCAC code (e.g. MSC, MSK; null when unavailable)
namestringCarrier name

search_ocean_carrier_notice Parameters & Return Values Standard MCP endpoint only

Searches ocean carrier notices (title match only). When keywords is empty, returns the latest notices ordered by publish time descending. Only notices published within the last 30 days are returned (rolling window, enforced server-side). Notices are public data and always returned in their original language.
Request parameters
ParameterTypeDescription
keywordsstring?Search keywords, matched against notice titles only; leave empty for the latest list
carrierCodestring?Carrier SCAC code (e.g. MSC/MSK, case-insensitive; see code from list_ocean_carriers); returns invalid_params if not found
pageIndexintPage number, starting from 1 (default 1)
pageSizeintItems per page (default 10, max 50)
Paged wrapper fields
FieldTypeDescription
pageIndexintCurrent page
pageSizeintItems per page
totalPageCountintTotal pages
totalItemCountintTotal items
itemsarrayNotice list (note: announcement tools do not return isPreviousPage/isNextPage)
items fields (notice object; same structure as the notice field in get_ocean_carrier_notice_detail)
FieldTypeDescription
idstring (guid)Notice ID (used as the noticeId parameter of get_ocean_carrier_notice_detail)
carrierCodestring?Carrier SCAC code
carrierNamestring?Carrier name
titlestringNotice title (original language)
contentstringNotice body (HTML, original language)
originalLanguagestringOriginal language (zh-CN / en / ja / pt-BR / ru)
publishTimedatetimePublish time
sourceUrlstring?Original URL
createTimedatetimeRecord creation time
updateTimedatetimeRecord update time

get_ocean_carrier_notice_detail Parameters & Return Values Standard MCP endpoint only

Gets an ocean carrier notice by ID (including body in original language). Only notices published within the last 30 days are supported; returns not_found when the notice does not exist, is disabled, or is out of range.
Request parameters
ParameterTypeDescription
noticeIdstring (guid)Required, notice ID (the id returned by search_ocean_carrier_notice)
Top-level fields (non-paged)
FieldTypeDescription
noticeobjectNotice object (same fields as search_ocean_carrier_notice items)

Error Codes

401-type errors are identical on both endpoints (HTTP 401). 400/429/500-type errors are returned with the HTTP status codes in the table below on the legacy REST endpoint; on the standard MCP endpoint they return HTTP 200 per the protocol, with isError=true in the result and error text prefixed with an error code (e.g. daily_quota_exceeded: 每日调用次数已达上限(150次)).
HTTP error Meaning
401missing_api_keyAPI key not provided
401invalid_api_keyInvalid API key
401api_key_expiredAPI key expired
401api_key_revokedAPI key revoked
400invalid_paramsInvalid parameters (e.g. productNameCn is empty, unsupported image format, etc.)
400forbidden_keywordKeyword triggered blocking
400unknown_toolUnsupported tool name
404not_foundResource does not exist or is offline (e.g. unknown announcement ID)
400country_not_supportedThis country has not been onboarded for the data (customs announcements currently CN only)
429daily_quota_exceededDaily total call limit reached
429daily_guilei_quota_exceededDaily classification inquiry creation limit reached (default: 5)
500internal_errorInternal server error

GET /mcp Deprecated

Returns service metadata and tool entry points. The REST API uniformly returns JSON; the success structure is { "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 Deprecated

Returns the available tools and input parameter definitions.
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 (get_code_detail) Deprecated

Returns a non-paged detail object by country + code.
{
  "toolName": "get_code_detail",
  "arguments": {
    "country": "CN",
    "code": "3926909090"
  }
}
For detailed response fields, see the get_code_detail tool section above.