br_trade_flows

Pack: brazil-comex-stat · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/br_trade_flows for the schema, then POST the same URL with its arguments for the data.

Brazil customs trade flows by month, NCM product, partner country, and state — live from MDIC Comex Stat.

Tool description as the model sees it

Brazil exports/imports over a date range, from MDIC Comex Stat — Brazil’s own customs trade statistics, PROXIED LIVE (not a bulk copy). Monthly granularity at NCM8 (Brazil’s 8-digit national tariff code, finer than the HS6 that UN Comtrade reports for Brazil), with an optional breakdown by Brazilian state of origin/destination — a dimension Comtrade does not have. Filter by a specific NCM product code, an NCM/HS chapter (2-digit), a partner country, and/or a Brazilian state; any combination, or none (totals). Returns value in USD FOB and net weight in kg, with every code resolved to its name. Use for “Brazil’s soybean exports to China by month in 2025” (ncm=“12019000”, country=“China”, from=“2025-01”, to=“2025-12”) or “Mato Grosso’s exports in Q1 2025” (state=“MT”, from=“2025-01”, to=“2025-03”).

Parameters

NameTypeRequiredDescription
flowstringnoTrade direction: “export” or “import”. Defaults to “export”.
ncmstringnoFull 8-digit NCM product code (e.g. “12019000” = soybeans, other than for sowing). Omit for all products.
chapterstringno2-digit NCM/HS chapter code (e.g. “12” = oilseeds and grains, “27” = mineral fuels/oils). Omit for all chapters. Use this OR ncm, not both.
countrystringnoPartner country name (e.g. “China”, “United States”) or Comex Stat country id. Omit for all countries (world total).
statestringnoBrazilian state name or two-letter UF abbreviation (e.g. “Mato Grosso” or “MT”). Omit for all of Brazil.
fromstringyesStart of period: “YYYY” or “YYYY-MM” (e.g. “2025” or “2025-01”).
tostringyesEnd of period: “YYYY” or “YYYY-MM” (e.g. “2025” or “2025-12”). Inclusive.
monthlybooleannotrue (default) returns one row per month; false collapses the whole period into a single total.

Example call

Arguments

{
  "flow": "export",
  "ncm": "12019000",
  "country": "China",
  "from": "2025-01",
  "to": "2025-12"
}

curl

curl -X POST https://gateway.pipeworx.io/brazil-comex-stat/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"br_trade_flows","arguments":{"flow":"export","ncm":"12019000","country":"China","from":"2025-01","to":"2025-12"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('br_trade_flows', {
  "flow": "export",
  "ncm": "12019000",
  "country": "China",
  "from": "2025-01",
  "to": "2025-12"
});

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the brazil-comex-stat pack
{
  "mcpServers": {
    "brazil-comex-stat": {
      "url": "https://gateway.pipeworx.io/brazil-comex-stat/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 12, 2026