compare_countries

Pack: worldbank · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/compare_countries for the schema, then POST the same URL with its arguments for the data.

Compare a World Bank indicator across MULTIPLE countries in one call, returned ranked high→low. PREFER for “GDP per capita: US vs China vs Germany”, “rank the G7 by CO2 emissions”, “compare population of ”, “rank by rule of law / corruption / government effectiveness”. Pass 2+ ISO country codes. Defaults to each country’s most-recent available value; pass a year for a specific year. Common indicators: NY.GDP.MKTP.CD (GDP), NY.GDP.PCAP.CD (GDP per capita), SP.POP.TOTL (population), EN.GHG.CO2.MT.CE.AR5 (CO2, Mt), FP.CPI.TOTL.ZG (inflation %), GOV_WGI_CC.EST / GOV_WGI_RL.EST / GOV_WGI_GE.EST / GOV_WGI_RQ.EST / GOV_WGI_PV.EST / GOV_WGI_VA.EST (Worldwide Governance Indicators — corruption, rule of law, government effectiveness, regulatory quality, political stability, voice & accountability). For CO2 rankings prefer country_co2_emissions; for a single country’s full governance profile prefer get_governance_indicators.

Parameters

NameTypeRequiredDescription
country_codesstringyes2+ ISO country codes, comma- or semicolon-separated (e.g. “US,CN,DE” or “USA;CHN;DEU”).
indicatorstringyesWorld Bank indicator code (e.g. “NY.GDP.PCAP.CD”, “SP.POP.TOTL”, “EN.GHG.CO2.MT.CE.AR5”).
yearstringnoOptional 4-digit year (e.g. “2023”). Omit for each country’s most-recent available value.

Example call

Arguments

{
  "country_codes": "US,CN,DE",
  "indicator": "NY.GDP.PCAP.CD"
}

curl

curl -X POST https://gateway.pipeworx.io/worldbank/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"compare_countries","arguments":{"country_codes":"US,CN,DE","indicator":"NY.GDP.PCAP.CD"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('compare_countries', {
  "country_codes": "US,CN,DE",
  "indicator": "NY.GDP.PCAP.CD"
});

More examples

{
  "country_codes": "GB;FR;JP;CA",
  "indicator": "SP.DYN.LE00.IN",
  "year": "2022"
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the worldbank pack
{
  "mcpServers": {
    "worldbank": {
      "url": "https://gateway.pipeworx.io/worldbank/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 30, 2026