trade_bilateral_analysis

Pack: trade-intel · Endpoint: https://gateway.pipeworx.io/trade-intel/mcp

Compare trade flows between two countries. Returns bilateral imports, exports, top commodities, and exchange rates. Use country codes (e.g., 842 for US, 156 for China, 276 for Germany, 392 for Japan, 826 for UK).

Parameters

NameTypeRequiredDescription
reporter_codestringyesReporting country code (e.g., “842” for US)
partner_codestringyesPartner country code (e.g., “156” for China)
yearstringnoTrade year (default: last year)
_fredKeystringnoFRED API key (optional, for dollar index)

Example call

Arguments

{
  "reporter_code": "842",
  "partner_code": "156"
}

curl

curl -X POST https://gateway.pipeworx.io/trade-intel/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"trade_bilateral_analysis","arguments":{"reporter_code":"842","partner_code":"156"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('trade_bilateral_analysis', {
  "reporter_code": "842",
  "partner_code": "156"
});

More examples

{
  "reporter_code": "276",
  "partner_code": "392",
  "year": "2023",
  "_fredKey": "your-trade-intel-api-key"
}

Response shape

Always returns: analysis, reporter_code, partner_code, year, imports, exports, top_commodities_imported, exchange_rates, us_trade_balance, dollar_index

FieldTypeDescription
analysisstringAnalysis type identifier
reporter_codestringReporting country code
partner_codestringPartner country code
yearstringTrade year analyzed
importsobject | nullBilateral import data from Comtrade
exportsobject | nullBilateral export data from Comtrade
top_commodities_importedobject | nullTop 10 imported commodities
exchange_ratesobject | nullExchange rates from Treasury
us_trade_balanceobject | nullUS trade balance if reporter is US, null otherwise
dollar_indexobject | nullTrade-weighted dollar index from FRED if key provided
Full JSON Schema
{
  "type": "object",
  "properties": {
    "analysis": {
      "type": "string",
      "description": "Analysis type identifier"
    },
    "reporter_code": {
      "type": "string",
      "description": "Reporting country code"
    },
    "partner_code": {
      "type": "string",
      "description": "Partner country code"
    },
    "year": {
      "type": "string",
      "description": "Trade year analyzed"
    },
    "imports": {
      "type": [
        "object",
        "null"
      ],
      "description": "Bilateral import data from Comtrade"
    },
    "exports": {
      "type": [
        "object",
        "null"
      ],
      "description": "Bilateral export data from Comtrade"
    },
    "top_commodities_imported": {
      "type": [
        "object",
        "null"
      ],
      "description": "Top 10 imported commodities"
    },
    "exchange_rates": {
      "type": [
        "object",
        "null"
      ],
      "description": "Exchange rates from Treasury"
    },
    "us_trade_balance": {
      "type": [
        "object",
        "null"
      ],
      "description": "US trade balance if reporter is US, null otherwise"
    },
    "dollar_index": {
      "type": [
        "object",
        "null"
      ],
      "description": "Trade-weighted dollar index from FRED if key provided"
    }
  },
  "required": [
    "analysis",
    "reporter_code",
    "partner_code",
    "year",
    "imports",
    "exports",
    "top_commodities_imported",
    "exchange_rates",
    "us_trade_balance",
    "dollar_index"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "trade-intel": {
      "url": "https://gateway.pipeworx.io/trade-intel/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026