protogrid

Search / io.github.cyanheads/un-comtrade-mcp-server

un-comtrade-mcp-server

R0· no sign-in

UN Comtrade international trade statistics via MCP. Country/HS lookups, flows, balances, rankings.

v0.2.0 · active · repository · descriptor JSON · versions

An agent can connect right now, no human step.Remote endpoint, no authentication, reachable on the last probe.
Quality89good
Trust94of 100
Uptime, 30 days100%
Latency p50228 ms

Connect

8 clients · secrets stay placeholders
{
  "mcpServers": {
    "un-comtrade-mcp-server": {
      "type": "http",
      "url": "https://un-comtrade.caseyjhand.com/mcp"
    }
  }
}
claude mcp add --transport http un-comtrade-mcp-server https://un-comtrade.caseyjhand.com/mcp
[mcp_servers.un-comtrade-mcp-server]
url = "https://un-comtrade.caseyjhand.com/mcp"
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "un-comtrade-mcp-server": {
      "type": "remote",
      "url": "https://un-comtrade.caseyjhand.com/mcp",
      "enabled": true
    }
  }
}
{
  "mcpServers": {
    "un-comtrade-mcp-server": {
      "type": "http",
      "url": "https://un-comtrade.caseyjhand.com/mcp"
    }
  },
  "deeplink": "cursor://anysphere.cursor-deeplink/mcp/install?name=un-comtrade-mcp-server&config=eyJ0eXBlIjoiaHR0cCIsInVybCI6Imh0dHBzOi8vdW4tY29tdHJhZGUuY2FzZXlqaGFuZC5jb20vbWNwIn0%3D"
}
{
  "servers": {
    "un-comtrade-mcp-server": {
      "type": "http",
      "url": "https://un-comtrade.caseyjhand.com/mcp"
    }
  }
}
{
  "mcpServers": {
    "un-comtrade-mcp-server": {
      "httpUrl": "https://un-comtrade.caseyjhand.com/mcp"
    }
  }
}
extensions:
  "un-comtrade-mcp-server":
    enabled: true
    name: "un-comtrade-mcp-server"
    type: streamable_http
    uri: "https://un-comtrade.caseyjhand.com/mcp"
    timeout: 300

Quality 89 / 100good

protocol88 · weight 25
  • pass
    protocol.modernsupports 2026-07-28 (server/discover)
  • pass
    protocol.statelessanswers without a session
  • pass
    protocol.transportstreamable HTTP
  • warn
    protocol.list_ttltools/list declares ttlMs 0, so clients re-fetch it on every use
authorizationn/a · weight 15
  • n/a
    auth.prm, auth.as_metadata, auth.cimdno remote uses OAuth
  • n/a
    auth.secret_in_urlno templated URL
tool hygiene86 · weight 30
  • pass
    tools.descriptionsevery tool has a description
  • pass
    tools.description_lengthdescriptions are concise
  • pass
    tools.schemasevery tool has an object input schema
  • pass
    tools.annotations9 of 9 tools declare readOnlyHint or destructiveHint
  • fail
    tools.directory_hintsno tool declares all four of readOnlyHint, destructiveHint, idempotentHint and openWorldHint; missing: comtrade_lookup_countries (destructiveHint, idempotentHint); comtrade_search_commodities (destructiveHint, idempotentHint); comtrade_list_service_categories (destructiveHint, idempotentHint); …
  • pass
    tools.token_costabout 3,584 tokens to load every tool
  • pass
    tools.api_dumptools are not a one-to-one API dump
stability100 · weight 15
  • pass
    stability.changesno tool changes in 30 days
  • pass
    stability.rug_pullno tool changed its meaning under the same name
dependenciesn/a · weight 15

9 tools, about 3,584 tokens to load them all · tool set aa49a645bd15 · checked 2026-10-20 17:34 UTC

Tool changes

No tool definition changes recorded. A server's first observation is its baseline; later probes record what changes.

Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed. How it is computed.

Trust 94 / 100

provenance80
liveness100
freshness100
hygiene100

+repository +namespace-matches-repo +reachable +uptime-100% +updated-7d-ago

Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed. How it is computed.

Dependencies

@cyanheads/[email protected] npmthis version is not known to the dependency resolver

@cyanheads/[email protected] npmthis version is not known to the dependency resolver

Dependency graphs from deps.dev; advisories from OSV.dev, including the GitHub Advisory Database and the PyPI Advisory Database; all CC BY 4.0. The graph is what a clean install of this version resolves today; nothing was installed or run. How it is checked.

Endpoints

remoteauthreachableuptime 30dp50protocollast ok
https://un-comtrade.caseyjhand.com/mcp streamable-httpnoneyes100%228 ms2026-07-282026-10-20
packageregistryversionruntimesecrets
@cyanheads/un-comtrade-mcp-servernpm0.2.0npx
@cyanheads/un-comtrade-mcp-servernpm0.2.0npx

Tools (9)

