mcp-us-tariff
v0.1.0 · Model Context Protocol (MCP) server · Streamable HTTP
Search the official US Harmonized Tariff Schedule and compute the base HTS duty for a shipment, using live data from the USITC HTS REST API.
https://mcp-us-tariff.scorematic.workers.dev/mcpQuick start
Add the server to any MCP client that supports remote (Streamable HTTP) servers:
{
"mcpServers": {
"mcp-us-tariff": {
"url": "https://mcp-us-tariff.scorematic.workers.dev/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Or call a tool directly over JSON-RPC:
curl -s https://mcp-us-tariff.scorematic.workers.dev/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-H 'mcp-protocol-version: 2025-06-18' \
-H 'authorization: Bearer YOUR_API_KEY' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"lookup_hts_code","arguments":{"query":"insulated copper wire","limit":10}}}'
Tools
initialize and tools/list are always free. Every tool returns structured JSON
with source (upstream URL) and retrieved_at. When a value can't be determined, the tool returns an
error result with a machine-readable error.code instead of a guess, and failed calls are never billed.
lookup_hts_code
Search the official USITC Harmonized Tariff Schedule by keyword or HTS number. Returns codes with general, special and column 2 rates.
Billing: $0.02 per successful call
| Input | Type | Notes |
|---|---|---|
query | string | (min length 2, max length 200) |
limit (optional) | integer | (min 1, max 100, default 25) |
Output: query, total_matches, results[{hts_code, indent, description, general_rate, special_rate, column_2_rate, units, footnotes}], source, retrieved_at.
Example arguments:
{
"query": "insulated copper wire",
"limit": 10
}calculate_import_duty
Base HTS duty for an 8/10-digit code, ISO-2 country of origin and customs value. Applies Column 2 for CU/KP/RU/BY and FTA special rates where the HTS lists the country's program. Ad valorem rates only; Chapter 99 additional duties are not included.
Billing: $0.02 per successful call
| Input | Type | Notes |
|---|---|---|
hts_code | string | (min length 8, max length 14) |
country_of_origin | string | (min length 2, max length 2) |
customs_value_usd | number | (max 1000000000000) |
Output: hts_code, rate_line_hts_code, description, country_of_origin, customs_value_usd, rate_column (general|special|column_2), rate_text, preference_program, ad_valorem_percent, base_duty_usd, footnotes, not_included, source, retrieved_at.
Example arguments:
{
"hts_code": "8544.11.00",
"country_of_origin": "MX",
"customs_value_usd": 10000
}
Pricing
| Pay per call (x402 USDC or metered API key) | $0.02 per successful billed call |
| Pro (API key, flat monthly) | $39.00/month for this server |
Secure checkout by Stripe. Your API key is shown once on the confirmation page.
Authentication
- API key:
Authorization: Bearer <API_KEY>. Pro keys are scoped to this server. Manage or cancel a Pro subscription:curl -X POST https://mcp-us-tariff.scorematic.workers.dev/billing/portal -H 'authorization: Bearer YOUR_API_KEY'returns a Stripe Customer Portal link. - x402: Not enabled yet on this deployment (
wallet_not_configured). Use an API key.
Limitations
- Base HTS duty only. Chapter 99 additional duties (Section 301, Section 232, IEEPA/reciprocal tariffs), antidumping/countervailing duties, and the Merchandise Processing and Harbor Maintenance Fees are NOT included; for many origins (e.g. CN) these can exceed the base duty.
- Only ad valorem (percentage) rates are computed. Specific or compound rates (e.g. cents per kg) return error.code = non_ad_valorem_rate instead of a number.
- Column 2 rates are applied for CU, KP, RU and BY. FTA special rates are applied only when the HTS special column lists that country's program; unilateral preference programs (GSP, AGOA, CBERA, CBTPA) are not applied.
- Rules of origin and program eligibility are not verified. This is not a customs ruling or legal advice.
Data sources
Not legal, tax, customs or investment advice. Data is returned as published by the upstream source.