# htsapi.dev

> htsapi.dev is a freemium MCP server for trade data. MCP server giving AI agents US HTS tariff codes, CBP rulings and importer price data. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** API, CLI, Web
- **Website:** https://htsapi.dev/developer-guide
- **Repository:** https://github.com/rozetyp/htsapi-mcp
- **MCP Registry name:** dev.htsapi/mcp
- **Categories:** [trade data](https://ai-powered.com/categories/trade-data), [compliance and regulation](https://ai-powered.com/categories/compliance-and-regulation)
- **Listing updated:** 2026-11-19

## About

The README says the server gives an agent the same material a customs classifier reads when choosing a US tariff code. It walks the Harmonized Tariff Schedule one level at a time, pulls section and chapter notes plus the General Rules of Interpretation, and searches more than 222,000 CBP rulings in full text, including whether each ruling has since been revoked or modified and where the goods went.

Beyond raw lookup, a heading_scope tool summarises which legal notes and Explanatory Note passages CBP's rulings rely on for a heading, and an importers_paid tool reports what importers from a given country paid on a code over the latest three Census months. The documentation is explicit that the output is guidance from public sources rather than a binding ruling or legal advice.

The main audience is customs brokers, importers and developers building classification workflows into AI clients such as Claude, Cursor or Claude Code. The seven read tools need no API key, while one classifier suggestion tool requires a key and consumes credits.

## Features

- **Step-by-step schedule lookup:** Browse HTS sections, chapters, headings and subheadings down to the rates and rulings under a line.
- **Ruling search with status:** Find CBP rulings by plain-language product description or by code, with revocation and modification status.
- **Heading scope analysis:** Shows which notes and Explanatory Note passages CBP's rulings quote and decide on for a heading.
- **Import price history:** Reports what importers from a country paid on a code over the latest three Census months.
- **Classification file prompt:** A built-in prompt sets out the method and eight sections of a broker's classification file.
- **Keyless read access:** Core read tools work without signup, subject to a per-IP daily and per-minute call limit.

## Good for

- Finding a likely US HTS code for a consumer product before import
- Checking whether a CBP ruling on a similar product is still in force
- Comparing headings by seeing what CBP rulings say separates them
- Drafting a customs classification file for a product and country of origin
- Looking up what importers have recently paid on a tariff code

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http mcp https://htsapi.dev/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://htsapi.dev/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp": {
      "url": "https://htsapi.dev/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp": {
      "type": "http",
      "url": "https://htsapi.dev/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp": {
      "serverUrl": "https://htsapi.dev/mcp"
    }
  }
}
```

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://htsapi.dev/mcp
```

