Comtrade
NPM · @PIPEWORX/MCP-COMTRADE · 2 COMPONENTS
Comtrade MCP — UN Comtrade API for international bilateral trade data
Available components
Last scanned (9 hours ago)
Scores higher than 69% of npm servers
Category Data and Analytics
How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. How we score → Why this is hard to score →
Supply Chain Security100
- No malware found by supply-chain analysis.Pass
- No known CVEs affecting this package version or its production dependencies.Pass
- No install/post-install scripts declared.Pass
- No production dependencies, so there is no dependency health to assess. View diagnostics → Pass
Provenance & Transparency97
- Source repository is publicly reachable at the declared URL. View diagnostics → Pass
- Cryptographically verified build provenance (signed, bound to pipeworx-io/mcp-comtrade). View diagnostics → Pass
- Clear OSI-approved license (MIT).Pass
- Actively maintained (last published 4 days ago).Pass
- Disclosure check failed: no security disclosure policy was found in the source repository. See how to fix → Fail
Schema Quality & AI Usability56
- AI-judged instruction clarity (good).Pass
- Context-footprint check failed: tool/resource definitions use about 1553 tokens (~388/item across 4 items; 4 tools + 0 resources), over budget; trim descriptions and params. See how to fix → Fail
- Usage-examples check failed: none of the tools include examples. See how to fix → Fail
Stability & Change Management23
- Stability observed for 7 of 30 days with no destabilising changes; credit accrues until the full window elapses.Partial
Tool Coverage100
- 100% of tools have a non-trivial description (not blank, and not just the tool's name).Pass
- 100% of tool parameters carry a description.Pass
Tool Safety100
- No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.Pass
- We read all 4 captured tool definition(s), and no name or description among them implies an irreversible operation.Pass
- An AI judge read all 5 captured unit(s) of tool text and found none that tries to manipulate the model reading it.Pass
Capabilities100
- Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.Pass
Every change we have recorded for this component, newest first. Security-relevant changes are always shown. ▲ marks a change for the better, ▼ a change for the worse; unmarked changes are neutral.
- 5 Nov 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 20 to 23. That category is still filling its 30-day observation window: 6 days of observed history at the previous scan, 7 at this one. The score rises as the window fills, whether or not the server changes.
- 3 Nov 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 13 to 17. That category is still filling its 30-day observation window: 4 days of observed history at the previous scan, 5 at this one. The score rises as the window fills, whether or not the server changes.
- 1 Nov 26 +16
- Malware scan: unverified → pass ▲ security
- 31 Oct 26 −15
- Malware scan: pass → unverified ▼ security
- Package version: 0.2.0 → 0.2.1 functional
- 30 Oct 26 +1
No change was recorded against any check on this day. Stability & Change Management went from 0 to 3. That category is still filling its 30-day observation window: 0 days of observed history at the previous scan, 1 at this one. The score rises as the window fills, whether or not the server changes.
- 29 Oct 26 77
First indexed and scored.
Diagnostic detail from the automated scan of this channel: what the scanner observed at each step, so you can see exactly where a check passed or failed. It is informational only and never changes the trust score.
Captured 5 Nov 2026 · Analysed npm/@pipeworx/mcp-comtrade@0.2.1
Provenance Verified
A signed build attestation was found and verified, binding this exact artifact to the source repository it claims to come from.
| Result | Verified |
|---|---|
| Ecosystem | npm |
| Reason | Verified |
| Discovered via | Registry attestation endpoint |
| Source repo | pipeworx-io/mcp-comtrade |
| Certificate issuer | https://token.actions.githubusercontent.com |
| Certificate SAN | https://github.com/pipeworx-io/mcp-comtrade/.github/workflows/publish.yml@refs/heads/main |
| Rekor log index | 3612211003 |
| Predicate type | SLSA build provenance https://slsa.dev/provenance/v1 |
| Subject digest | sha512:f0a80904c07fe051bb3c098291a8164492b187be8826d1b5b8fb603846b93cabd5cbe30634755a9e73730936f85cfdc5211f7e7363b268d0ce6a1cae1 |
Background: How many MCP packages publish verified provenance →
Dependencies 0 packages
| Packages resolved | 0 |
|---|---|
| Tree resolution | Complete |
Background: SBOMs and build attestations, explained →
The tools this component advertises to a client, with an estimated token cost for each. Expand a tool to see its parameters and schema. The per-tool counts are indicative and are not scored directly; the schema's total context footprint is one signal in Schema Quality & AI Usability. A tool's description is untrusted text the model reads on every call, which is what makes this list a security surface and not just an inventory: how tool poisoning works →
comtrade_country_codes ~61
Look up UN Comtrade reporter/partner codes for trade queries (e.g., "842" = US, "156" = China). Note Comtrade uses 842 for the US, not the ISO 840. Returns code and country name pairs.
Input schema present but exposes no named parameters.
No output schema declared.
No examples provided.
comtrade_top_commodities ~367
Rank the products two countries actually trade, largest value first — "what does the US import most from China". Returns HS categories with trade value and net weight. Defaults to HS 2-digit chapters (~97 categories, e.g. 85 Electrical machinery); pass hs_level 4 or 6 for finer product detail.
| Name | Type | Req | Description |
|---|---|---|---|
| flow | string | yes | Trade flow, REQUIRED because it decides what the answer MEANS: "X" for exports (what a country SELLS / ships abroad) or "M" for imports (what it BUYS / receives). Deliberately not defaulted — guessin… |
| frequency | string | – | Data frequency: "annual" (default) or "monthly". Monthly coverage is thinner — not every reporter files monthly, and recent months lag. When "monthly", pass `year` as YYYYMM. |
| hs_level | number | – | HS aggregation level: 2 for chapters (default, ~97 broad categories), 4 for headings, 6 for subheadings. Higher numbers give finer product detail and many more rows. |
| limit | number | – | Number of top commodities to return (default 20) |
| partner_code | string | – | Partner country name or UN code (0=World). Optional — defaults to World. Names resolved automatically. |
| reporter_code | string | yes | Country name (e.g. "USA", "China") or UN numeric code (842=US). Names resolved automatically. |
| year | string | yes | Trade period. For frequency="annual" (default): a year, e.g. "2024". For frequency="monthly": year+month as YYYYMM, e.g. "202401". |
No output schema declared.
No examples provided.
comtrade_top_partners ~399
Find a country's top trading partners ranked by trade volume. Returns partner countries and total trade values. Defaults to ANNUAL; pass frequency="monthly" for a single month's ranking instead of the last full year's.
| Name | Type | Req | Description |
|---|---|---|---|
| cmd_code | string | – | Alias for hs_code — HS commodity code. Use this OR hs_code, not both. |
| commodity | string | – | Alias for hs_code — HS commodity code. Use this OR hs_code, not both. |
| commodity_code | string | – | Alias for hs_code — HS commodity code (e.g. "2603" for copper ores). Use this OR hs_code, not both. |
| flow | string | yes | Trade flow: "M" for imports, "X" for exports |
| frequency | string | – | Data frequency: "annual" (default) or "monthly". Monthly coverage is thinner — not every reporter files monthly, and recent months lag; a reporter with no filing for the requested month is absent fro… |
| hs | string | – | Alias for hs_code — HS commodity code. Use this OR hs_code, not both. |
| hs_code | string | – | Optional HS commodity code to filter by specific product (e.g. "2603" for copper ores) — omit for all commodities (TOTAL). Aliases accepted: commodity_code, commodity, hs, cmd_code (pass exactly one). |
| limit | number | – | Number of top partners to return (default 20) |
| reporter_code | string | yes | Country name (e.g. "USA", "China") or UN numeric code (842=US). Names resolved automatically. |
| year | string | yes | Trade period. For frequency="annual" (default): a year, e.g. "2024". For frequency="monthly": year+month as YYYYMM, e.g. "202401". |
No output schema declared.
No examples provided.
comtrade_trade_data ~674
AUTHORITATIVE bilateral trade data between two countries from UN Comtrade — the official international-trade statistics database (every country's customs filings, harmonized). Returns trade values USD, quantities, and HS commodity-level detail for imports and exports between reporter + partner. Use for "how much X did US import from China in 2024", "what does Germany export to Brazil", "Mexico's top trade partners by commodity", or "how did Saudi–Egypt trade move this year" (pass frequency="monthly" for month-by-month, not just last year's annual total). UN Comtrade reporter/partner codes (842=US — Comtrade uses 842, NOT the ISO 840; 156=China, 276=Germany, 0=World — see comtrade_country_codes). Defaults to ANNUAL data (lags ~3 months from reporting period); pass frequency="monthly" for month-level data (lags more and some reporters never file monthly — a missing month is simply absent from the result, never shown as a zero). Every response states its own "frequency" so a monthly figure is never mistaken for an annual one.
| Name | Type | Req | Description |
|---|---|---|---|
| cmd_code | string | – | Alias for hs_code — HS commodity code. Use this OR hs_code, not both. |
| commodity | string | – | Alias for hs_code — HS commodity code. Use this OR hs_code, not both. |
| commodity_code | string | – | Alias for hs_code — HS commodity code (e.g. "2603" for copper ores). Use this OR hs_code, not both. |
| flow | string | – | Trade flow: "M" for imports, "X" for exports. Optional — defaults to both "M,X". |
| frequency | string | – | Data frequency: "annual" (default) for yearly totals, or "monthly" for month-level data. Monthly coverage is thinner than annual — not every reporter files monthly, and recent months lag by reporter;… |
| hs | string | – | Alias for hs_code — HS commodity code. Use this OR hs_code, not both. |
| hs_code | string | – | HS commodity code at 2/4/6 digit level (e.g., "8471" for computers, "2603" for copper ores). Optional — omit for all commodities. Aliases accepted: commodity_code, commodity, hs, cmd_code (pass exact… |
| partner_code | string | yes | Partner country name (e.g. "China") or UN code (156=China, 0=World). Optional — defaults to World (0). Names resolved automatically. |
| reporter_code | string | yes | Country name (e.g. "USA", "China", "Germany") or UN numeric code (US=842, China=156). Names are resolved automatically. |
| year | string | yes | Trade period. For frequency="annual" (default): a year, e.g. "2024". For frequency="monthly": year+month as YYYYMM, e.g. "202401" for January 2024. |
No output schema declared.
No examples provided.
How do I install the Comtrade MCP server?
Comtrade runs locally as an npm package, launched with npx -y @pipeworx/mcp-comtrade. Ready-made configuration for Claude, Cursor, VS Code, Codex and 5 more is on this page, copied from each client's own documentation.
npm · @pipeworx/mcp-comtrade
claude mcp add pipeworx-io-comtrade -- npx -y @pipeworx/mcp-comtrade
What is the Comtrade MCP server?
Comtrade is an MCP server listed in the public MCP registry as io.github.pipeworx-io/comtrade. Comtrade MCP, UN Comtrade API for international bilateral trade data. This page covers its npm package (@pipeworx/mcp-comtrade).
Is the Comtrade MCP server safe to use?
Comtrade scores 81 out of 100 on VerifyMCP. We found no known CVEs affecting it as of 5 November 2026. It declares no install or post-install scripts. Its build provenance is signed and verified. That is a record of what we were able to check automatically, not an endorsement. The category breakdown on this page shows every signal behind the number, including the ones we could not confirm.
What tools does the Comtrade MCP server expose?
Comtrade exposes 4 tools: comtrade_trade_data, comtrade_top_partners, comtrade_top_commodities, comtrade_country_codes. Their descriptions and schemas cost roughly 1,501 tokens of context every time the server is loaded.
Is the Comtrade MCP server still maintained?
Comtrade is still listed as active in the MCP registry. We last reached this channel on 5 November 2026. Those dates come from our own scans of the registry and the channel itself, not from anything the publisher announced.
What licence is the Comtrade MCP server under?
Comtrade declares the MIT licence, which is OSI-approved. That covers the source only, and says nothing about the cost of any service it calls.