# Comtrade (npm · @pipeworx/mcp-comtrade)

Comtrade MCP — UN Comtrade API for international bilateral trade data

- Trust score: 81/100 (high trust)
- Change this week: +4
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-11-05

## Components

- remote · `gateway.pipeworx.io`: 71/100, [markdown](https://verifymcp.io/servers/pipeworx-io-comtrade/comtrade-mcp.md), [page](https://verifymcp.io/servers/pipeworx-io-comtrade/comtrade-mcp)
- npm · `@pipeworx/mcp-comtrade`: 81/100 (this document), [markdown](https://verifymcp.io/servers/pipeworx-io-comtrade/pipeworx-mcp-comtrade.md), [page](https://verifymcp.io/servers/pipeworx-io-comtrade/pipeworx-mcp-comtrade)

## Channel facts

- Registry: `npm`
- Package: `@pipeworx/mcp-comtrade`
- Version: `0.2.1`
- Transport: `stdio`

## Trust breakdown

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. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-11-05.

- **Supply Chain Security**: 100/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - No install/post-install scripts declared.
  - No production dependencies, so there is no dependency health to assess.
- **Provenance & Transparency**: 97/100
  - Source repository is publicly reachable at the declared URL.
  - Cryptographically verified build provenance (signed, bound to pipeworx-io/mcp-comtrade).
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 4 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 56/100
  - AI-judged instruction clarity (good).
  - 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.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 23/100
  - Stability observed for 7 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Tool Safety**: 100/100
  - No prompt-injection markers were found in the server instructions, tool names or descriptions we captured.
  - We read all 4 captured tool definition(s), and no name or description among them implies an irreversible operation.
  - An AI judge read all 5 captured unit(s) of tool text and found none that tries to manipulate the model reading it.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### 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.

### Claude

```bash
claude mcp add pipeworx-io-comtrade -- npx -y @pipeworx/mcp-comtrade
```

### Cursor

```json
{
  "mcpServers": {
    "pipeworx-io-comtrade": {
      "command": "npx",
      "args": [
        "-y",
        "@pipeworx/mcp-comtrade"
      ]
    }
  }
}
```

### VS Code

```json
{
  "servers": {
    "pipeworx-io-comtrade": {
      "command": "npx",
      "args": [
        "-y",
        "@pipeworx/mcp-comtrade"
      ]
    }
  }
}
```

### Codex

```bash
codex mcp add pipeworx-io-comtrade -- npx -y @pipeworx/mcp-comtrade
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "pipeworx-io-comtrade": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@pipeworx/mcp-comtrade"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add pipeworx-io-comtrade --command npx --arg -y --arg @pipeworx/mcp-comtrade
```

### Hermes

```yaml
mcp_servers:
  pipeworx-io-comtrade:
    command: "npx"
    args: ["-y", "@pipeworx/mcp-comtrade"]
```

### Netclaw

```json
{
  "McpServers": {
    "pipeworx-io-comtrade": {
      "Transport": "stdio",
      "Command": "npx",
      "Arguments": [
        "-y",
        "@pipeworx/mcp-comtrade"
      ]
    }
  }
}
```

### Vellum

```bash
assistant mcp add pipeworx-io-comtrade -t stdio -c npx -a -y @pipeworx/mcp-comtrade
```

### Other

```json
{
  "mcpServers": {
    "pipeworx-io-comtrade": {
      "command": "npx",
      "args": [
        "-y",
        "@pipeworx/mcp-comtrade"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-11-05 (score 81, +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.

### 2026-11-03 (score 80, +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.

### 2026-11-01 (score 79, +16)

- [security improvement] Malware scan: unverified → pass

### 2026-10-31 (score 63, −15)

- [security regression] Malware scan: pass → unverified
- [functional] Package version: 0.2.0 → 0.2.1

### 2026-10-30 (score 78, +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.

### 2026-10-29 (score 77)

First indexed and scored.

## MCP tools (4)

### `comtrade_trade_data` (~674 tokens)

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.

Input parameters:

- `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, required): Partner country name (e.g. "China") or UN code (156=China, 0=World). Optional — defaults to World (0). Names resolved automatically.
- `reporter_code` (string, required): Country name (e.g. "USA", "China", "Germany") or UN numeric code (US=842, China=156). Names are resolved automatically.
- `year` (string, required): Trade period. For frequency="annual" (default): a year, e.g. "2024". For frequency="monthly": year+month as YYYYMM, e.g. "202401" for January 2024.

### `comtrade_top_partners` (~399 tokens)

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.

Input parameters:

- `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, required): 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, required): Country name (e.g. "USA", "China") or UN numeric code (842=US). Names resolved automatically.
- `year` (string, required): Trade period. For frequency="annual" (default): a year, e.g. "2024". For frequency="monthly": year+month as YYYYMM, e.g. "202401".

### `comtrade_top_commodities` (~367 tokens)

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.

Input parameters:

- `flow` (string, required): 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, required): Country name (e.g. "USA", "China") or UN numeric code (842=US). Names resolved automatically.
- `year` (string, required): Trade period. For frequency="annual" (default): a year, e.g. "2024". For frequency="monthly": year+month as YYYYMM, e.g. "202401".

### `comtrade_country_codes` (~61 tokens)

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.

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/pipeworx-io-comtrade/pipeworx-mcp-comtrade#diagnostics

## Score history

- 2026-11-05: 81
- 2026-11-04: 80
- 2026-11-03: 80
- 2026-11-02: 79
- 2026-11-01: 79
- 2026-10-31: 63
- 2026-10-30: 78
- 2026-10-29: 77

## Common questions

### 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.

## Links

- npm package: https://www.npmjs.com/package/@pipeworx/mcp-comtrade
- Socket report: https://socket.dev/npm/package/@pipeworx/mcp-comtrade
- Repository: https://github.com/pipeworx-io/mcp-comtrade
- Website: https://pipeworx.io/packs/comtrade
- Changelog RSS feed: https://verifymcp.io/servers/pipeworx-io-comtrade/pipeworx-mcp-comtrade.xml
- Changelog JSON feed: https://verifymcp.io/servers/pipeworx-io-comtrade/pipeworx-mcp-comtrade.json
- HTML version of this page: https://verifymcp.io/servers/pipeworx-io-comtrade/pipeworx-mcp-comtrade
