UN Comtrade logo

UN Comtrade

Live

Global bilateral trade flows by commodity — crude, refined products, LNG/LPG, coal.

What is UN Comtrade?

UN Comtrade global bilateral trade flows (free preview tier). Query trade value (USD) and net weight (kg) by reporter country, partner country, HS commodity code, and period — energy codes include crude petroleum (2709), refined products (2710), petroleum gases / LNG / LPG (2711), coal (2701), and electrical energy (2716). Reporter/partner are UN M49 numeric codes (842 = USA, 0 = World). Global and bilateral, so additive to the US-only census-trade connector. Preview tier is row-capped (a free key lifts caps). Free, no auth. Toggle on and use.

Available Tools

  • getTradeFlows
    Bilateral trade flows by reporter, partner, HS commodity, period (value USD, weight kg).
  • getServiceInfo
    Energy HS codes, flow codes, common country codes, and caveats.

Requirements

  • Toggle on
    Toggle on and use — no setup needed.

Quick Setup Guide

Follow these steps to connect your AI agents to this connector

Open /mcp and enable UN Comtrade with the toggle — no credentials needed.

Call getTradeFlows with reporterCode '842' (USA), period '2022', cmdCode '2709' (crude).

Connect to Your AI Assistant

Choose your AI assistant below for specific setup instructions

Follow these steps to connect UN Comtrade to Claude:

Step 1: Open Claude Settings

Launch Claude → Click the profile button (bottom left) → Navigate to Settings

Step 2: Access Connectors

Scroll down to the Connectors tab → Navigate to the bottom → Click “Add Custom Connector”

Step 3: Name Your Connector

Enter any name you'd like for this connector

Step 4: Get the Connector URL

Log in to PatchOps → Navigate to the /mcp page → Copy the connector URL you want to use

Step 5: Add the Connector

Paste the URL in the “Remote MCP Server URL” text box → Click Add

Step 6: Start Using

Your connector is now ready to use in Claude

Follow these steps to connect UN Comtrade to ChatGPT:

Step 1: Enable Developer Mode

Go to Settings → Connectors → Advanced → Enable Developer mode

Step 2: Create New Connector

Go back to Connectors page → Click “Create” (top right)

Step 3: Name Your Connector

Enter any name you'd like for this connector (descriptions are optional)

Step 4: Get the Connector URL

Log in to PatchOps → Navigate to the /mcp page → Copy the connector URL you want to use

Step 5: Add the URL

Paste the URL in the “MCP Server URL” text box

Step 6: Set Authentication

Click the authentication dropdown → Select “No authentication” (PatchOps handles authentication internally)

Step 7: Create the Connector

Click “I understand and want to continue” checkbox → Press Create

Step 8: Using the Connector

Start a new chat → Click the + button (left of text box) → Open dropdown → Hover over three dots labeled “More” → Select your connector

Instructions for connecting UN Comtrade to GitHub Copilot:

Coming Soon

Detailed setup instructions for GitHub Copilot will be added here.

For other MCP-compatible platforms:

Step 1: Get the Connector URL

Log in to PatchOps → Navigate to the /mcp page → Copy the connector URL you want to use

Step 2: Add to Configuration

Add this configuration to your MCP settings file. Replace the URL with your specific connector URL from the /mcp page:

"UN Comtrade-MCP": {
  "url": "https://patchops.ai/api/mcp/...",
  "type": "http"
}

Example Configuration

Here’s an example using PatchOps MCP:

"PatchOps-MCP": {
  "url": "https://patchops.ai/api/mcp/...",
  "type": "http"
}