Skip to content

For AI clients

MCP server — ask tariff.lk anything, from any AI client

Connect Claude Desktop, Cursor, Claude Code, or any MCP-compatible client to tariff.lk. Ask duty questions in plain English and get a structured answer — the AI can search HS codes, fetch exchange rates, and calculate the full 7-layer duty without leaving the chat.

Endpoint

https://tariff.lk/mcp

Streamable HTTP · stateless · anonymous · rate-limited 30 req/min, 500 req/day per IP

Add in 30 seconds

Claude Desktop — edit claude_desktop_config.json

{
  "mcpServers": {
    "tariff-lk": {
      "type": "http",
      "url": "https://tariff.lk/mcp"
    }
  }
}

Cursor — edit ~/.cursor/mcp.json

{
  "mcpServers": {
    "tariff-lk": {
      "url": "https://tariff.lk/mcp"
    }
  }
}

Claude Code — one command

claude mcp add --transport http tariff-lk https://tariff.lk/mcp

No auth, no API keys. Restart the client and the five tools show up in the tool menu.

What it can do

  • estimate_duty

    One-shot. "What's the duty on a $1000 laptop from India?" → HS pick + currency conversion + full 7-layer duty + alternates, in a single call.

  • search_hs_code

    AI semantic + fuzzy HS search. Accepts plain-English or HS code prefixes.

  • get_hs_code

    Full details for one HS code: all 7 duty rates, FTA rates, licence requirements.

  • calculate_duty

    Full 7-layer duty in LKR for a known HS code + CIF. CIF can be in any currency — converted via the customs gazette rate.

  • get_exchange_rate

    Latest customs-gazette exchange rate (LKR per unit) with effective dates and gazette reference.

Example

You:What's the import duty on a $1,200 iPhone from India?

Assistant (calls estimate_duty):

Selected HS code: 8517.13.90 (smartphone).

USD 1,200 → LKR 383,123 at the current customs-gazette rate.

India-Sri Lanka FTA (ISFTA) applies — total duty LKR 95,629 (25% effective).

Alternates: 8517.14.90, 8517.18, 8517.14.10 — all 29.8%.

Ground rules

  • No bulk export. The server answers questions; it does not dump the full HS table. For the whole dataset, use the CSV on GitHub.
  • Rate limits. 30 requests per minute, 500 per day, per IP. Exceeding returns an MCP error — wait and try again.
  • Estimates only. Duty calculations are best-effort. For high-value shipments, confirm with Sri Lanka Customs or a licensed broker.