Skip to main content
Glama

tariff-resolver

npm version CI coverage: ≥95% lines, CI-enforced npm downloads node MCP Registry license: MIT

MCP-сервер, который превращает вашего ИИ-ассистента в инструмент для исследования импортных пошлин США — на основе официальных данных Гармонизированного тарифного расписания USITC (общественное достояние правительства США, более 35 000 тарифных позиций).

  • 🔍 Кандидаты кодов HTS из простых описаний товаров, со ссылками на решения CBP CROSS

  • 🧮 Компоненты полной стоимости: базовые ставки MFN/FTA + дополнительные пошлины главы 99 (IEEPA / Section 301 / 232) + сборы MPF/HMF

  • 📡 Отслеживание изменений тарифов: добавьте коды HTS в список наблюдения, сравните ставки между редакциями HTS

  • 🤖 Оптимизировано для ИИ, устойчиво к галлюцинациям: возвращает фактический текст правил главы 99 с разобранными ставками, чтобы ваша LLM рассуждала на основе реальных цепочек исключений, а не выдумывала цифры 2024 года

Демо: расчёт пошлин для вакуумной фляги из Китая, затем смена товара и страны происхождения — весь стек главы 99 пересчитывается в реальном времени

Почему сейчас: после отмены исключения de minimis (29 августа 2025 года) каждая поставка в США требует кода HTS и уплаты пошлины — а ставки 2025–26 годов постоянно меняются по указам президента.

Не аффилирован с каким-либо государственным органом. Результаты — это кандидаты/оценки для предварительной проверки брокером, а не таможенная, юридическая или налоговая консультация. Оценки не включают антидемпинговые и компенсационные пошлины (AD/CVD).

Установка

Требуется Node.js ≥ 18.

claude mcp add tariff-resolver -- npx -y tariff-resolver

Или в конфигурации любого MCP-клиента:

{ "mcpServers": { "tariff-resolver": { "command": "npx", "args": ["-y", "tariff-resolver"] } } }

Related MCP server: mcp-sputnikx-market

💡 Попробуйте эти запросы

  • Базовый поиск: «Найдите код HTS для мужской футболки из 100% хлопка».

  • Полный сценарий: «Рассчитайте тарифный сценарий для HTS 6109.10.00, страна происхождения Китай, таможенная стоимость $5 000, морская перевозка».

  • Решение о закупке: «Я импортирую вакуумные фляги из нержавеющей стали на $10 тыс. Сравните полную стоимость при закупке из Китая и Вьетнама».

  • Будьте в курсе: «Отслеживайте изменения тарифов для моего каталога: 6109.10.00, 8507.60.00, 9617.00.10».

Инструменты

Инструмент

Что делает

search_hs_candidates

Описание товара → лучшие кандидаты HTS со ставками и ссылками на решения CBP CROSS

calculate_tariff_scenario

Код HTS + страна происхождения + стоимость (+ вес) → структурированный JSON: базовая ставка MFN/FTA, активные правила главы 99 (со ссылками на сноски / по происхождению / универсальные, прекращённые правила отфильтрованы), MPF/HMF

watch_tariff_changes

Регистрация кодов HTS в локальном списке наблюдения

check_tariff_updates

Сравнение текущей и предыдущей редакций HTS — увидьте, какие именно ставки изменились

dataset_info

Дата редакции данных, количество строк, источник, лицензия

Дизайн

Сервер выполняет поиск; ваша LLM занимается рассуждением. Правила главы 99 возвращаются дословно (с разобранным adder_pct, где применимо), чтобы модель читала реальные цепочки исключений, а не доверяла вычислениям «чёрного ящика». Ставки для 10-значных статистических суффиксов наследуются от родительской строки ставки. Прекращённые положения отфильтровываются и подсчитываются.

Данные

Поставляется с полным снимком HTS, полученным из официального JSON API USITC (общественное достояние правительства США). Обновление в любое время:

python3 scripts/fetch_hts.py   # ~2 min, fails hard rather than write a partial dataset

dataset_info сообщает дату редакции, по которой выполняются ваши запросы.

Лицензия

MIT. Тарифные данные являются работой правительства США (общественное достояние).

