Un Comtrade MCP Server
概要
作者による説明(英語の原文)
UN Comtrade international trade statistics via MCP. Country/HS lookups, flows, balances, rankings.
PopNx MCPの3つの柱
この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。
- 利用者の声iレビューはまだありませんレビューは今後のステップで、アカウント機能と一緒に始まります
- 私たちの基本チェックi4項目中4項目に合格公開情報からチェック。コードはまだスキャンしていません
- 利用状況i成長中↓ 637/週 · ★ 4
できること
このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。
- 接続方法: パソコンでもクラウドでも
- トランスポート: stdio, Streamable HTTP
- カテゴリ: データベース・データセット
インストール
使っているAIアプリを選んで、設定をコピーしてください。
インストールの前に
- 基本チェック:4項目中4項目に合格
- 作者のサーバーで動きます。あなたが頼んだ内容は、作者のサーバーを通ります。
- できること:9件(ツール) comtrade_lookup_countries, comtrade_search_commodities, comtrade_list_service_categories, comtrade_get_trade_flows …
- 自分で入力するもの:
COMTRADE_SUBSCRIPTION_KEY,MCP_LOG_LEVEL
必要なもの
どのアプリを使っていますか?
上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。
ウェブ、デスクトップ、モバイルのClaudeで使えます:
- Settings → Connectors を開く
- Add custom connector を押す
- 下のアドレスを貼り付けて Add を押す
- サインインを求められたら、作者のサービスにサインインする
https://un-comtrade.caseyjhand.com/mcpまたは、パソコンで動かす
Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます
{
"mcpServers": {
"un-comtrade": {
"command": "npx",
"args": [
"-y",
"@cyanheads/un-comtrade-mcp-server"
],
"env": {
"COMTRADE_SUBSCRIPTION_KEY": "your-value",
"MCP_LOG_LEVEL": "your-value"
}
}
}
}ターミナルでこれを実行します
claude mcp add --transport http un-comtrade https://un-comtrade.caseyjhand.com/mcpまたは、パソコンで動かす
claude mcp add un-comtrade --env COMTRADE_SUBSCRIPTION_KEY=your-value --env MCP_LOG_LEVEL=your-value -- npx -y @cyanheads/un-comtrade-mcp-server動かす前に、空欄の値を入力してください。
または、設定を自分でコピーする
プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"un-comtrade": {
"url": "https://un-comtrade.caseyjhand.com/mcp"
}
}
}または、パソコンで動かす
または、設定を自分でコピーする
プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます
{
"mcpServers": {
"un-comtrade": {
"command": "npx",
"args": [
"-y",
"@cyanheads/un-comtrade-mcp-server"
],
"env": {
"COMTRADE_SUBSCRIPTION_KEY": "your-value",
"MCP_LOG_LEVEL": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
または、設定を自分でコピーする
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"un-comtrade": {
"type": "http",
"url": "https://un-comtrade.caseyjhand.com/mcp"
}
}
}または、パソコンで動かす
または、設定を自分でコピーする
プロジェクトの .vscode/mcp.json に貼り付けます
{
"servers": {
"un-comtrade": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cyanheads/un-comtrade-mcp-server"
],
"env": {
"COMTRADE_SUBSCRIPTION_KEY": "your-value",
"MCP_LOG_LEVEL": "your-value"
}
}
}
}ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。
ChatGPTがつなげるのは、インターネット上のサーバーだけです:
- ウェブ版のChatGPTを開き → Settings → Connectors (Apps)
- Create または Add を押す(プランによっては、先に Advanced で Developer mode をオンにする必要があります)
- 下のアドレスを貼り付け、名前を付けて保存する
- サインインを求められたら、作者のサービスにサインインする
https://un-comtrade.caseyjhand.com/mcpメニューの名前は、プランや時期によって少し違うことがあります。
選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。
自分で入力する値
COMTRADE_SUBSCRIPTION_KEYenvAzure API Management key from comtradedeveloper.un.org. Optional — without it, tools fall back to the public preview endpoint (500-record cap).MCP_LOG_LEVELenvSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。
使えるアプリ
このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。
インターネット経由でつなげるアプリ
ClaudeChatGPTGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatOpen WebUIRaycast
パソコン上で動かせるアプリ
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
できること
ツールの名前と説明は、サーバーが2026年11月10日に返したそのままの内容です。書いたのは作者で、私たちではありません。プレーンテキストとして表示しています。
comtrade_lookup_countriesResolve country and area names to Comtrade M49 numeric codes used in all data queries. Accepts a partial name, full name, or ISO alpha-2/alpha-3 code (e.g. "United States", "USA", "US"). Returns matching entries with their numeric code, ISO identifiers, a validAsReporter flag, an
comtrade_search_commoditiesFind HS or SITC commodity codes by keyword, partial description, or code prefix in the selected classification. Returns descriptions, native aggregation levels, parents, leaf status, and recommendedQueryCode for subsequent trade queries. HS uses levels 2 (chapter), 4 (heading), a
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 b
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; pas
comtrade_get_trade_balanceCompute the trade balance for a country over one or more periods — total exports minus total imports — with optional HS or SITC commodity filter. Keyless preview makes two requests per served period, at least 4 seconds apart; authenticated calls batch periods. Returns the signed
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 peri
comtrade_get_top_commoditiesRank HS chapters (2-digit) or headings (4-digit) by trade value for one reporter, flow, and annual or monthly period. Retrieves matching TOTAL and the reporter’s HS edition, then queries explicit commodity codes in chunks; capped chunks are subdivided. Shares use matching TOTAL.
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 ty
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 a
基本チェックi
誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月11日にチェック
- ✓ 合格
作者とリポジトリが一致
レジストリ名は、リポジトリを所有するGitHubアカウント cyanheads で確認済みです
- ✓ 合格
今もメンテナンスされている
コードの最終更新:5 日前
- … 未チェック
ライセンスがある
このリポジトリはまだGitHubから読み取っていません
- ✓ 合格
エンドポイントが応答する
142ミリ秒で応答(HTTP 200)
- – 対象外
OAuthでサインイン
サインイン不要
- ✓ 合格
ツールの説明に隠れた指示がない
9件のツールの説明を読み、AIへの隠れた指示は見つかりませんでした
データベース・データセットのほかのサーバーとの比較i
- このカテゴリのほかの1161件のうち86%よりスターが多い
- このカテゴリのほかの1161件のうち88%より最近レジストリに公開
- 基本チェックの結果が、このカテゴリのほかの1161件のうち100%と同じかそれ以上
レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。
よくある質問
Un Comtrade MCP Serverは安全ですか?
当てはまる基本チェック4項目のうち4項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。
どんなキーやコードが必要ですか?
レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。
パソコンで動きますか、それともクラウドですか?
どちらでも使えます。パソコンにインストールしても、クラウド版につないでもかまいません。
今もメンテナンスされていますか?
GitHubリポジトリの最終更新は5 日前、最新バージョン(0.3.1)がレジストリに届いたのは5 日前です。
どのアプリで使えますか?
Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。URLでつながるので、リモートMCPサーバーに対応したアプリ(開発者モードのChatGPTなど)でも使えます。
代わりに使えるものは?
同じカテゴリには:Dbx, MCP Toolbox for Databases, MCP Toolbox for Databases
代わりの候補
同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。
カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
作者のREADME
READMEを開く
作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。
@cyanheads/un-comtrade-mcp-server Access UN Comtrade international merchandise and services trade statistics — country lookups, HS commodity search, bilateral trade flows, balances, rankings, and data availability — via MCP. STDIO or Streamable HTTP. 9 Tools • 3 Resources
Public Hosted Server: https://un-comtrade.caseyjhand.com/mcp
Overview
International merchandise and services trade statistics from UN Comtrade. Resolve country and HS commodity codes, fetch bilateral trade flows and services trade, and compute balances, partner/commodity rankings, and data availability.
Tools
| Tool | Description |
|---|---|
comtrade_lookup_countries | Resolve country and area names to Comtrade M49 numeric codes. |
comtrade_search_commodities | Find HS or SITC commodity codes in a selected edition by keyword, description, or code prefix. |
comtrade_list_service_categories | Find service trade categories in Comtrade's combined EB catalog, tagged with their EBOPS schemes, by keyword or parent code. |
comtrade_get_trade_flows | Fetch bilateral trade flow records — value, quantity, and weight per period/commodity/partner. |
comtrade_get_trade_balance | Compute a country's trade balance (exports minus imports) across one or more periods. |
comtrade_get_top_partners | Rank trading partners by trade value for a reporter, commodity, and flow direction. |
comtrade_get_top_commodities | Rank commodity categories by trade value for a reporter and flow direction. |
comtrade_get_data_availability | Check which reporter/period/classification combinations have published data. |
comtrade_get_services_trade | Fetch international trade-in-services data — EB as reported (EB10, EB10S, or EB02 codes), or UN Comtrade's converted EB10/EB02 series. |
Resources
| Resource | Description |
|---|---|
comtrade://countries | Complete country/area code list with M49 codes, ISO identifiers, and reporter validity. |
comtrade://hs-classification/{level} | Top-level HS commodity hierarchy at chapter, heading, or subheading level. |
skill://un-comtrade-guide/SKILL.md | Workflow guide for historical classifications, coverage, bilateral/mirror analysis, and unit values. |
Country and HS reference data are also reachable through comtrade_lookup_countries and comtrade_search_commodities. The workflow guide ships with npm, Docker, MCPB, and plugins, and is available over MCP as a skill resource.
Capability reference
comtrade_lookup_countries tool
- Accepts a partial or full country name, or an ISO alpha-2/alpha-3 code;
rolefilters to"reporter","partner"(only entries in UN's partner-area list), or"any"(default) validAsReporterflag on each match — most regional groupings (e.g. World) are partner-only, but some report (e.g. the European Union, 97)include_groups(defaulttrue) toggles regional/economic groupings in the results- Each match also pulls in entries sharing its ISO-3 identity, ordered exact ISO match, reporter-valid, current before expired, name, then code; reporter and partner-only area codes remain distinct
entryEffectiveDateandentryExpiredDate(YYYY-MM-DD) give each entity's validity, so historical entities (e.g. Fed. Rep. of Germany, ...1990) sort after current ones- Country references load from UN static files at startup — no subscription key required. Rows that fail validation are dropped and logged; startup fails on an empty catalog or when fewer than half a file's rows are valid
comtrade_search_commodities tool
- Free-text keyword, partial description, or code-prefix search;
classification(case-insensitive, defaultHS) selects the currentHSreference, an HS editionH0–H6, or SITCSS/S1–S4 aggr_leveluses the selected catalog's native levels: HS chapters/headings/subheadings use2/4/6; SITC has levels1–5. Omit for all levels. The HS all-commoditiesTOTALis level 0, which noaggr_levelfilter returnslimit(default 50) is the page size;totalMatches,shown, andtruncateddescribe the page, andoffsetwith the returnednextOffsetcontinues itrecommendedQueryCodeon each result — the code to pass ascmd_codein trade queries, with the sameclassification
comtrade_list_service_categories tool
- Lists the combined EB service categories, optionally filtered by keyword or
parent_code; numeric and alphabetic codes are distinct entries.parent_code: "200"lists the EB10 and EB02 top levels schemeson each category names the EBOPS scheme catalogs that list its code (EB10,EB10S,EB02); it is empty when none does and absent, with a notice, when the scheme catalogs could not be loaded.ebParentcarries the parent the combined EB catalog gives a code when it differs fromparent(TOTALfor EB10's top-level codes, whoseparentis200)limit(default 100) is the page size;totalMatches,shown, andtruncateddescribe the page, andoffsetwith the returnednextOffsetcontinues it- Returned
idis theservice_codeforcomtrade_get_services_trade
comtrade_get_trade_flows tool
- Accepts a scalar
reporter_codeor an array; omission requires an explicitpartner_code. Reporter arrays serve the first 20 distinct codes and disclose the remainder inunservedReporters. Served codes of an array that return no rows are listed inreportersWithoutRecords(referenceStatus, optionalsuggestedReporterCode; omitted when the response is truncated). A scalar partner-only code with no rows gets a notice naming its reporter-valid counterpart (250 → 251) - Requires
flow_code(Mimport /Xexport /RXre-export /RMre-import) andperiodvalues, allYYYYor allYYYYMM.freqis optional: it is inferred from the period length, mixed lengths are rejected, and an explicit value must match. Up to 120 periods are accepted; keyless calls serve the first 8 (12 with a subscription key). Periods past the cap, or whose request is rate limited or runs out of time, are listed inunservedPeriodswith a notice; if every period fails the call returnsrate_limitedordeadline_exceeded partner_code: 0returns the World total; omit it for a per-partner breakdown.classification(case-insensitive, defaultHS) supportsHS,H0–H6, and SITCS1–S4/SS. Explicit HS editions require authenticated data access; keylessHSreturns as-reported editions, identified by each row'sclassificationCodecmd_code[]accepts up to 200 codes and serves the first 20, listing the rest inunservedCmdCodes; omit it or pass["TOTAL"]for cross-commodity totals.truncated: trueplustruncationHintmeans the response hit the 500-record cap;isReportedseparates directly reported rows from UN-estimated ones- Quantity and alternate quantity retain unit codes/abbreviations and estimation flags where available. UN Comtrade sends
0for what it does not report, soqty/altQtyof 0 with unit code-1, andnetWgt/grossWgt/cifvalue/fobvalueof 0 beside a positiveprimaryValue, are omitted: an absent field means not reported, not zero. A 0 in a real unit stays a measurement
comtrade_get_trade_balance tool
- Returns
balanceUsd(signed),exportsUsd,importsUsd, andcoverageRatio(exports / imports) per period. Optionalcmd_code[]restricts the balance to HS or SITC commodities partner_codedefaults to World (0); a country code computes the reporter's bilateral balance and is echoed with the partner name.classificationis case-insensitive with defaultHS;freqis optional and inferred from the period length (mixed lengths are rejected; an explicit value must match)- Accepts up to 120 periods and 200 codes. Keyless calls serve the first 4 periods (two requests each; 12 with a subscription key) and 20 codes, listing the rest in
unservedPeriods/unservedCmdCodes; a period is served only when both flows complete, and one whose export or import request is rate limited or runs out of time is listed too. Anoticewarns when either flow hit the 500-record cap and the balance may be incomplete - A partner-only reporter code (0 World, 250 Metropolitan France) with no data fails with
partner_only_reporter, naming the reporter-valid counterpart when one exists (250 → 251) mirrorCaveaton every response: the balance reflects this reporter's own values, not the partner's mirror data
comtrade_get_top_partners tool
- Takes one
reporter_code,flow_code(M/X), and singleperiod; optional singlecmd_code(omit for total merchandise trade) in the selectedclassification(case-insensitive, defaultHS;H0–H6with a subscription key, SITCS1–S4/SS) - Infers annual or monthly frequency from the period; monthly values require a calendar month from
01through12 - Returns the top
limitpartners (default 10; any larger value is honored, with no return-all threshold), each withrank,primaryValueUsd, andsharePercent;totalPartnersandtotalValueUsdcover every partner retrieved, and shares divide bytotalValueUsd;classificationnames the catalog thecmd_codewas read in truncated: truewhen the fetch hit the 500-record cap. An empty result for a partner-only reporter code ends its notice with the reporter-valid counterpart (250 → 251)
comtrade_get_top_commodities tool
- Takes one
reporter_code,flow_code, and singleperiod;aggr_levelis2(HS chapter, default) or4(heading).partner_codedefaults to World (0); set it to scope to one partner - Infers frequency from
period. Fetches matchingTOTALto identif