# US HTS Code Lookup

> US HTS Code Lookup is an MCP server for freight and logistics. Offline lookup, validation and search of US HTS tariff codes with duty rates. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, Web, Self-hosted
- **Website:** https://hs-code.net
- **MCP Registry name:** net.hs-code/hts-lookup
- **Categories:** [freight and logistics](https://ai-powered.com/categories/freight-and-logistics), [legal and government](https://ai-powered.com/categories/legal-and-government)
- **Listing updated:** 2026-11-23

## About

The registry entry describes a stdio server, published to PyPI as hts-lookup, that works without a network connection. It returns the official tariff text and duty rates for a code, validates a code you already have and finds the closest code for a description.

The companion website, hs-code.net, shows what sits behind the data. It lists 19,949 US tariff lines and 5,612 HS subheadings, with a check date of 2026-11-14, and offers product guides for goods such as shoes, gloves, laptops and olive oil. Each guide asks only the questions customs uses to separate similar codes and shows how far the US duty can swing between candidates, alongside UK and EU rates and customs rulings.

The site also explains the General Rules of Interpretation that customs officers apply in order, and why the first six digits are shared worldwide while the rest are national.

## Features

- **Code lookup:** Returns the official tariff text and duty rates for a US HTS code.
- **Code validation:** Checks whether a code you have is a valid HTS line.
- **Closest-code search:** Finds the nearest code for a product description.
- **Offline operation:** Runs over stdio from a PyPI package without a network connection.
- **Product guides on the site:** Guides narrow candidate codes with the questions customs uses.
- **Evidence on the site:** Shows UK and EU rates and customs rulings behind each code.

## Good for

- Check the duty rate for a US HTS code
- Validate codes in a customs or import spreadsheet
- Find a candidate code for a product description before asking a broker
- Compare how much duty varies between candidate codes for a product

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add hts-lookup -- uvx hts-lookup
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "hts-lookup": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add hts-lookup -- uvx hts-lookup
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.hts-lookup]
command = "uvx"
args = ["hts-lookup"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user hts-lookup uvx -- hts-lookup

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

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

```json
{
  "mcpServers": {
    "hts-lookup": {
      "command": "uvx",
      "args": [
        "hts-lookup"
      ]
    }
  }
}
```

## FAQ

### Does US HTS Code Lookup need internet access?

The registry describes it as an offline lookup, installed from PyPI as hts-lookup.

### How current is the data?

The website shows a data check date of 2026-11-14 and 23 US revisions in 2026.

### How many tariff lines are covered?

The site lists 19,949 US tariff lines and 5,612 HS subheadings.

### Which transport does the server use?

Stdio.

### How do I add US HTS Code Lookup to Claude Code?

Run this command in your terminal: claude mcp add hts-lookup -- uvx hts-lookup

### What are the best alternatives to US HTS Code Lookup?

The closest alternatives to US HTS Code Lookup are China Law MCP, x402 Micropayments MCP, USPTO & EPO Patent Claims, Family & Litigation MCP, Dosyai and Fed Contracts.

## Where this comes from

- Description: written from the project's website.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [China Law MCP](https://ai-powered.com/mcp/china-law-mcp): China Law MCP is an open-source MCP server for legal and government.
- [x402 Micropayments MCP](https://ai-powered.com/mcp/x402-micropayments-mcp): x402 Micropayments MCP is a paid MCP server for finance and payments.
- [USPTO & EPO Patent Claims, Family & Litigation MCP](https://ai-powered.com/mcp/uspto-and-epo-patent-claims-family-and-litigation-mcp): USPTO & EPO Patent Claims, Family & Litigation MCP is a freemium MCP server for legal and government.
- [Dosyai](https://ai-powered.com/mcp/dosyai): Dosyai is a free MCP server for legal and government.
- [Fed Contracts](https://ai-powered.com/mcp/fed-contracts): Fed Contracts is a free MCP server for legal and government.
- [Fairhaul Carton Sizing](https://ai-powered.com/mcp/fairhaul-carton-sizing): Fairhaul Carton Sizing is a paid MCP server for freight and logistics.
- [Fairhaul Lane Spend](https://ai-powered.com/mcp/fairhaul-lane-spend): Fairhaul Lane Spend is an MCP server for freight and logistics.
- [Fairhaul Load Tracking](https://ai-powered.com/mcp/fairhaul-load-tracking): Fairhaul Load Tracking is a paid MCP server for freight and logistics.

---
Source: https://ai-powered.com/mcp/us-hts-code-lookup