Available Tools

5 tools
calculate_tariff_scenarioCalculate tariff scenarioA
Read-only

Returns the HTS code's MFN/FTA base rate, ALL active chapter 99 rules (IEEPA/301/232 additional duties) matching the origin as verbatim text, and MPF/HMF fees. The LLM should walk the chapter-99 exception chains itself to stack the right duty layers, explain each step to the user, and always note this is an estimate.

ParametersJSON Schema
NameRequiredDescriptionDefault
hts_codeYes8-10 digit HTS code, with or without dots
quantityNoQuantity in the code's units (No./Dz Pcs...) — needed for per-piece specific duties
weight_kgNoTotal weight (kg) — REQUIRED when the code carries a specific duty per kg (e.g. '12.4¢/kg')
ocean_freightNoOcean shipment? (applies HMF)
origin_countryYesCountry of origin (English name, e.g. 'China', 'Vietnam', 'Mexico')
customs_value_usdYesCustoms value of the shipment (USD)

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnlyHint=true. The description adds important behavior beyond that: it returns chapter-99 rule text verbatim rather than a final computed rate, instructs the LLM to walk exception chains itself, and requires the output to be labeled as an estimate. This is useful and non-obvious behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact: the first sentence enumerates return values, and the second captures the agent workflow and estimate caveat. Every sentence adds meaningful guidance without filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but the description explains the output categories and tells the LLM how to use and present the results. It does not specify an exact response shape, but that is not essential for correct invocation given the parameter schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all six parameters adequately. The description adds no parameter-level detail beyond mentioning origin and HTS code, which keeps this at the baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Returns') and names concrete outputs: MFN/FTA base rate, active chapter 99 rules, and MPF/HMF fees. This clearly distinguishes the tool from sibling tools like search_hs_candidates, watch_tariff_changes, and check_tariff_updates.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context that the tool is for computing a tariff scenario from an HTS code and origin, and includes explicit procedural guidance for the LLM. It does not explicitly say when NOT to use it or name alternatives, so it misses the highest bar.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

check_tariff_updatesCheck tariff changes between revisionsD
Read-only

Compares the current HTS snapshot with the previously fetched one. Call without codes to check the whole watchlist. Returns each change: code, column (general/special/other/additionalDuties), old → new value.

ParametersJSON Schema
NameRequiredDescriptionDefault
hts_codesNoLimit to these codes (default: the watchlist)

TDQS

D1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description fails to reveal any behavioral aspects, and the annotation readOnlyHint=true suggests safe operation, but the description adds no clarity on side effects or authorization needs. Without a description, behavioral transparency is entirely absent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

With zero words, it is concise but lacks substance, making the criterion 'appropriate length relative to purpose'. The description has no structure to evaluate, so it cannot be effective.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 1-parameter helper tool, the description is empty, failing to cover required behaviors like whether it mutates state or how to use it. The description is absent, so it cannot be complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema includes one parameter, but the description gives no insight into its meaning beyond the schema itself. The schema description is decent, but the description should complement it. No added value is provided beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description is absent, so it cannot describe the purpose with a verb and resource. It does not differentiate the tool from siblings. The title and name provide some clues, but the description itself is missing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives is provided. The description is empty, leaving the AI without instructions on when to invoke it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

dataset_infoDataset infoA
Read-only

Fetch date, source, license, row counts — use to check data freshness.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The readOnlyHint annotation already signals this is a safe read operation, and the description aligns with that by saying 'Fetch.' It adds modest context by listing the returned dataset attributes (date, source, license, row counts), but does not go beyond that with additional behavioral details such as output formatting or freshness semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, information-dense sentence with no filler. The main purpose and the usage guidance are both front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a simple, zero-parameter metadata retrieval tool. The description covers what it returns and why to use it, and the readOnlyHint covers safety. Nothing essential is missing for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the baseline is 4. There is nothing for the description to clarify about parameters, and the schema already confirms an empty parameter set.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Fetch') and identifies the exact resource contents: date, source, license, and row counts. This clearly distinguishes it from sibling tools like search_hs_candidates and calculate_tariff_scenario, which perform different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives concrete usage context: 'use to check data freshness.' It does not explicitly state exclusions or compare against alternatives, but the intended scenario is clear enough for an agent to decide when to call it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_hs_candidatesSearch HTS code candidatesA
Read-only

