@pipeworx/worldbank
Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/worldbank’s. Install: one-click buttons
Connect to just the @pipeworx/worldbank pack
https://gateway.pipeworx.io/worldbank/mcp — only @pipeworx/worldbank’s own tools, nothing else in the catalog.
No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.
Tools: 7
The World Bank Open Data API. Thousands of development, economic, social, and demographic indicators for every country. Time series going back decades. The canonical source for cross-country comparisons of poverty, education, health, gender, environment, infrastructure. Free, no auth.
Why this matters for AI agents
For development questions, cross-country comparisons of social indicators, or any “how does country X compare on indicator Y” question, the World Bank’s database is the right starting point. Complements IMF (macro/fiscal) with development-specific coverage (WDI, EdStats, GenderStats, etc.).
Common flows:
- Indicator lookup. “GDP per capita PPP for India” → World Bank indicator
NY.GDP.PCAP.PP.CDfor India. - Country comparison. Same indicator across multiple countries.
- Theme browsing. Education indicators, health indicators, environment indicators, etc.
Auth
None. World Bank Open Data is fully public, free.
Indicator code structure
World Bank indicator codes follow a domain.theme.metric pattern:
| Code | Indicator |
|---|---|
NY.GDP.MKTP.CD | GDP (current US$) |
NY.GDP.PCAP.PP.CD | GDP per capita, PPP (current intl $) |
SP.POP.TOTL | Total population |
SE.PRM.ENRR | Primary school enrollment, gross % |
EG.ELC.ACCS.ZS | Access to electricity, % of population |
SI.POV.GINI | Gini index |
EN.ATM.CO2E.PC | CO2 emissions per capita |
Search the catalog when you don’t know the code.
Country and country-group codes
World Bank uses ISO 3-letter codes (USA, BRA, IND) plus aggregate codes:
WLD— WorldEUU— European UnionLMC— Lower middle incomeOED— OECD membersSSA— Sub-Saharan Africa
Aggregate codes are useful for “how does X compare to its peer group?” questions.
Worldwide Governance Indicators (WGI)
The World Bank also publishes the Worldwide Governance Indicators — six governance-quality dimensions per country, useful as country-risk context alongside event/news data: Voice and Accountability, Political Stability and Absence of Violence/Terrorism, Government Effectiveness, Regulatory Quality, Rule of Law, and Control of Corruption. These live in a separate World Bank source database from the general development indicators above, under codes like GOV_WGI_CC.EST (Control of Corruption, governance estimate) and GOV_WGI_CC.SC (same dimension, 0–100 percentile-style score) — reachable through this pack’s existing get_indicator / compare_countries tools, but unguessable without knowing the code, so use the dedicated get_governance_indicators tool for a single country’s full six-dimension snapshot (latest year + prior year, for trend).
| Dimension | .EST code |
|---|---|
| Voice and Accountability | GOV_WGI_VA.EST |
| Political Stability and Absence of Violence/Terrorism | GOV_WGI_PV.EST |
| Government Effectiveness | GOV_WGI_GE.EST |
| Regulatory Quality | GOV_WGI_RQ.EST |
| Rule of Law | GOV_WGI_RL.EST |
| Control of Corruption | GOV_WGI_CC.EST |
Each .EST estimate runs approximately -2.5 (weakest) to +2.5 (strongest); the matching .SC code is a 0–100 percentile-style score, higher meaning stronger governance relative to other countries scored that year.
Common pitfalls
- Indicator deprecation. World Bank periodically retires/replaces indicators. The API marks deprecated ones; prefer current ones for new analysis.
- Coverage gaps. Not every country reports every indicator every year. The API returns nulls for missing data. Compute aggregates carefully.
- Vintages. Indicator values can be revised. Cite the vintage if precision matters.
- Real vs nominal. Many financial indicators come in both nominal (current dollars) and real (constant dollars). The
.CDsuffix is current dollars;.KDis constant. - PPP vs market exchange rate. Cross-country GDP comparison should use PPP for most “how rich is X” questions; market rates for “what does X export” questions.
- Data freshness. World Bank consolidates from member-country reporting; lag varies. Most recent year for many indicators is 1–2 years prior. Check data availability before promising “current.”
Tools
- get_country — Get basic information about a country: full name, region, income level, capital city, and coordinates. Use ISO 3166-1 alpha-2 or alpha-3 country codes (e.g., “US”, “GBR”, “IN”).
- get_indicator — Get World Bank time-series data — economic, social, and development statistics — for ANY country worldwide (Spain, Brazil, Germany, Nigeria, Japan, etc.). PREFER for “unemployment rate in
”, - get_population — Fetch annual total population (SP.POP.TOTL) for a country from the World Bank, defaulting to 2015–2024. Returns a year-by-year array of values. Shortcut for get_indicator.
- get_gdp — Fetch annual GDP in current USD (NY.GDP.MKTP.CD) for a country from the World Bank, defaulting to 2015–2024. Returns a year-by-year array of values. Shortcut for get_indicator.
- compare_countries — 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
- country_co2_emissions — National CO2 emissions for ANY country worldwide, annual, from the World Bank (AR5 basis, excluding LULUCF). PREFER for “CO2 emissions of
”, “how much CO2 does emit”, “carbon emissi - get_governance_indicators — World Bank, Worldwide Governance Indicators (WGI) — six governance-quality dimensions for ANY country: Voice and Accountability, Political Stability and Absence of Violence/Terrorism, Government Effec
Tools
compare_countries— 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 ofcountry_co2_emissions— National CO2 emissions for ANY country worldwide, annual, from the World Bank (AR5 basis, excluding LULUCF). PREFER for CO2 emissions of <country> , how much CO2 does <country> emit , carbon emissionsget_country— Get basic information about a country: full name, region, income level, capital city, and coordinates. Use ISO 3166-1 alpha-2 or alpha-3 country codes (e.g., US , GBR , IN ).get_gdp— Fetch annual GDP in current USD (NY.GDP.MKTP.CD) for a country from the World Bank, defaulting to 2015–2024. Returns a year-by-year array of values. Shortcut for get_indicator.get_governance_indicators— World Bank, Worldwide Governance Indicators (WGI) — six governance-quality dimensions for ANY country: Voice and Accountability, Political Stability and Absence of Violence/Terrorism, Government Effecget_indicator— Get World Bank time-series data — economic, social, and development statistics — for ANY country worldwide (Spain, Brazil, Germany, Nigeria, Japan, etc.). PREFER for unemployment rate in <country> , <get_population— Fetch annual total population (SP.POP.TOTL) for a country from the World Bank, defaulting to 2015–2024. Returns a year-by-year array of values. Shortcut for get_indicator.