Enter a Name (for example "htsapi.dev"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp": {
      "type": "http",
      "url": "https://htsapi.dev/mcp"
    }
  }
}
```

## Tools

7 of 8 tools say they're read-only. 1 of 8 tools says it can delete or change data. From the server's own tool annotations; not verified by us.

- `lookup_hts_code` (says read-only): The tariff schedule, one level at a time, the way a classifier reads it. No code: the 22 sections and their chapters, for goods no ruling covers. A chapter (82) lists its headings with their legal text; a heading (8205) lists its subheadings in words; a subheading or line gives its path from the heading (an "Other" line says what it is not), base rates with the special-rate programs named, the 10-
- `importers_paid` (says read-only): What importers from a country actually paid on a code in the latest 3 months Census has published: base rate plus Chapter 99 duties (Section 301, 232 and the like), as a percent of value, by month. Not the duty a shipment will owe today (Census is about 2 months behind and the rules change), and anti-dumping/countervailing duties are not included. For "what will this cost", not for classifying.
- `get_notes` (says read-only): The legal text that decides between headings, from the official US schedule. With a code: its section's notes and its chapter's notes, subheading notes, Additional U.S. Notes and statistical notes. These have legal force (GRI 1): they exclude goods from a chapter ("this chapter does not cover...") and define terms. Without a code: the General Rules of Interpretation and the Additional U.S. Rules o
- `heading_scope` (says read-only): What CBP's rulings quote and decide on a heading: for deciding whether a product falls in it. Give the product to get what decides for it first. `passages`: the lines rulings quote when deciding (mostly from the WCO Explanatory Notes, not published free; fragments, not the whole note), each with the rulings that quote it: their goods, HQ or NY, date, status and what CBP concluded; `exclusion` mark
- `rulings_under_code` (says read-only): Every CBP ruling that classifies goods under a code: for checking a code someone already has. `rulings` are current (not revoked), newest first, or closest to `product` first, each with what its goods were; `moved_away` are rulings CBP revoked off this code and the codes the revoking ruling put the goods under. If similar goods were moved away, the code is in doubt.
- `search_rulings` (says read-only): CBP rulings for a product described in plain words, by meaning. Each ruling comes with its HTS codes, its status (current, modified, superseded) and the product facts CBP classified. `by_code` lists the subheadings current rulings point to, in the order of the rulings, each with its HQ rulings, newest ruling and `lines`: the full codes under it with the rulings for each, which is where the facts t
- `get_ruling` (says read-only): One CBP ruling: its full text, HTS codes, status and, when revoked or modified, the ruling that did it, the codes it moved the goods to, and the sentence that says so. Codes the current schedule no longer has are listed in `obsolete_codes`. `cites`: the explanatory notes, legal notes and GRIs it relies on (heading_scope shows what rulings say a heading covers).
- `classify_product` (says it can change data): Classify a product to a US HTS code. COSTS 1 CREDIT (refunded if it fails). Takes 10-60 s. Read `answer` first. `answer.code` is as deep as the facts given decide (10 digits when they do). When they do not, `answer.options` are the codes it could be, each with its `condition`, base rate and `importers_paid`, and `answer.question` is the fact that decides: ask the user, then call again with the ans

## FAQ

### Does the MCP server need an API key?

No. The seven read tools work without a key, subject to a limit of 50 calls a day per IP and 10 a minute. Only classify_product needs a key and uses one credit per call.

### How do I connect it to Claude Code?

Run claude mcp add --transport http htsapi https://htsapi.dev/mcp. Adding a key is done with a --header "X-API-Key: YOUR_KEY" flag.

### Does it calculate the duty owed on a shipment?

No. The README lists the duty owed on a shipment, anti-dumping and countervailing duties as not covered.

### Is the output legally binding?

The README says everything is guidance from public sources, not legal advice or a binding ruling, and that the importer makes the final decision.

### Is there a REST API as well?

Yes. The same data is available over a REST API at htsapi.dev/v1, with a key in the X-API-Key header.

### Is htsapi.dev free?

htsapi.dev has a free plan, with paid plans for more usage or features.

### How do I add htsapi.dev to Claude Code?

Run this command in your terminal: claude mcp add --transport http mcp https://htsapi.dev/mcp

### What are the best alternatives to htsapi.dev?

The closest alternatives to htsapi.dev are Trimtab Ais, US & UK Import Tariffs and Duty Rates, Tariff Code Finder, Codixio API Tariff and Freightgate MCP Server.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Status and tools: checked automatically by AIPoweredBot on 20 November 2026.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Trimtab Ais](https://ai-powered.com/mcp/trimtab-ais): Trimtab Ais is an open-source MCP server for maps and travel.
- [US & UK Import Tariffs and Duty Rates](https://ai-powered.com/mcp/us-and-uk-import-tariffs-and-duty-rates): US & UK Import Tariffs and Duty Rates is an open-source MCP server for compliance and regulation.
- [Tariff Code Finder](https://ai-powered.com/mcp/tariff-code-finder): Tariff Code Finder is a freemium MCP server for trade data.
- [Codixio API Tariff](https://ai-powered.com/mcp/codixio-api-tariff): Codixio API Tariff is a paid MCP server for trade data.
- [Freightgate MCP Server](https://ai-powered.com/mcp/freightgate-mcp-server): Freightgate MCP Server is a paid MCP server for trade data.
- [Philippines Customs Data: Importers, Suppliers & HS Codes](https://ai-powered.com/mcp/philippines-customs-data-importers-suppliers-and-hs-codes): Philippines Customs Data: Importers, Suppliers & HS Codes is a freemium MCP server for trade data.
- [Vietnam Customs Data: Importers, Suppliers & HS Codes](https://ai-powered.com/mcp/vietnam-customs-data-importers-suppliers-and-hs-codes): Vietnam Customs Data: Importers, Suppliers & HS Codes is a freemium MCP server for trade data.

---
Source: https://ai-powered.com/mcp/htsapi-dev