Returns top 8-10 digit HTS code candidates (with MFN/FTA rates and CBP CROSS ruling links) for a product description. Results are CANDIDATES for pre-broker screening, not a classification ruling. IMPORTANT: the HTS uses legal terminology, not trade names — BEFORE CALLING, rewrite the product description into HTS-style material + use nouns (e.g. 'pink kids backpack' → 'travel bags of man-made fibers'; 'water bottle' → 'vacuum flask' or 'bottle of plastics'). If you get 0 results, retry with 2-3 different phrasings.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of candidates
product_descriptionYesProduct description in English: material, use, composition (e.g. 'stainless steel insulated water bottle 500ml')

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=true and openWorldHint=false, and the description adds substantial behavioral context beyond that: it cautions that results are 'CANDIDATES' and not legal rulings, explicitly warns about the HTS's use of 'legal terminology,' and describes the expected retry behavior on zero results. This transparency goes beyond just the read-only nature and helps the agent manage expectations about output reliability.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is tightly written, using sentence case and a clear structure: what it does, a caution, a concrete instruction, and a fallback. The 'IMPORTANT:' emphasis and examples are efficient, though the paragraph could slightly overwhelm new users. Every sentence adds value without fluff, so a 4 is appropriate.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with only two parameters and no output schema, the description covers all necessary context: input format, expected output, limitations, and error handling. It prepares the agent for edge cases (0 results) and clarifies the tool's role within the larger suite. No critical information is missing for it to be invoked correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents both parameters with 100% coverage (product_description and limit). The description adds high-value guidance for product_description by giving concrete rewriting examples ('pink kids backpack' → 'travel bags of man-made fibers') and explaining the need for legal/material-based nouns. This extra semantic layer justifies a score above the baseline of 3. The limit parameter is fully specified in the schema, so no additional info needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Returns top 8-10 digit HTS code candidates … for a product description.' It clearly differentiates itself from a 'classification ruling' and includes concrete details (MFN/FTA rates, CBP CROSS ruling links). This distinguishes it well from sibling tools like 'calculate_tariff_scenario' or 'watch_tariff_changes' by focusing on the candidate search use case.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance is given on how to prepare input ('rewrite the product description into HTS-style material + use nouns') and how to handle empty results ('retry with 2-3 different phrasings'). It also clarifies the tool is for 'pre-broker screening, not a classification ruling,' which sets expectations. However, it doesn't explicitly name when to prefer a sibling tool, and the 'when not' is only implied by the disclaimer, not fully elaborated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

watch_tariff_changesWatch HTS codes for tariff changesA
Idempotent

Saves HTS codes (with optional origin) to a local watchlist. After each dataset refresh, call check_tariff_updates to see whether the rates on these codes changed. This is how you track 2025-2026 tariff volatility without manual re-checking.

