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
| Name | Type | Required | Description |
|---|---|---|---|
reporter_code | string | yes | Reporting country code (e.g., “842” for US) |
partner_code | string | yes | Partner country code (e.g., “156” for China) |
year | string | no | Trade year (default: last year) |
_fredKey | string | no | FRED 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
| Field | Type | Description |
|---|---|---|
analysis | string | Analysis type identifier |
reporter_code | string | Reporting country code |
partner_code | string | Partner country code |
year | string | Trade year analyzed |
imports | object | null | Bilateral import data from Comtrade |
exports | object | null | Bilateral export data from Comtrade |
top_commodities_imported | object | null | Top 10 imported commodities |
exchange_rates | object | null | Exchange rates from Treasury |
us_trade_balance | object | null | US trade balance if reporter is US, null otherwise |
dollar_index | object | null | Trade-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.