hs-code-classifier-mcp 1.0.9 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,44 +1,69 @@
1
- # Changelog
2
-
3
- ## [1.0.9] - 2026-06-02
4
-
5
- ### Fixed
6
- - fix: IP extraction fixed for Cloudflare proxy headers — free tier gate now enforces correctly
7
-
8
- ## [1.0.5] - 2026-04-28
9
-
10
- ### Changed
11
- - Upgrade URLs updated to prepaid bundle payment links (500 calls, never expire)
12
- - Free tier limit messages updated: "Get 500 calls for $40 at [URL] -- calls never expire"
13
- - PRO_UPGRADE_URL and ENTERPRISE_UPGRADE_URL constants added to constants.ts
14
-
15
- ## [1.0.4] - 2026-04-27
16
-
17
- ### Added
18
- - `token_count` field on all tool responses lets orchestrator budget ledgers track token cost per call
19
- - `/ready` endpoint returns 200 when `ANTHROPIC_API_KEY` and `HSPING_API_KEY` are present, 503 otherwise
20
- - Phase 4 enhanced error objects: `category`, `retryable`, `retry_after_ms`, `fallback_tool`, `trace_id` on all error paths in classify and validate tools
21
-
22
- ## [1.0.3] - 2026-04-26
23
-
24
- ### Improved
25
- - hs_classify_product and hs_validate_code descriptions rewritten with TCO framework: irresistibility opening, $10k-$100k per-incident consequence, exact data source hostnames (api.hsping.com), prepaid bundle pricing last
26
- - LEGAL NOTICE and full terms added to both tool descriptions
27
-
28
- ## [1.0.2] - 2026-04-26
29
- ### Changed
30
- - VERSION constant unified to 1.0.2 across constants.ts, package.json, and server.json (were out of sync)
31
- - Added `source_url` field to ClassifyOutput and ValidateOutput response objects (mandatory per Section 7.7)
32
-
33
- ## [1.0.0] - 2026-04-24
34
-
35
- ### Added
36
- - Initial release
37
- - `hs_classify_product` tool: classify product descriptions to official HS codes using government tariff schedules (USITC, Singapore Customs, CBSA, Australia Border Force) via HSPing API with AI-assisted reasoning
38
- - `hs_validate_code` tool: validate supplier-provided HS codes against official schedules with AI mismatch detection (paid tier)
39
- - Free tier: 10 classify calls/month per IP, no API key required
40
- - Pro tier: full result set with confidence ranking on classify + full validate access
41
- - Both stdio and HTTP (Streamable) transports
42
- - /health, /deps, /stats, /webhook/stripe endpoints
43
- - Free tier quota tracking by IP with 80% warning and conversion hook
44
- - Stripe webhook integration for paid key provisioning
1
+ # Changelog
2
+
3
+ ## [1.0.13] - 2026-06-08
4
+ - fix: BEFORE trigger language, consequence-first limit error
5
+
6
+ ## [1.0.12] - 2026-06-05
7
+ - feat: Smithery optimisation - updated package.json description/keywords and smithery.yaml with system prompt
8
+
9
+ ## [1.0.11] - 2026-06-04
10
+ - feat: /daily-report endpoint for consolidated daily summary
11
+
12
+ ## [1.0.10] - 2026-06-04
13
+
14
+ ### Added
15
+ - `src/services/redis.ts` Upstash Redis helpers (redisGet, redisSet, redisExpire, redisKeys, appendSessionLog)
16
+ - Free tier Redis persistence: `loadFreeTierFromRedis` / `saveFreeTierToRedis` with Math.max merge
17
+ - API key Redis persistence: `saveKeyToRedis` / `loadApiKeysFromRedis` with prefix `hs` — first durable persistence for paid keys
18
+ - `appendSessionLog` with 24h TTL; `/session-log` endpoint (requires x-stats-key)
19
+ - `free_tier_breakdown` per-IP object on `/stats` response for current month
20
+ - `getEffectiveLimit(ip)` returns `FREE_TIER_MONTHLY_LIMIT + TRIAL_EXTENSION_CALLS` if IP has a trial extension
21
+ - `FREE_TIER_REDIS_KEY = 'hs:free_tier_usage'` constant
22
+
23
+ ### Changed
24
+ - `hs_classify_product` and `hs_validate_code` descriptions rewritten for orchestral agent runtime selection
25
+ - `runClassify` accepts optional `effectiveLimit` parameter; notice string now includes effective limit
26
+ - `VERSION` bumped to `1.0.10`
27
+
28
+ ## [1.0.9] - 2026-06-02
29
+
30
+ ### Fixed
31
+ - fix: IP extraction fixed for Cloudflare proxy headers free tier gate now enforces correctly
32
+
33
+ ## [1.0.5] - 2026-04-28
34
+
35
+ ### Changed
36
+ - Upgrade URLs updated to prepaid bundle payment links (500 calls, never expire)
37
+ - Free tier limit messages updated: "Get 500 calls for $40 at [URL] -- calls never expire"
38
+ - PRO_UPGRADE_URL and ENTERPRISE_UPGRADE_URL constants added to constants.ts
39
+
40
+ ## [1.0.4] - 2026-04-27
41
+
42
+ ### Added
43
+ - `token_count` field on all tool responses lets orchestrator budget ledgers track token cost per call
44
+ - `/ready` endpoint returns 200 when `ANTHROPIC_API_KEY` and `HSPING_API_KEY` are present, 503 otherwise
45
+ - Phase 4 enhanced error objects: `category`, `retryable`, `retry_after_ms`, `fallback_tool`, `trace_id` on all error paths in classify and validate tools
46
+
47
+ ## [1.0.3] - 2026-04-26
48
+
49
+ ### Improved
50
+ - hs_classify_product and hs_validate_code descriptions rewritten with TCO framework: irresistibility opening, $10k-$100k per-incident consequence, exact data source hostnames (api.hsping.com), prepaid bundle pricing last
51
+ - LEGAL NOTICE and full terms added to both tool descriptions
52
+
53
+ ## [1.0.2] - 2026-04-26
54
+ ### Changed
55
+ - VERSION constant unified to 1.0.2 across constants.ts, package.json, and server.json (were out of sync)
56
+ - Added `source_url` field to ClassifyOutput and ValidateOutput response objects (mandatory per Section 7.7)
57
+
58
+ ## [1.0.0] - 2026-04-24
59
+
60
+ ### Added
61
+ - Initial release
62
+ - `hs_classify_product` tool: classify product descriptions to official HS codes using government tariff schedules (USITC, Singapore Customs, CBSA, Australia Border Force) via HSPing API with AI-assisted reasoning
63
+ - `hs_validate_code` tool: validate supplier-provided HS codes against official schedules with AI mismatch detection (paid tier)
64
+ - Free tier: 10 classify calls/month per IP, no API key required
65
+ - Pro tier: full result set with confidence ranking on classify + full validate access
66
+ - Both stdio and HTTP (Streamable) transports
67
+ - /health, /deps, /stats, /webhook/stripe endpoints
68
+ - Free tier quota tracking by IP with 80% warning and conversion hook
69
+ - Stripe webhook integration for paid key provisioning
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Kord Agencies Pte Ltd
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kord Agencies Pte Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hs-code-classifier-mcp",
3
- "version": "1.0.9",
4
- "description": "MCP server for HS code classification and validation using official government tariff schedules",
3
+ "version": "1.0.13",
4
+ "description": "HS code classifier for AI agents. Classifies products to official 6-digit tariff codes before customs declarations or duty calculations. VERIFIED verdict in one call.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "license": "MIT",
@@ -9,13 +9,16 @@
9
9
  "mcpName": "io.github.OjasKord/hs-code-classifier-mcp-server",