ParametersJSON Schema
NameRequiredDescriptionDefault
hts_codesYes8-10 digit HTS codes to watch
origin_countryNoShared origin for the shipment (optional)

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate it's a write operation (readOnlyHint=false) and idempotent. The description adds the workflow context (that rates are tracked across dataset refreshes) and specifies the local watchlist, going beyond what the annotations alone convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences. The first sentence states the action; the second sentence provides the workflow and context. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (2 params, no output schema), and the description covers the purpose, the workflow (call check_tariff_updates after refresh), and the context (tracking tariff volatility). It doesn't discuss edge cases, but those aren't expected for this simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already fully documents both parameters with descriptions (100% coverage). The description's mention of 'optional origin' mirrors the schema description for origin_country, adding little novelty. It doesn't compensate beyond the existing schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Saves') with a clear resource (HTS codes to a watchlist) and scope. It differentiates from siblings like check_tariff_updates by stating this tool does the saving while the sibling does the checking.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states the workflow: save codes first, then call check_tariff_updates after each dataset refresh. This gives clear context for when to use the tool, though it does not explicitly state when not to use it or mention alternative tools for code search/calculation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv1.0.2
    • Changedcalculate_tariff_scenario6 fields changed
      • changedInput schema / properties / customs_value_usd / description
        Previous value: -"Trị giá hải quan lô hàng (USD)"New value: +"Customs value of the shipment (USD)"
      • changedInput schema / properties / hts_code / description
        Previous value: -"Mã HTS 8-10 số, có chấm hay không đều được"New value: +"8-10 digit HTS code, with or without dots"
      • changedInput schema / properties / ocean_freight / description
        Previous value: -"Hàng đi đường biển? (áp HMF)"New value: +"Ocean shipment? (applies HMF)"
      • changedInput schema / properties / origin_country / description
        Previous value: -"Nước xuất xứ (tên tiếng Anh, vd 'China', 'Vietnam', 'Mexico')"New value: +"Country of origin (English name, e.g. 'China', 'Vietnam', 'Mexico')"
      • changedInput schema / properties / quantity / description
        Previous value: -"Số lượng theo đơn vị của mã (No./Dz Pcs...) — cần cho thuế đặc thù theo chiếc"New value: +"Quantity in the code's units (No./Dz Pcs...) — needed for per-piece specific duties"
      • changedInput schema / properties / weight_kg / description
        Previous value: -"Tổng trọng lượng (kg) — BẮT BUỘC nếu mã có thuế đặc thù theo kg (vd '12.4¢/kg')"New value: +"Total weight (kg) — REQUIRED when the code carries a specific duty per kg (e.g. '12.4¢/kg')"
    • Changedcheck_tariff_updates1 field changed
      • changedInput schema / properties / hts_codes / description
        Previous value: -"Giới hạn vào các mã này (mặc định: watchlist)"New value: +"Limit to these codes (default: the watchlist)"
    • Changedsearch_hs_candidates2 fields changed
      • changedInput schema / properties / limit / description
        Previous value: -"Số ứng viên"New value: +"Number of candidates"
      • changedInput schema / properties / product_description / description
        Previous value: -"Mô tả sản phẩm tiếng Anh: chất liệu, công dụng, thành phần (vd 'stainless steel insulated water bottle 500ml')"New value: +"Product description in English: material, use, composition (e.g. 'stainless steel insulated water bottle 500ml')"
    • Changedwatch_tariff_changes2 fields changed
      • changedInput schema / properties / hts_codes / description
        Previous value: -"Danh sách mã HTS 8-10 số cần theo dõi"New value: +"8-10 digit HTS codes to watch"
      • changedInput schema / properties / origin_country / description
        Previous value: -"Xuất xứ chung của lô hàng (tùy chọn)"New value: +"Shared origin for the shipment (optional)"
  2. 5 tool updatesv1.0.1
    • First observedcalculate_tariff_scenario
    • First observedcheck_tariff_updates
    • First observeddataset_info
    • First observedsearch_hs_candidates
    • First observedwatch_tariff_changes

TDQS

B3.2/5.0
Disambiguation5/5

Each tool has a clearly distinct role: candidate search, detailed scenario calculation, watchlist management, update checking, and dataset metadata. Even the paired watch/check tools are unambiguous because one saves codes and the other compares snapshots.

Naming Consistency4/5

Four tools follow a consistent verb_noun pattern: search_hs_candidates, calculate_tariff_scenario, watch_tariff_changes, check_tariff_updates. dataset_info breaks the pattern as a noun-only name, which is a minor deviation but not confusing.

Tool Count5/5

Five tools is well-scoped for a focused tariff-resolution server. Each tool covers a distinct part of the workflow without redundancy or unnecessary breadth.

Completeness4/5

The core workflow is covered: search candidates, calculate duty scenarios, track changes, and verify data freshness. A minor gap is that watch_tariff_changes has no corresponding unwatch or list-watchlist tool, so watchlist management is slightly incomplete.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides access to US Census Bureau International Trade data, enabling querying trade statistics through natural language using ask_pipeworx.
    14
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to search EU/French customs codes, get duty rates, and monitor tariff changes via natural language, using the DouaneCode API.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/opsloft/tariff-resolver'

If you have feedback or need assistance with the MCP directory API, please join our Discord server