Comtrade

live TradeData

Comtrade MCP — UN Comtrade API for international bilateral trade data

4 tools
0ms auth
free tier 50 calls/day

Tools

comtrade_trade_data

Get bilateral trade data between two countries from the UN Comtrade database. Returns trade value, quantity, partner, and commodity description for imports and/or exports.

No parameters required.

Try it
comtrade_top_partners

Get top trading partners for a country by trade value. Useful for understanding a country

No parameters required.

Try it
comtrade_top_commodities

Get top traded commodities between two countries by trade value. Shows which product categories dominate bilateral trade.

No parameters required.

Try it
comtrade_country_codes

Get a reference list of common country ISO numeric codes used in UN Comtrade queries. No API call needed.

No parameters required.

Try it

Test with curl

The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.

List available tools
bash
curl -X POST https://gateway.pipeworx.io/comtrade/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Call a tool
bash
curl -X POST https://gateway.pipeworx.io/comtrade/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"comtrade_trade_data","arguments":{}}}'

Use with the SDK

Install @pipeworx/sdk to call tools from any TypeScript/Node project.

TypeScript
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("comtrade_trade_data", {});
ask_pipeworx
// Or ask in plain English:
const answer = await px.ask("comtrade mcp — un comtrade api for international bilateral trade data");

Related compound tools

These combine Comtrade with other data sources in a single call:

Trade Intel MCP — Compound tools that chain Comtrade, Census, Treasury,

3 tools — trade_bilateral_analysis, trade_country_profile, trade_macro_dashboard

Related packs

Other Pipeworx packs in the same categories (Trade, Data):