un-comtrade-mcp-server
io.github.cyanheads/un-comtrade-mcp-serverVersion 0.4.0UN Comtrade international trade statistics via MCP. Country/HS lookups, flows, balances, rankings.
Status
Responds260 msAnswered our handshake without sign-in.- Last checked
- Nov 14, 2026, 14:48 UTC
- Latency
- 260 ms
- Remotes responding
- 1 of 1
- Sign-in
- No sign-in
- Hosting
- Hosted outside the EU (detected)
- Registry data as of
- Nov 14, 2026, 22:14 UTC
Data from the official MCP Registry, checked by run.zero. How we check
Connect
Streamable HTTP
https://un-comtrade.caseyjhand.com/mcpResponds260 msNo sign-in
Claude Code
claude mcp add --transport http un-comtrade-mcp-server https://un-comtrade.caseyjhand.com/mcpClaude Desktop and claude.ai
Settings > Connectors > Add custom connector
Name: un-comtrade-mcp-server
Remote MCP server URL: https://un-comtrade.caseyjhand.com/mcpCursor
{
"mcpServers": {
"un-comtrade-mcp-server": {
"url": "https://un-comtrade.caseyjhand.com/mcp"
}
}
}VS Code
code --add-mcp '{"name":"un-comtrade-mcp-server","type":"http","url":"https://un-comtrade.caseyjhand.com/mcp"}'Streamable HTTP
npm: @cyanheads/un-comtrade-mcp-server 0.4.0Package only
npm (npx)
claude mcp add un-comtrade-mcp-server -- npx -y @cyanheads/un-comtrade-mcp-server@0.4.0Streamable HTTP
npm: @cyanheads/un-comtrade-mcp-server 0.4.0Package only
npm (npx)
claude mcp add un-comtrade-mcp-server -- npx -y @cyanheads/un-comtrade-mcp-server@0.4.0Built your own server? run.zero hosts MCP servers on European infrastructure.
Tools
10 tools
Read-only | Idempotent | Open world | ||
|---|---|---|---|---|
comtrade_get_data_availabilityCheck which reporter/period/classification combinations have published data before constructing expensive trade queries. Returns dataset records with period, classification, record count, and first/latest release dates. Call this before querying recent periods — annual data is typically published 3–12 months after the reference year and not all countries report every year. Omit filters to browse the availability index, 50 rows by default. Continue with nextOffset using the same filters and limit. | Not declared | Yes | Not declared | Yes |
comtrade_get_services_tradeFetch annual international trade-in-services data. Classification EB (default) serves each reporter-period as reported, in its own scheme (EB10, EB10S or EB02 codes); EB10 or EB02 selects UN Comtrade's conversion of other schemes into that one. Each row names its classification and whether it is original or converted. Same bilateral structure as goods trade: returns flow value in USD, period, and reporter/partner/category metadata for each row. Use comtrade_list_service_categories to find a service code and its scheme before querying. Keyless preview makes one request per served period, at least 4 seconds apart, capped at 500 records per request. Services coverage is more limited than goods trade. | Not declared | Yes | Not declared | Yes |
comtrade_get_top_commoditiesRank HS chapters (2-digit) or headings (4-digit) by trade value for one reporter, flow, and annual or monthly period. Set parent_code and a deeper aggr_level to rank headings or subheadings within one chapter or heading. The tool uses matching TOTAL to identify the HS edition and queries explicit commodity codes in chunks, subdividing capped chunks. Shares use matching TOTAL or the reported parent value for a drill-down. Incomplete coverage returns available categories without ranks or shares and identifies unresolved codes. Defaults to World; optionally select one bilateral partner. Counterpart to comtrade_get_top_partners. | Not declared | Yes | Not declared | Yes |
comtrade_get_top_partnersRank trading partners for a reporter by trade value for a given commodity and flow direction. Returns the top N partners sorted by descending value — answers "who does country X mainly export product Y to?" or "where does country X mainly import product Z from?" for a single period. Fetches a disaggregated breakdown across all partners then sorts locally. Takes an HS or SITC code in the selected classification; omit cmd_code to rank partners for total trade. | Not declared | Yes | Not declared | Yes |
comtrade_get_top_reportersRank retrieved reporting areas by reported import or export value for one goods code and period. Partner 0 (World) ranks reporters by their trade with all partners. Use a bilateral partner to rank reporters by their trade with that area. Shares use the retrieved reporting areas before the display limit. Use comtrade_get_top_partners to rank the partners of one reporter. | Not declared | Yes | Not declared | Yes |
comtrade_get_trade_balanceCompute the trade balance for a country over one or more periods — total exports minus total imports — with an optional HS or SITC commodity filter whose codes must not overlap. Keyless preview makes two requests per served period, at least 4 seconds apart; authenticated calls batch periods. Returns the export and import values per period and, when both flows have data, the signed balance (USD) and coverage ratio (exports / imports). Note: mirror asymmetry is common — balance reflects values as reported by this country; the same flow may be recorded differently by the partner. Uses comtrade_lookup_countries to resolve reporter codes. | Not declared | Yes | Not declared | Yes |
comtrade_get_trade_flowsFetch bilateral trade flow records — the primary data retrieval tool. Returns trade value in USD (primaryValue — FOB for exports, CIF for imports), quantity, net weight, and period/commodity/partner metadata for each row. Accepts multiple periods and commodity codes per call; pass partner_code 0 to get totals aggregated across all partners. Omit cmd_code or pass "TOTAL" to aggregate all commodities. Keyless preview makes one request per served period, at least 4 seconds apart, with a 500-record cap per request. Use comtrade_lookup_countries to resolve reporter/partner codes and comtrade_search_commodities to resolve HS codes. For SITC, supply codes from the selected SITC revision. | Not declared | Yes | Not declared | Yes |
comtrade_list_service_categoriesList service trade categories from the combined EB catalog, including numeric EBOPS and SDMX codes. Returns category codes, descriptions, parent codes, and the EBOPS scheme catalogs that list each code: EB10 (EBOPS 2010), EB10S (EBOPS 2010 SDMX codes), EB02 (EBOPS 2002). Filter by keyword (e.g. "transport", "financial", "travel") or browse direct children of a parent code; "200" lists the EB10 and EB02 top levels. Use the returned id as service_code in comtrade_get_services_trade. Code 3 is transport; SA is manufacturing services. Each page holds up to limit categories; continue with nextOffset using the same query and parent_code. | Not declared | Yes | Not declared | No |
comtrade_lookup_countriesResolve country and area names to Comtrade M49 numeric codes used in all data queries. Accepts a partial or full name, an official name (e.g. "Republic of Korea"), a common name (e.g. "UK", "Turkey"), or an ISO alpha-2/alpha-3 code (e.g. "USA", "US"), ignoring case and accents; exact matches are listed before partial ones. Returns matching entries with their numeric code, ISO identifiers, a validAsReporter flag, and validity dates; within the exact and partial groups, historical entities such as Fed. Rep. of Germany (...1990) are listed after current ones. World (code 0) is a valid partner but not a valid reporter, while some groupings, such as the European Union (97), do report — check validAsReporter. Use this before any trade data tool that requires reporter_code or partner_code. To aggregate across all partners, use partner code 0 (World) — no lookup needed. | Not declared | Yes | Not declared | No |
comtrade_search_commoditiesFind HS or SITC commodity codes by keyword, description, or code prefix. A code written with dots, spaces, or hyphens ("0901.11") matches 090111. Exact codes, code prefixes and contiguous description matches rank first, followed by descriptions containing every query term in any order. Default HS searches include historical codes and report which edition catalogs list each code. Use a trade row’s classificationCode or comtrade_get_data_availability to identify the edition, then search that edition for its descriptions. Keyless goods queries use HS for as-reported data. Continue with nextOffset using the same query, classification, and aggr_level. | Not declared | Yes | Not declared | No |
Details
- Registry status
- Active
- Published
- Nov 13, 2026
- Updated
- Nov 13, 2026
- Website
- Not given
- Categories (suggested)
- Data and analyticsSuggested categories are assigned automatically from the registry text and may be wrong. Verified operators can correct them.
- GDPR
- Not declared