Usitc Tariffs Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.1.2更新於 Oct 26, 2026

Search USITC tariff schedules, inspect heading trees, and look up published duty rates.

已驗證Streamable HTTP可網頁執行金融商業與電商

概覽

AI 產生的概覽

檢索美國國際貿易委員會(USITC)協調關稅表,讓助理查詢商品描述、稅則標題階層與已公布的關稅稅率欄位。

可以做什麼
  • 依商品描述或 HTS 編碼前綴搜尋,回傳攤平的已公布符合項目
  • 檢視四、六或八位稅則標題及其上層、下層與繼承稅率來源
  • 依章節瀏覽標題,並提供稅率列與統計列數量
  • 查詢精確八位或十位稅號的一般、特別與第 2 欄基礎稅率
  • 研究第 99 章附加關稅的候選項目與支撐註釋段落
  • 解讀識別碼格式、計畫符號、章節、計量單位與版本中繼資料
適用情境
適合關稅與貿易法規遵循的調查:為產品查找 HTS 編碼、閱讀已公布的基礎稅率,或蒐集第 99 章證據。它僅是研究輔助,不構成歸類結論、優惠資格判定或合併關稅計算。
執行需求
可使用公開託管端點(免安裝、免帳號),或透過 npx 在本機執行,需 Node.js v24+(原始碼建置需 Bun v1.4.0+)。需要能連線至 USITC 的 HTS 網站,不需 API 金鑰。選用的框架變數可設定傳輸方式、主機、連接埠、端點路徑、驗證模式與日誌等級。
安裝前請注意
回傳的是附版本與擷取時間的已公布來源資料,但上游介面沒有公開文件,請求可能需要重試。第 99 章的涵蓋範圍明確為部分涵蓋,候選為空並不代表沒有附加關稅;沒有任何工具會計算合併關稅、疊加或目前可執行性。法律適用性須對照法律註釋及現行 CBP 或聯邦公報指引確認。若將自架的 HTTP 執行個體公開曝光,應先設定驗證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Usitc Tariffs Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Fusitc-tariffs-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "usitc-tariffs": {
      "type": "http",
      "url": "https://usitc-tariffs.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/usitc-tariffs-mcp-server

Search USITC tariff schedules, inspect heading trees, and look up published duty rates via MCP. STDIO or Streamable HTTP.

6 Tools • 0 Resources • 0 Prompts


Overview

The U.S. Harmonized Tariff Schedule from the USITC. Search commodity descriptions, inspect classification ancestry, read published base duty columns, and investigate partial Chapter 99 evidence. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above; no upstream account or API key is required.

Tools

ToolDescription
usitc_search_htsSearch descriptions and code prefixes as flat published matches
usitc_get_headingInspect classification ancestry, descendants, and inherited-rate sources
usitc_browse_chapterBrowse chapter headings with rate-line and statistical-line counts
usitc_lookup_duty_rateRetrieve every published base duty column for an exact rate or statistical line
usitc_check_additional_dutiesResearch Chapter 99 candidates, evidence, and complete supporting passages
usitc_list_referenceDecode identifiers, program symbols, chapters, units, and edition metadata

Capability reference

usitc_search_hts tool

  • Required query: commodity text or a code prefix. limit defaults to 25, with at most 100 items per page; follow page.nextCursor with the same arguments.
  • Returns context: "flat_search_matches" and rows with ratesResolved: false. Use heading lookup for ancestry and duty lookup for resolved base columns; no matches is a successful empty result.

usitc_get_heading tool

  • Required code: four, six, or eight digits, bare or conventionally dotted. Optional returned nodeId selects an exact node; limit defaults to 25, at most 100 per page.
  • Returns flat source-order nodes with parentId, executable parentFollowUp, and resolvedRates states of published, inherited, or not_published. Unnumbered superior rows remain part of the hierarchy; published subchapter titles are preserved separately in sections. A missing classification returns found: false.

usitc_browse_chapter tool

  • Required chapter: 01–99, accepting one or two digits. limit defaults to 25, at most 100 entries per page.
  • Returns complete rateLineCount and statisticalLineCount per published subtree, counting a unique combined row's eight-digit relationship once. Published subchapter markers group following headings. Chapters 98 and 99 retain their actual numbered entries; grouping stays absent without a verified marker, and reserved chapters can return an empty collection.

usitc_lookup_duty_rate tool

  • Required eight- or ten-digit code; optional ISO alpha-2 countryCode. Identifiers retain leading zeros and accept conventional dots. An absent eight-digit row resolves only through its unique published ten-digit row, preserving the source number; ambiguous suffixes remain unresolved. Ten-digit requests require their exact published number.
  • Returns General, Special, and Column 2 cells with rate-source provenance, or found: false. Blank statistical cells inherit only from the matching eight-digit legal ancestor; blank never means zero or Free.
  • specialPrograms preserves unmatched text and parseCoverage; Special-program membership remains unknown, and eligibility and column selection remain not_determined. With countryCode, countryAssessment.column2Listing reports membership in the reviewed General Note 3(b) list for its pinned edition, or unknown when editions differ. Country input does not select a rate or establish preference qualification.

usitc_check_additional_duties tool

  • Required exact eight- or ten-digit base commodity code, excluding Chapter 99; optional countryCode. view is candidates (default), evidence (requires returned candidateCode), or unmapped. limit defaults to 25, at most 100 per page.
  • coverage.status is always partial; inspect supportedGrammar, limitations, and unresolved evidence. Candidate legalStatus is not_determined. Unknown and different-country evidence remains visible; an empty candidate list never establishes clearance.
  • Explicit “following” clauses can link directly owned numbered code lists to their governing heading, with separate passage follow-ups. Descriptive items remain qualified context. Reviewed single-country “product(s) of China” or “product(s) of Canada” scopes can label country relations; exceptions, conditions and conflicting scopes remain unknown.
  • Follow returned nextCall and evidence followUp objects. For passages, supply noteId and optional noteCursor with the original code/country selectors, omitting view, candidateCode, and collection cursor; concatenate all notesPage.fragments across pages and inspect governing context.

usitc_list_reference tool

  • Required topic: identifiers, spi, chapters, units, or releases. limit defaults to 25, at most 100 entries per page.
  • Program and unit decoders carry their verification edition and citations. SPI country membership remains unknown; release records describe published editions without enabling historical tariff lookup.

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

USITC-specific:

  • Keyless access to the HTS application's undocumented interfaces, with paced requests and bounded retries.
  • Published descriptions, rate strings, units, sparse fields, and footnotes preserved alongside legal ancestry.
  • Edition-pinned Special Program Indicator decoding and partial Chapter 99 evidence research.
  • No conclusive classification, preference qualification, duty stacking, combined-duty calculation, or current-enforceability determination. Confirm legal applicability against legal notes and current CBP/Federal Register guidance.

Agent-friendly output:

  • Provenance — every result carries release, source, and notices; edition checks prevent detected cross-edition mixing, but do not prove atomic publication or current law.
  • Complete continuation — pages expose total, returned, effectiveLimit, and nextCursor; a 24,000-byte complete-reply budget can reduce page size with budgetLimited: true. Cursors bind the original arguments and source snapshot, expire within 15 minutes, and can expire earlier after eviction or restart.
  • Explicit uncertainty — found, rate states, partial coverage, and typed error reasons support branching without guessing. Restart the original call without cursors after cursor_expired; fix selectors after invalid_cursor or invalid_selector.
  • Matching response surfaces — content[] and structuredContent carry the same selected data; published source text is framed as data rather than instructions.

Getting started

Connect to the hosted instance, no install:

sh
claude mcp add --transport http usitc-tariffs-mcp-server https://usitc-tariffs.caseyjhand.com/mcp

Or run it locally:

sh
claude mcp add usitc-tariffs-mcp-server -- npx -y @cyanheads/usitc-tariffs-mcp-server

For other clients, add this to the MCP config file:

json
{  "mcpServers": {    "usitc-tariffs-mcp-server": {      "command": "npx",      "args": ["-y", "@cyanheads/usitc-tariffs-mcp-server"]    }  }}

No API key is required. For Docker or a source build, see Running the server.

Configuration

VariableDescriptionDefault
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_HOSTHTTP bind address.127.0.0.1
MCP_HTTP_PORTHTTP server port.3010
MCP_HTTP_ENDPOINT_PATHMCP endpoint path./mcp
MCP_SESSION_MODEHTTP session mode: stateless, stateful, or auto.stateless
MCP_AUTH_MODEAuthentication: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (debug, info, warning, error, etc.).info
LOGS_DIRDirectory for log files (Node.js only).<app-root>/logs
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1. Tariff snapshots stay in process regardless.in-memory
OTEL_ENABLEDEnable OpenTelemetry.false

No server-specific environment variables are required. See .env.example for common framework overrides.

Running the server

Local development

Requires Bun v1.4.0 or higher (or Node.js v24+ for the published package) and network access to hts.usitc.gov.

sh
git clone https://github.com/cyanheads/usitc-tariffs-mcp-server.gitcd usitc-tariffs-mcp-serverbun installcp .env.example .env

No server-specific variables are required; adjust framework overrides as needed. For Streamable HTTP, run MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http after building; the endpoint is http://localhost:3010/mcp.

  • Build and run the production version:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:http# orbun run start:stdio
  • Run checks and tests:

    sh
    bun run devcheck  # Lints, formats, type-checks, and morebun run test      # Runs the test suite

Docker

sh
docker run --rm -p 3010:3010 ghcr.io/cyanheads/usitc-tariffs-mcp-server:latest

The image serves HTTP on port 3010 with stateless sessions and logs under /var/log/usitc-tariffs-mcp-server; configure authentication before exposing it publicly. For a stdio MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/usitc-tariffs-mcp-server:latest"]. To build locally, run docker build -t usitc-tariffs-mcp-server .; add --build-arg OTEL_ENABLED=false to omit optional telemetry peers.

Project structure

DirectoryPurpose
src/mcp-server/tools/Six definitions, shared output schemas, and lossless response formatting
src/services/usitc/Fixed-origin HTTP client, edition checks, pacing, and derived snapshots
src/services/tariffs/Hierarchy, base-rate resolution, and argument-bound pagination
src/services/reference/Identifier validation and edition-pinned reference decoders
src/services/chapter99/Partial evidence indexing, selectors, and passage fragments
tests/Tests and public-source fixtures mirroring src/
docs/Design contracts and directory tree

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for logging and pass ctx.signal through to upstream work
  • Register new tools in the createApp() array in src/index.ts
  • Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
  • Keep partial-coverage and country-qualification limits intact when extending the Chapter 99 evidence grammar

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

來源:README.md,提交 56344de

工具

6

usitc_search_hts

Search published HTS classifications

Search published USITC descriptions or complete HTS code prefixes in source order. Matches are flat published rows with unresolved rates; call usitc_get_heading for legal ancestry and usitc_lookup_duty_rate for exact base rate columns. Follow nextCursor with identical arguments for all remaining matches.

輸入參數limitquery必填cursor

usitc_get_heading

Inspect an HTS heading and ancestry

Inspect a four-, six- or eight-digit HTS classification and its complete indented descendants, including unnamed superior rows. Published section titles are retained separately in sections, outside legal ancestry. Ancestry is built from the whole containing heading before filtering. Each parent and inherited-rate source has an exact nodeId follow-up. Chapters 98 and 99 preserve published forest roots without inventing four-digit records.

輸入參數code必填limitcursornodeId

usitc_browse_chapter

Browse published HTS chapter headings

Browse numbered headings with complete distinct eight-digit rate-line relationships and independent ten-digit statistical counts. A unique combined ten-digit source row can establish an absent eight-digit relationship. Published subchapter titles group following headings when present. Chapters 98 and 99 expose actual published entries without synthetic four-digit headings; grouping is unavailable without sourced markers. Reserved chapters can return a successful empty collection.

輸入參數limitcursorchapter必填

usitc_lookup_duty_rate

Look up published base duty columns

Retrieve an eight-digit rate line or exact ten-digit statistical number with all published General, Special and Column 2 cells. An explicit eight-digit row takes precedence; an absent one resolves only through a unique ten-digit source row, retaining its identity. Multiple suffixes stay unresolved. Blank statistical cells inherit only from the matching eight-digit legal ancestor. With countryCode, report edition-matched General Note 3(b) listing; Special-program membership stays unknown. Neither comparison establishes qualification or selects a column. Follow usitc_check_additional_duties for partial Chapter 99 research.

輸入參數code必填countryCode

usitc_check_additional_duties

Research Chapter 99 additional-duty evidence

Find Chapter 99 candidate headings and source references for an exact eight- or ten-digit commodity number. Coverage is partial and empty candidates never establish clearance. Use candidates, evidence with a returned candidateCode, or unmapped views; follow returned noteId and noteCursor for complete source passages. Country comparisons retain unknown and different-country evidence. No applicability, current legal status, exclusions, stacking or combined duties are determined.

輸入參數code必填viewlimitcursornoteIdnoteCursorcountryCodecandidateCode

usitc_list_reference

Decode HTS references and published editions

List accepted identifier formats, edition-pinned Special Program Indicators, chapter/section navigation labels, quantity units or published release metadata. Program names are decoded separately from country membership, which remains unknown without independently verified lists. Release records identify published editions but do not enable historical tariff lookup. Follow nextCursor for all entries.

輸入參數limittopic必填cursor

版本歷史

2
  1. v0.1.2最新Oct 26, 2026
  2. v0.1.1Oct 25, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分