worldbank-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@worldbank-mcp-serverWhat was the GDP growth of India in 2022?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Public Hosted Server: https://worldbank.caseyjhand.com/mcp
Overview
World Bank Open Data across three separate upstream APIs — development indicators, poverty and inequality estimates, and the Bank's lending portfolio. Search the 29,500+ indicator catalog, query country-level time series, pull poverty and inequality metrics from the Poverty and Inequality Platform, and search active and historical lending projects from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
Tools
Tool | Description |
| List all 21 World Bank thematic topics with descriptions |
| List 70+ World Bank data sources (datasets) with pagination |
| List countries and regional aggregates with ISO codes, region, income level, lending type, and coordinates, filterable by region, income level, and lending type |
| Fetch full metadata for a specific country or aggregate by ISO2, ISO3, or aggregate code |
| Search the 29,500+ indicator catalog by keyword, topic, or source |
| Fetch complete metadata for a single indicator: name, description, source, unit, and topics |
| Query indicator values for one or more countries across a time range, the most recent N periods, or each country's latest N non-empty values, annually, quarterly, or monthly |
| Poverty headcount, gap, and severity at any poverty line for economies and PIP's regional, income-group, and lending-group aggregates, plus the Gini coefficient and decile shares, from the Poverty and Inequality Platform |
| Search the World Bank lending portfolio by text, country, region, status, financing window, and board approval date |
Resources
Resource | Description |
| Indicator metadata by ID — name, description, source, unit, and topics |
| Country metadata by ISO2, ISO3, or aggregate code — region, income level, capital, coordinates |
Related MCP server: worldbank-mcp
Capability reference
worldbank_list_topics tool
No input required — returns the complete fixed taxonomy of 21 thematic topics
Topic IDs (e.g.
1Agriculture,3Economy & Growth) feedtopic_idonworldbank_search_indicators
worldbank_list_sources tool
Paginated list of the 70+ World Bank data sources (datasets); up to 100 per page
Each entry carries ID, name, short code, last-updated date, and data/metadata availability
Source IDs (e.g.
2for World Development Indicators) feedsource_idonworldbank_search_indicators
worldbank_list_countries tool
Filters by region code (
EAS,SSF, … plus membership groupings such asAFE,EUU,LDC), income level (LIC,LMC,UMC,HIC), and lending type (IDX,IBD,IDB,LNX), combined by AND; up to 150 per page (~50 KB)Returns ISO codes, region, income level, lending type, capital, and coordinates; an invalid region or income code is a typed
invalid_filtererrorIndividual countries only by default —
include_aggregates=trueadds regional, income-group, and world aggregates, flaggedisAggregate
worldbank_get_country tool
Accepts one ISO2 (
US), ISO3 (USA), or World Bank aggregate code (EAS,HIC,WLD) —allor a list is rejected asmultiple_countriesReturns region, income level, lending type, capital, and coordinates
Typed
country_not_founderror with a recovery hint pointing toworldbank_list_countries
worldbank_search_indicators tool
At least one of
query,topic_id, orsource_id; every keyword term must match the indicator ID, name, or description, in any order; up to 100 per pageRanked exact ID/name matches first, then names starting with the phrase, then looser matches, then description-only ones; World Development Indicators series lead each tier, and a series leads its own breakdowns (
SP.DYN.LE00.INahead ofSP.DYN.LE00.FE.IN)Each indicator ID appears once, with the first 150 characters of its description;
worldbank_get_indicatorreturns the whole
worldbank_get_indicator tool
One indicator ID per call, made of letters, digits,
.,_, or-—all, a list, or any other character is rejectedReturns description, unit, source dataset, source organization, and topics; HTML line breaks in the description are preserved, other markup is stripped
Typed
indicator_not_founderror pointing toworldbank_search_indicators
worldbank_get_data tool
countriesas ISO2, ISO3, aggregate codes,WLD, orallalone; at most one ofdate_range(a year, quarter, or month, or a range of one type),mrv(the latest N periods across the countries), ormrnev(each country's own latest N values — Eritrea's GDP per capita at 2011, wheremrvgives 2025 and null);frequency(annual,quarterly,monthly) picks the period form on series that publish several (CPTOTSAXNfor Kenya,monthly,mrv: 3→ 2026M07–M05); up to 200 observations a page (~50 KB)Rows carry both country codes,
isAggregate, andvalue: nullfor a missing cell, withnullCountper page andlastUpdated, the source's data vintage; everydate_range,mrv, andmrnevread is checked for another query's cached answer and re-read once, and one that fails twice is anupstream_inconsistenterror rather than a served resultIndicators the standard endpoint doesn't serve (WDI Database Archives, PEFA, ICP, GDLD, International Debt Statistics: DSSI, Food Prices for Nutrition) come from their own dataset, disclosed in
sourceScopedwith the release, classification, sector, or counterpart area applied (dimension_value)
worldbank_get_poverty tool
Economies by ISO3 or ISO2 code, including those PIP publishes only as model estimates (
AFG), plus PIP's aggregates:WLD, regions (SSF,AFE), income groups (LMIC/LMC), and lending groups (IDX,IDB,IBD,REST);yearas a year,all, orMRV; anypoverty_line, defaulting to the applied PPP vintage's international line; up to 70 estimates a page (~50 KB)Headcount, gap, severity, and Watts index, plus the Gini coefficient, mean log deviation, polarization, and decile shares on survey rows;
estimationTypeseparates survey rows from gap-filled ones, whose inequality fields are null, andisAggregateflags aggregate rowsfill_gaps(defaulttrue) includes gap-filled years;welfare_typeandreporting_levelnarrow economy results, andppp_versionpicks the PPP vintage
worldbank_search_projects tool
Free-text
querycombined by AND withcountries(ISO3, ISO2, or a World Bank regional code such as3A),region,status,financial_type, and a board-approval window (approved_from/approved_to); up to 80 projects a page, newest approval firstReturns ID, name, country, region, status, dates, the commitment amount with its IBRD, IDA, and grant parts, financing windows, sectors, and a URL;
countryCodeschain into the other tools, a bad code or unparseable query is a typedinvalid_country_code/invalid_queryerror, and an empty result names the filter that emptied itinclude_abstract(off by default) adds abstracts at 8 projects a page, each cut at 5,000 characters
worldbank://indicator/{indicatorId} resource
Indicator metadata as
application/json— name, description, unit, source dataset, source organization, and topicsindicatorIdcomes fromworldbank_search_indicators; an unknown ID returns a typed not-found error with a recovery hint, while an upstream outage or timeout keeps its own classification instead of reading as a bad ID
worldbank://country/{countryCode} resource
Country/aggregate metadata as
application/json— ISO codes, region, income level, capital, coordinatesAccepts one ISO2, ISO3, or World Bank aggregate code —
allor a list is rejected; an unknown code returns a typed not-found error, distinct from a transient upstream failure
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
World Bank-specific:
Full World Bank Open Data coverage across three separate upstream APIs — the Indicators API, the Poverty and Inequality Platform, and the Projects lending portfolio
60+ years of development data (PIP coverage from 1963) across 29,500+ indicators for 200+ countries and regional aggregates
Client-side keyword search over the indicator catalog, since the upstream
searchtermparameter doesn't filterNull-value transparency —
nullobservations andnullCountsurfaced rather than silently droppedisAggregateflag on every country/data row to distinguish individual countries from aggregate entities
Agent-friendly output:
Tool cross-references woven into descriptions — e.g.
worldbank_search_indicatorsnamesworldbank_list_topicsfor topic IDs,worldbank_get_datanamesworldbank_search_indicatorsfor indicator discoveryStructured error contracts with typed
reasoncodes and actionablerecoveryhints on every toolConsistent pagination metadata (
totalCount,currentPage,totalPages) across all list/search/data tools, with a notice naming the pages that exist when a request runs past the end
Getting started
Public Hosted Instance
A public instance is available at https://worldbank.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"worldbank-mcp-server": {
"type": "streamable-http",
"url": "https://worldbank.caseyjhand.com/mcp"
}
}
}Self-Hosted / Local
Add the following to your MCP client configuration file.
{
"mcpServers": {
"worldbank-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/worldbank-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"worldbank-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/worldbank-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with Docker:
{
"mcpServers": {
"worldbank-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/worldbank-mcp-server:latest"
]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.0 or higher (or Node.js ≥24.0.0).
No API key required — the World Bank Open Data API is public and unauthenticated.
Installation
Clone the repository:
git clone https://github.com/cyanheads/worldbank-mcp-server.gitNavigate into the directory:
cd worldbank-mcp-serverInstall dependencies:
bun installConfigure environment (optional):
cp .env.example .env
# edit .env and set optional overridesConfiguration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Environment variables:
Variable | Description | Default |
| Transport: |
|
| HTTP server port |
|
| HTTP server hostname |
|
| HTTP endpoint path where the MCP server is mounted |
|
| Public origin override for TLS-terminating reverse-proxy deployments | none |
| Authentication: |
|
| HTTP session handling: |
|
| Log level ( |
|
| Storage backend: |
|
| Enable OpenTelemetry |
|
| World Bank Indicators API base URL override |
|
| Poverty and Inequality Platform API base URL override |
|
| Projects API base URL override |
|
| Default page size for list/search/data operations; |
|
| Lifetime of the in-process reference caches — the indicator catalog behind keyword-only search, the country index behind |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run the production version:
# One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdioRun checks and tests:
bun run devcheck # Lint, format, typecheck, and more bun run test # Runs the test suite
Docker
docker build -t worldbank-mcp-server .
docker run --rm -p 3010:3010 worldbank-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/worldbank-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
| Tool definitions ( |
| Resource definitions. Indicator and country metadata resources. |
| World Bank Indicators API service layer — API client and domain types. |
| Poverty and Inequality Platform API service layer — separate client and domain types. |
| Projects API service layer — separate client and domain types. |
| Server-specific environment variable parsing and validation with Zod. |
| Unit and integration tests, mirroring the |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor logging,ctx.statefor storageRegister new tools and resources in the
createApp()arraysWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Access World Bank development indicators for 200+ countries.
World Bank MCP — wraps the World Bank Data API v2 (free, no auth)
World Bank Data360 MCP — the World Bank's modern unified data platform.
World Bank World Development Indicators: curated country-year economy, health, education and more.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables access to World Bank Data360 API with 1000+ economic and social indicators across 200+ countries and 60+ years of historical data, allowing searches, temporal coverage checks, and filtered data retrieval through natural language queries.51MIT
- AlicenseNot gradedqualityCmaintenanceProvides query capabilities for global economic and social development data from the World Bank Open Data API.412 npm8MIT
- FlicenseNot gradedqualityDmaintenanceExposes World Bank development data and country information via MCP resources and tools, enabling AI agents to query historical indicators and live API data.-
- AlicenseAqualityBmaintenanceMCP server for accessing World Bank data, enabling indicator search, data retrieval, country comparisons, trend analysis, rankings, and chart generation.62MIT