TariffTrust MCP server

US import duties as tools for your AI agent.

Connect Claude, Cursor, VS Code, Gemini or your own agent to TariffTrust: it estimates every US duty and fee of a product whose HTS code it knows, each with its official source, with the same operations as the API.

Connect

Address
https://api.tarifftrust.com/mcp/
Transport
Streamable HTTP: one JSON-RPC message per POST, answered at once, without a session.
Key
Your TariffTrust API key as a Bearer token: Authorization: Bearer YOUR_API_KEY. A key that calculates needs the calculate permission; reading needs the read permission.
claude mcp add --transport http tarifftrust https://api.tarifftrust.com/mcp/ --header "Authorization: Bearer YOUR_API_KEY"
Claude Code
In a terminal
Cursor
In ~/.cursor/mcp.json
VS Code
In .vscode/mcp.json: VS Code asks for the key
Gemini CLI
In a terminal
OpenAI API
One of the tools of a Responses API request
Claude API
With the Python client, the Messages API's MCP connector

Replace YOUR_API_KEY with a key of your workspace, created on its API access page. Then ask your agent a question such as: “What US duty applies to 10,000 USD of men's cotton T-shirts from China?”

Tools

The operations of the API under the same names, with the same inputs and the same answers; each tool declares the schema of its answer.

  • TariffTrust never classifies a product: the agent finds the HTS code with search_hts, then estimates.
  • Pass "save": true to keep an estimate: list_saved_estimates and get_saved_estimate read it again.
  • A needs_information answer names what is missing in missing; list_facts lists the questions an estimate may ask.
ToolWhat it doesPermission
estimateEstimate one productcalculate, counted
estimate_entryEstimate a whole import declarationcalculate, counted
estimate_batchEstimate up to 200 productscalculate, counted
search_htsSearch the US tariff scheduleread, not counted
get_htsRead one line of the US tariff scheduleread, not counted
list_agreementsList the trade agreementsread, not counted
list_factsList the questions an estimate may askread, not counted
estimate_historyEstimate one product at every change of the tariffcalculate, counted
list_saved_estimatesList the saved estimatesread, not counted
get_saved_estimateRead a saved estimateread, not counted
get_statusRead the status of the dataread, not counted

One call and its answer

What an agent sends to estimate a product, and what it receives: the answer of POST /v2/estimates, as an object and as text.

tools/call
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "estimate",
    "arguments": {
      "hts": "6109.10.00.12",
      "origin": "CN",
      "customs_value": "10000"
    }
  }
}
Answer
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "The same answer, as JSON text"
      }
    ],
    "structuredContent": {
      "status": "calculated",
      "hts": "6109100012",
      "description": "T-shirts, singlets, tank tops and similar garments, knitted or crocheted: › Of cotton › Men's or boys': › Other T-shirts: › Men's (338)",
      "origin": "CN",
      "customs_value": "10000",
      "transport_mode": "ocean",
      "entry_type": "formal",
      "as_of": "2026-11-04",
      "estimated_duty": "3650.00",
      "estimated_duty_rate": "0.365",
      "estimated_fees": "47.14",
      "estimated_landed_cost": "13697.14",
      "duties": [
        {
          "name": "Base duty",
          "heading": null,
          "rate": "16.5%",
          "amount": "1650.00",
          "source": {
            "title": "2026 HTS Revision 22",
            "url": "https://www.usitc.gov/sites/default/files/tata/hts/hts_2026_revision_22_json.json",
            "sha256": "c2b51667fd9dcf04f3428ac41789392db23e86ed773abba78a5038881c70a478"
          }
        },
        {
          "name": "Note 52 additional duty — China",
          "heading": "9903.05.31",
          "rate": "12.5%",
          "amount": "1250.00",
          "source": {
            "title": "2026 HTS Revision 20",
            "url": "https://www.usitc.gov/sites/default/files/tata/hts/hts_2026_revision_20_json.json",
            "sha256": "bea73f235732215a4bfab973be7495c16c450c65b78e40f58324031ebf092a09"
          }
        },
        {
          "name": "Section 301 — products of China (list 4A)",
          "heading": "9903.88.15",
          "rate": "7.5%",
          "amount": "750.00",
          "source": {
            "title": "2026 HTS Revision 21",
            "url": "https://www.usitc.gov/sites/default/files/tata/hts/hts_2026_revision_21_json.json",
            "sha256": "bea73f235732215a4bfab973be7495c16c450c65b78e40f58324031ebf092a09"
          }
        }
      ],
      "fees": [
        {
          "name": "Merchandise processing fee (MPF)",
          "amount": "34.64",
          "source": {
            "title": "Formal-entry fee limits — FY2027",
            "url": "https://www.govinfo.gov/content/pkg/FR-2026-07-31/html/2026-15530.htm",
            "sha256": "b364664e00909f188ef977ec2df39bd3a8d47435876c577d2e42d5f9335f6f65"
          }
        },
        {
          "name": "Harbor maintenance fee (HMF)",
          "amount": "12.50",
          "source": {
            "title": "19 CFR 24.24 — Harbor maintenance fee",
            "url": "https://www.govinfo.gov/content/pkg/CFR-2025-title19-vol1/xml/CFR-2025-title19-vol1-sec24-24.xml",
            "sha256": "ae35ab88100b5bd409b485bdc9270701c6f3f149495e7544c694f44cc3c652af"
          }
        }
      ],
      "facts": {
        "certified_auto_parts_use": false,
        "certified_heavy_parts_use": false,
        "donation_exemption_claimed": false,
        "informational_materials_claimed": false
      },
      "warnings": [
        "Fees are for one formal entry. No exemption is counted unless you declare it, except the MPF exemption of goods claiming a trade agreement. By sea, the HMF assumes a taxable port unless you declare it exempt. No other fee or tax is included."
      ],
      "data": {
        "edition": "2026 HTS Revision 22",
        "publication_id": "9bcbda8e-4e78-4d35-9758-f996ab2db551",
        "checked_at": "2026-11-04T12:50:42.380Z",
        "stale": false
      }
    },
    "isError": false
  }
}

Errors

An error is a JSON-RPC error, sent with HTTP 200 but for a missing or invalid key (401) and an error of the service (500).

-32602
Invalid arguments: the fields to correct are in error.data.fields.
-32000
A refusal of the service: its code of the API is in error.data.code (quota_exceeded, rate_limited, data_unavailable…), with Retry-After when trying again helps.
-32603
An error of the service, recorded: no correction of the arguments mends it.
-32700, -32600
A body that is not JSON, or not JSON-RPC 2.0.

Send an Idempotency-Key header, a new UUID per request, to send a calculation again safely: the same key and request give the same answer, counted once, for 7 days.

Plans

The MCP server and the API are included in the Pro plan, with a 14-day free trial. A calculation counts once in the plan's quota, as on the API; reading the catalog, the saved estimates and the status is not counted. See the plans.