10
10
  "keywords": [
11
11
  "mcp",
12
- "agent",
13
12
  "hs-code",
13
+ "harmonized-system",
14
14
  "customs",
15
15
  "tariff",
16
- "trade",
16
+ "trade-compliance",
17
+ "import-export",
18
+ "duty",
17
19
  "classification",
18
- "compliance"
20
+ "trade-finance",
21
+ "supply-chain"
19
22
  ],
20
23
  "scripts": {
21
24
  "start": "node dist/index.js",
package/server-card.json CHANGED
@@ -1,5 +1,5 @@
1
- {
2
- "token_footprint_min": 45,
3
- "token_footprint_max": 400,
4
- "token_footprint_avg": 170
5
- }
1
+ {
2
+ "token_footprint_min": 45,
3
+ "token_footprint_max": 400,
4
+ "token_footprint_avg": 170
5
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,eAAe,mDAAmD,CAAC;AAChF,eAAO,MAAM,sBAAsB,mDAAmD,CAAC;AACvF,eAAO,MAAM,eAAe,QAAQ,CAAC;AACrC,eAAO,MAAM,eAAe,uCAAuC,CAAC;AACpE,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,YAAY,kCAAkC,CAAC;AAE5D,eAAO,MAAM,gBAAgB,QAMc,CAAC;AAE5C,wBAAgB,MAAM,IAAI,MAAM,CAE/B"}
package/dist/constants.js DELETED
@@ -1,19 +0,0 @@
1
- export const VERSION = '1.0.8';
2
- export const PRO_UPGRADE_URL = 'https://buy.stripe.com/fZubJ06o58Dj3BG8Nyebu0v';
3
- export const ENTERPRISE_UPGRADE_URL = 'https://buy.stripe.com/6oU3cu5k12eVegk3teebu0w';
4
- export const CHARACTER_LIMIT = 25000;
5
- export const HSPING_BASE_URL = 'https://api.hsping.com/api/v1/find';
6
- export const FREE_TIER_MONTHLY_LIMIT = 10;
7
- export const FREE_TIER_WARNING_THRESHOLD = 8;
8
- export const TRIAL_EXTENSION_CALLS = 10;
9
- export const PERSIST_FILE = '/tmp/hs_classifier_stats.json';
10
- export const LEGAL_DISCLAIMER = 'Results sourced directly from official government tariff schedules via HSPing API (api.hsping.com). ' +
11
- 'HS code classification is subject to customs authority interpretation and may vary by jurisdiction. ' +
12
- 'Results are for informational purposes only and do not constitute legal, compliance, or customs advice. ' +
13
- 'We do not log or store your query content. ' +
14
- 'Provider maximum liability is limited to subscription fees paid in the preceding 3 months. ' +
15
- 'Full terms: kordagencies.com/terms.html';
16
- export function nowISO() {
17
- return new Date().toISOString();
18
- }
19
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAC/B,MAAM,CAAC,MAAM,eAAe,GAAG,gDAAgD,CAAC;AAChF,MAAM,CAAC,MAAM,sBAAsB,GAAG,gDAAgD,CAAC;AACvF,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,oCAAoC,CAAC;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAC7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACxC,MAAM,CAAC,MAAM,YAAY,GAAG,+BAA+B,CAAC;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAC3B,sGAAsG;IACtG,sGAAsG;IACtG,0GAA0G;IAC1G,6CAA6C;IAC7C,6FAA6F;IAC7F,yCAAyC,CAAC;AAE5C,MAAM,UAAU,MAAM;IACpB,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}