comtrade_get_data_availabilityread-onlyCheck 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 all parameters to browse the full availability index.
comtrade_get_services_traderead-onlyFetch international trade-in-services data (EBOPS 2010 classification). 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 the right service code before querying. Preview makes one paced request per served period, capped at 500 records per request. Services coverage is more limited than goods trade.
comtrade_get_top_commoditiesread-onlyRank commodity categories for a reporter by trade value for a given flow direction and period. Returns the top N HS chapters (2-digit) or headings (4-digit) sorted by descending value — answers "what does country X mainly export?" or "what does country X mainly import?". Symmetric counterpart to comtrade_get_top_partners. Optionally filter to a single partner country.
comtrade_get_top_partnersread-onlyRank 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. Omit cmd_code to rank partners for total trade.
comtrade_get_trade_balanceread-onlyCompute the trade balance for a country over one or more periods — total exports minus total imports — with optional HS or SITC commodity filter. Preview makes two paced requests per served period; authenticated calls batch periods. Returns the signed balance (USD), export value, import value, 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.
comtrade_get_trade_flowsread-onlyFetch 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. Preview makes one paced request per served period, 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.
comtrade_list_service_categoriesread-onlyList EBOPS 2010 service trade categories — the equivalent of comtrade_search_commodities for the services domain. Returns category codes, descriptions, and parent codes. Filter by keyword to find a specific service type (e.g. "transport", "financial", "travel"), or browse from a parent category code. Use the returned id as service_code in comtrade_get_services_trade.
comtrade_lookup_countriesread-onlyResolve 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, and a validAsReporter flag — regional groupings like "World" (code 0) are valid partners but not valid reporters. 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.
comtrade_search_commoditiesread-onlyFind HS commodity codes by keyword, partial description, or known code prefix. Returns matched codes at the requested aggregation level (2-, 4-, or 6-digit) with full descriptions, parent code, leaf status, and a recommended_query_code field indicating the best code level for subsequent trade queries (2-digit chapter for broad analysis, 4- or 6-digit for specific products). This is the critical resolution step — agents cannot derive HS codes from product names without this tool. Use aggr_level 2 to start broad; narrow with aggr_level 4 or 6 once you have a chapter. To get all commodities for an entire chapter, pass the 2-digit code as cmd_code in trade tools.

Schemas: list_tools.

Similar MCP servers

More from io.github.cyanheads

And 140 more from this publisher.

Official server.json
{
  "name": "io.github.cyanheads/un-comtrade-mcp-server",
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
  "remotes": [
    {
      "url": "https://un-comtrade.caseyjhand.com/mcp",
      "type": "streamable-http"
    }
  ],
  "version": "0.2.0",
  "packages": [
    {
      "version": "0.2.0",
      "transport": {
        "type": "stdio"
      },
      "identifier": "@cyanheads/un-comtrade-mcp-server",
      "runtimeHint": "npx",
      "registryType": "npm",
      "registryBaseUrl": "https://registry.npmjs.org",
      "environmentVariables": [
        {
          "name": "COMTRADE_SUBSCRIPTION_KEY",
          "format": "string",
          "description": "Azure API Management key from comtradedeveloper.un.org. Optional — without it, tools fall back to the public preview endpoint (500-record cap)."
        },
        {
          "name": "MCP_LOG_LEVEL",
          "format": "string",
          "default": "info",
          "description": "Sets the minimum log level for output (e.g., 'debug', 'info', 'warn')."
        }
      ]
    },
    {
      "version": "0.2.0",
      "transport": {
        "url": "http://localhost:3010/mcp",
        "type": "streamable-http"
      },
      "identifier": "@cyanheads/un-comtrade-mcp-server",
      "runtimeHint": "npx",
      "registryType": "npm",
      "registryBaseUrl": "https://registry.npmjs.org",
      "environmentVariables": [
        {
          "name": "MCP_TRANSPORT_TYPE",
          "value": "http",
          "format": "string",
          "description": "Selects the HTTP transport."
        },
        {
          "name": "MCP_HTTP_HOST",
          "format": "string",
          "default": "127.0.0.1",
          "description": "The hostname for the HTTP server."
        },
        {
          "name": "MCP_HTTP_PORT",
          "format": "string",
          "default": "3010",
          "description": "The port to run the HTTP server on."
        },
        {
          "name": "MCP_HTTP_ENDPOINT_PATH",
          "format": "string",
          "default": "/mcp",
          "description": "The endpoint path for the MCP server."
        },
        {
          "name": "MCP_AUTH_MODE",
          "format": "string",
          "default": "none",
          "description": "Authentication mode to use: 'none', 'jwt', or 'oauth'."
        },
        {
          "name": "MCP_LOG_LEVEL",
          "format": "string",
          "default": "info",
          "description": "Sets the minimum log level for output (e.g., 'debug', 'info', 'warn')."
        }
      ]
    }
  ],
  "repository": {
    "url": "https://github.com/cyanheads/un-comtrade-mcp-server",
    "source": "github"
  },
  "description": "UN Comtrade international trade statistics via MCP. Country/HS lookups, flows, balances, rankings."
}