UN Comtrade international trade statistics via MCP. Country/HS lookups, flows, balances, rankings.
UN Comtrade international trade statistics via MCP. Country/HS lookups, flows, balances, rankings.
comtrade_lookup_countries, comtrade_search_commodities, comtrade_list_service_categories) never require a key — they queryCompare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| comtrade_lookup_countries | Resolve country and area names to Comtrade M49 numeric codes. Accepts partial names or ISO alpha-2/alpha-3 codes. Returns matching entries with validAsReporter flag — regional groupings are valid partner codes but not re |
| comtrade_search_commodities | Find HS commodity codes by keyword, partial description, or code prefix. Returns codes at 2-, 4-, or 6-digit aggregation with descriptions, parent code, leaf status, and a recommended_query_code field. |
| comtrade_list_service_categories | List EBOPS 2010 service trade categories — the services-domain equivalent of comtrade_search_commodities. Returns codes, descriptions, and parent codes. Filter by keyword or browse from a parent code. |
| comtrade_get_trade_flows | Fetch bilateral trade flow records. Returns primaryValue (USD, FOB for exports / CIF for imports), quantity, net weight, and period/commodity/partner metadata per row. Accepts multiple periods and commodity codes in one |
| comtrade_get_trade_balance | Compute trade balance (exports minus imports) for a country over one or more periods with optional commodity filter. Fetches export and import totals in parallel; returns signed balance, component values, and coverage ra |
| comtrade_get_top_partners | Rank trading partners for a reporter by trade value for a given commodity and flow direction. Returns top N partners sorted by descending value for a single period. |
| comtrade_get_top_commodities | Rank commodity categories for a reporter by trade value for a given flow direction and period. Returns top N HS chapters (2-digit) or headings (4-digit) sorted by descending value. |
| comtrade_get_services_trade | Fetch international trade-in-services data (EBOPS 2010). Same bilateral structure as goods trade: returns flow value, period, and reporter/partner/category metadata. |
| comtrade_get_data_availability | Check which reporter/period/classification combinations have published data before constructing expensive queries. Returns record count and publication date per dataset. |
{
"mcpServers": {
"un-comtrade-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/un-comtrade-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"COMTRADE_SUBSCRIPTION_KEY": "your-key-here"
}
}
}
}Configuration as documented by the project. Restart the client after saving.
comtrade_lookup_countries, comtrade_search_commodities, comtrade_list_service_categories) never require a key — they query| Variable | Description | Required |
|---|---|---|
| MCP_TRANSPORT_TYPE | Configuration value read at startup. | Optional |
| MCP_LOG_LEVEL | Configuration value read at startup. | Optional |
| COMTRADE_SUBSCRIPTION_KEY | Credential the server authenticates with. | Yes |
| COMTRADE_API_BASE_URL | Endpoint or connection string the server talks to. | Yes |
| MCP_HTTP_ENDPOINT_PATH | Filesystem location the server is allowed to use. | Optional |
| MCP_PUBLIC_URL | Endpoint or connection string the server talks to. | Yes |
Read, search and edit files inside allowed directories with the Model Context Protocol reference Filesystem server.
Retrieve version-aware library documentation and code examples with Context7 MCP, using resolve-library-id and query-docs.
Use Microsoft’s Playwright MCP server to navigate pages, inspect accessibility snapshots, fill forms and capture browser screenshots.
Connect GitHub MCP to repositories, issues and pull requests with GitHub’s hosted service or a locally run server.
Use the Supabase MCP server to inspect database schemas, query project data and retrieve docs through a project-scoped connection.
Search Linear issues and projects, inspect work context and manage updates through Linear’s hosted MCP server with OAuth.