Worldbank Mcp Server

io.github.cyanheadsPublished by GitHub account cyanheadsv0.6.0Updated Nov 3, 2026

Query 29,500+ World Bank development indicators for 200+ countries across 60+ years.

VerifiedStreamable HTTPWeb executableFinanceData & Analytics

Overview

Worldbank's hosted MCP server (worldbank.caseyjhand.com); no sign-in required; Streamable HTTP; 9 tools.

No AI overview yet: these facts come from the registry entry and the server itself.

Endpoint
worldbank.caseyjhand.com
Last checked

Installation

In SourceWeft

  1. Open Worldbank Mcp Server in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.cyanheads%2Fworldbank-mcp-server/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "worldbank": {
      "type": "http",
      "url": "https://worldbank.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/worldbank-mcp-server

Query 29,500+ World Bank development indicators for 200+ countries across 60+ years via MCP. STDIO or Streamable HTTP.

9 Tools • 2 Metadata Resources • 1 Skill

Public Hosted Server: https://worldbank.caseyjhand.com/mcp


Overview

World Bank Open Data: 29,500+ development indicators, poverty and inequality estimates, and the Bank's lending projects. Search indicators, query country and source-specific time series, pull poverty metrics, and search active and historical projects. No API key required. The published worldbank-guide skill (skill://worldbank-guide/SKILL.md) covers dataset selection, comparable observations, source-specific identifiers, and lending totals.

Tools

ToolDescription
worldbank_list_topicsList all 21 World Bank thematic topics with descriptions
worldbank_list_sourcesList 70+ World Bank data sources (datasets) with pagination
worldbank_list_countriesList countries and aggregates with global metadata, or discover a selected source's own entity IDs
worldbank_get_countryFetch full metadata for a specific country or aggregate by ISO2, ISO3, or aggregate code
worldbank_search_indicatorsSearch the 29,500+ indicator catalog by keyword, topic, or source
worldbank_get_indicatorFetch complete metadata for a single indicator: name, description, source, unit, and topics
worldbank_get_dataQuery 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
worldbank_get_povertyPoverty headcount, gap, and severity at any poverty line for economies and PIP's regional, income-group, lending-group, and fragility-group aggregates, plus the Gini coefficient and decile shares, from the Poverty and Inequality Platform
worldbank_search_projectsSearch the World Bank lending portfolio by text, country, region, sector, status, financing window, and board approval date

Resources

ResourceDescription
worldbank://indicator/{indicatorId}Indicator metadata by ID — name, description, source, unit, and topics
worldbank://country/{countryCode}Country metadata by ISO2, ISO3, or aggregate code — region, income level, capital, coordinates
skill://worldbank-guide/SKILL.mdResearch guide for dataset selection, source-specific identifiers, comparisons, and lending totals

Capability reference

worldbank_list_topics tool

  • No input required — returns the complete fixed taxonomy of 21 thematic topics
  • Topic IDs (e.g. 1 Agriculture, 3 Economy & Growth) feed topic_id on worldbank_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. 2 for World Development Indicators) feed source_id on worldbank_search_indicators, worldbank_list_countries, and worldbank_get_data

worldbank_list_countries tool

  • Filters by region code (EAS, SSF, … plus membership groupings such as AFE, EUU, LDC), income level (LIC, LMC, UMC, HIC), and lending type (IDX, IBD, IDB, LNX), combined by AND; up to 300 per page
  • Returns ISO codes, region, income level, lending type, capital, and coordinates; an invalid region or income code is a typed invalid_filter error
  • Individual countries only by default — include_aggregates=true adds regional, income-group, and world aggregates, flagged isAggregate
  • With source_id, returns that dataset's canonical entities as id, name, and sourceId, including subnational IDs. Global classification filters and include_aggregates=true fail as unsupported_source_filter; the default false does not discard source entities

worldbank_get_country tool

  • Accepts one ISO2 (US), ISO3 (USA), or World Bank aggregate code (EAS, HIC, WLD) — all or a list is rejected as multiple_countries
  • Returns region, income level, lending type, capital, and coordinates
  • Typed country_not_found error with a recovery hint pointing to worldbank_list_countries

worldbank_search_indicators tool

  • At least one of query, topic_id, or source_id; every keyword term must match the indicator ID, name, or description, in any order; up to 100 per page
  • Ranked 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.IN ahead of SP.DYN.LE00.FE.IN)
  • Each indicator ID appears once, with the first 150 characters of its description; worldbank_get_indicator returns the whole

worldbank_get_indicator tool

  • One indicator ID per call, made of letters, digits, ., _, or - — all, a list, or any other character is rejected
  • Returns description, unit, source dataset, source organization, and topics; HTML line breaks in the description are preserved, other markup is stripped
  • Typed indicator_not_found error pointing to worldbank_search_indicators

worldbank_get_data tool

  • countries as ISO2, ISO3, aggregate codes, WLD, or all alone; at most one of date_range (a year, quarter, or month, or a range of one type), mrv (the latest N periods across the countries), or mrnev (each country's own latest N non-empty values); frequency (annual, quarterly, monthly) picks the period form on series that publish several, while a date window's own form selects it; up to 1,000 observations per page
  • Rows carry both country codes, isAggregate, and value: null for a missing cell, with nullCount per page and lastUpdated, the source's data vintage; every date_range, mrv, and mrnev read is checked for another query's cached answer and re-read once, and one that fails twice is an upstream_inconsistent error rather than a served result
  • Indicators 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 sourceScoped with the release, classification, sector, or counterpart area applied (dimension_value)
  • source_id selects a dataset explicitly; discover its entity IDs with the same source on worldbank_list_countries. Source-only entities retain their opaque countryCode and an empty countryIso3; sourceId names the serving dataset when known. Unknown or unsupported sources fail as source_not_found / source_not_queryable

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), lending groups (IDX, IDB, IBD, REST), and fragility groups (FCVY, FCVN; WDI's FCS is rejected with FCVY guidance, without asserting the same membership); year as a year, all, or MRV; any poverty_line, defaulting to the applied PPP vintage's international line; up to 1,000 estimates per page
  • Headcount, gap, severity, and Watts index, plus the Gini coefficient, mean log deviation, polarization, and decile shares on survey rows; estimationType separates survey rows from gap-filled ones, whose inequality fields are null, and isAggregate flags aggregate rows
  • estimateType preserves actual/projection/nowcast provenance independently of estimationType; distributionType preserves micro/group/imputed classification. Both remain null when upstream supplies none
  • fill_gaps (default true) includes gap-filled years; welfare_type and reporting_level narrow economy results, and ppp_version picks the PPP vintage

worldbank_search_projects tool

  • Free-text query combined by AND with countries (ISO3, ISO2, or a World Bank regional code such as 3A), region, sector, status, financial_type, and a board-approval window (approved_from/approved_to); up to 1,000 projects per page, newest approval first
  • Returns ID, name, country, region, status, dates, the commitment amount with its IBRD, IDA, and grant parts, financing windows, sectors, and a URL; countryCodes chain into the other tools, a bad code or unparseable query is a typed invalid_country_code / invalid_query error, and an empty result names the filter that emptied it
  • include_abstract (off by default) adds complete abstracts without changing the page size
  • sector accepts an array of names, combining them by OR and with other filters by AND. Bare and FY17 - spellings query both naming forms; codes are not aliases. Unknown names return no matches; blank names and embedded caret separators fail as invalid_sector_name

worldbank://indicator/{indicatorId} resource

  • Indicator metadata as application/json — name, description, unit, source dataset, source organization, and topics
  • indicatorId comes from worldbank_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, coordinates
  • Accepts one ISO2, ISO3, or World Bank aggregate code — all or 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 searchterm parameter doesn't filter
  • Null-value transparency — null observations and nullCount surfaced rather than silently dropped
  • isAggregate distinguishes global country and data rows from aggregates; source-entity listings retain their own identifiers without inventing global classifications

Agent-friendly output:

  • Tool cross-references woven into descriptions — e.g. worldbank_search_indicators names worldbank_list_topics for topic IDs, worldbank_get_data names worldbank_search_indicators for indicator discovery
  • Structured error contracts with typed reason codes and actionable recovery hints on every tool
  • Consistent 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
  • Data, poverty, project, and country reads honor per_page up to their documented maximum; larger requests are served at that maximum with requested/served sizes and a notice. The default is 50

Getting started

Connect to the hosted instance, no install:

sh
claude mcp add --transport http worldbank-mcp-server https://worldbank.caseyjhand.com/mcp

Or run it locally:

sh
claude mcp add worldbank-mcp-server -- npx -y @cyanheads/worldbank-mcp-server

For other clients, add this to the MCP config file:

json
{  "mcpServers": {    "worldbank-mcp-server": {      "command": "npx",      "args": ["-y", "@cyanheads/worldbank-mcp-server"]    }  }}

No API key required. For Docker or a source build, see Running the server.

Configuration

All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Environment variables:

VariableDescriptionDefault
MCP_TRANSPORT_TYPETransport: stdio or httpstdio
MCP_HTTP_PORTHTTP server port3010
MCP_HTTP_HOSTHTTP server hostname127.0.0.1
MCP_HTTP_ENDPOINT_PATHHTTP endpoint path where the MCP server is mounted/mcp
MCP_PUBLIC_URLPublic origin override for TLS-terminating reverse-proxy deploymentsnone
MCP_AUTH_MODEAuthentication: none, jwt, or oauthnone
MCP_SESSION_MODEHTTP session handling: stateful, stateless, or auto. The server declares stateless in code — it holds no per-session state — and a value set here overrides that declarationstateless
MCP_LOG_LEVELLog level (debug, info, notice, warning, error)info
LOG_TOOL_FAILURE_PAYLOADSLog each failed tool call's arguments and result, redacted by key name and capped at LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES (default 16384). A secret inside a free-form value is not redactedfalse
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1in-memory
OTEL_ENABLEDEnable OpenTelemetryfalse
OTEL_EXPORTER_OTLP_LOGS_ENDPOINTOpt-in OTLP log export (e.g. http://localhost:4318/v1/logs); the base OTEL_EXPORTER_OTLP_ENDPOINT never enables itnone
WORLDBANK_API_BASE_URLWorld Bank Indicators API base URL overridehttps://api.worldbank.org/v2
WORLDBANK_PIP_BASE_URLPoverty and Inequality Platform API base URL overridehttps://api.worldbank.org/pip/v1
WORLDBANK_PROJECTS_BASE_URLProjects API base URL overridehttps://search.worldbank.org/api/v3
WORLDBANK_DEFAULT_PER_PAGEPositive-integer default page size for list/search/data operations; data, countries, projects, and poverty clamp it to their documented maxima50
WORLDBANK_CATALOG_CACHE_TTL_MSLifetime of the in-process reference caches — the indicator catalog behind keyword-only search, the country index behind isAggregate, source-scoped country codes, and poverty ISO2 codes, each source-scoped dataset's concept/country/period/dimension listings, and PIP's versions listing behind ppp_version, regions table behind aggregate codes, and economy list behind model-estimate-only economies; 0 disables them all3600000

See .env.example for the full list of optional overrides.

Running the server

Local development

Requires Bun v1.4.0 or higher (or Node.js v24+).

  • Clone and install:

    sh
    git clone https://github.com/cyanheads/worldbank-mcp-server.gitcd worldbank-mcp-server && bun installcp .env.example .env   # optional overrides
  • Build and run the production version:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:http# orbun run start:stdio
  • Run checks and tests:

    sh
    bun run devcheck  # Lint, format, typecheck, and morebun run test      # Runs the test suite

Docker

sh
docker run --rm -p 3010:3010 ghcr.io/cyanheads/worldbank-mcp-server:latest

The image defaults to HTTP transport, stateless session mode, and logs to /var/log/worldbank-mcp-server. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/worldbank-mcp-server:latest"]. To build locally, docker build -t worldbank-mcp-server .; OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/mcp-server/toolsTool definitions (*.tool.ts). Nine tools covering topics, sources, countries, indicators, data, poverty, and projects.
src/mcp-server/resourcesResource definitions. Indicator and country metadata resources.
src/services/worldbankWorld Bank Indicators API service layer — API client and domain types.
src/services/pipPoverty and Inequality Platform API service layer — separate client and domain types.
src/services/projectsProjects API service layer — separate client and domain types.
src/configServer-specific environment variable parsing and validation with Zod.
tests/Unit and integration tests, mirroring the src/ structure.
skills/The published worldbank-guide agent skill, served over MCP and shipped in npm, the MCPB bundle, and Docker.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for logging, ctx.state for storage
  • Register new tools and resources in the createApp() arrays
  • Wrap 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:

sh
bun run devcheckbun run test

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Source: README.md at commit 20edda6

Tools

9

worldbank_list_topics

List World Bank Topics

List all 21 World Bank thematic topics (Economy & Growth, Health, Education, and others) with descriptions. Use it to browse the indicator space by theme or to find a topic_id for worldbank_search_indicators.

Takes no parameters.

worldbank_list_sources

List World Bank Data Sources

List the 70+ World Bank data sources (datasets), such as World Development Indicators, International Debt Statistics, and Doing Business. Returns source IDs and names for use as source_id in worldbank_search_indicators, worldbank_get_data, and worldbank_list_countries, one page at a time.

Parameterspageper_page

worldbank_list_countries

List World Bank Countries

List countries and regional aggregates with metadata: ISO codes, region, income level, lending type, capital, and coordinates. Filter by region code (e.g. EAS, SSF, NAC), income level (LIC, LMC, UMC, HIC), and lending type (IDX for IDA, IBD for IBRD, IDB for Blend); filters combine by AND. Aggregate entries are excluded by default, leaving individual countries only; set include_aggregates=true to also return region, income group, and world aggregate entities.

Parameterspageregionper_pagesource_idincome_levellending_typeinclude_aggregates

worldbank_get_country

Get World Bank Country

Fetch metadata for one country or aggregate entity: ISO codes, region, income level, lending type, capital, and coordinates. Accepts an ISO2 code (US, DE), an ISO3 code (USA, DEU), or a World Bank aggregate code (EAS, HIC, WLD); "all" and lists of codes are rejected. Use worldbank_list_countries to browse valid codes.

Parameterscountry_coderequired

worldbank_search_indicators

Search World Bank Indicators

Search the 29,500+ World Bank indicator catalog by keyword, topic, or source, returning indicator IDs and metadata for worldbank_get_data. Provide at least one of query, topic_id, or source_id; a topic and a source together narrow to indicators in both. A keyword query matches every term against indicator ID, name, and full description, in any word order, across the whole catalog or the whole selected topic or source; punctuation is ignored, so the query needs at least one letter or digit. Exact ID or name matches rank first, then names starting with the phrase as whole words, then whole-phrase matches, then matches where every term is a whole word of the ID or name, then other ID/name matches, then description-only matches; within each of those, World Development Indicators series come first, then other live sources, then archives, and a series comes ahead of its own breakdowns by sex, area, or age. Each indicator ID appears once, even where the catalog publishes it under two sources. Each result carries the first 150 characters of its description; worldbank_get_indicator returns the whole of it. Find topic IDs with worldbank_list_topics and source IDs with worldbank_list_sources.

Parameterspagequeryper_pagetopic_idsource_id

worldbank_get_indicator

Get World Bank Indicator

Fetch metadata for one World Bank indicator by ID: name, description, unit, source dataset, source organization, and thematic topics. Use worldbank_search_indicators to find the ID when only the concept is known; "all" and lists of IDs are rejected.

Parametersindicator_idrequired

worldbank_get_data

Get World Bank Indicator Data

Query World Bank indicator values for one or more countries across a time range — the primary data-access tool; find indicator_id values with worldbank_search_indicators. Observations carry a null value where data is not available for a country×year cell, which is common for sparse series. Set at most one of date_range (a time window), mrv (the latest N periods across the requested countries), or mrnev (each country's own latest N values). Some series, such as Global Economic Monitor's, publish quarterly or monthly values beside annual ones: frequency picks the form mrv and mrnev select from (annual by default), and a date_range's own form (2024, 2024Q1, 2024M01) picks it for a window. lastUpdated gives the serving source's last update date, the data vintage to cite. For "all" countries, page through the results at up to 1000 per page, since the API returns several hundred entries per indicator. Indicators the standard data endpoint does not serve — WDI Database Archives, PEFA, ICP, GDLD, International Debt Statistics: DSSI, Food Prices for Nutrition — are answered from their own dataset instead; the response then carries sourceScoped, naming that dataset and the release, classification, sector, or counterpart area applied (see dimension_value), because those values can be archived or superseded figures rather than current ones.

Parametersmrvpagemrnevper_pagecountriesrequiredfrequencysource_iddate_rangeindicator_idrequireddimension_value

worldbank_get_poverty

Get World Bank Poverty and Inequality Estimates

Query poverty and inequality estimates from the World Bank Poverty and Inequality Platform (PIP) for economies and for PIP's own aggregates — World, World Bank regions, income groups, lending groups, and fragility groups. Returns the poverty headcount ratio, poverty gap, and poverty severity at any poverty line, plus mean and median welfare and population. Use it for inequality and distribution questions too — survey-based economy rows carry the Gini coefficient, mean log deviation, polarization, and the ten decile income/consumption shares, because PIP returns poverty and inequality in the same row. PIP is a separate dataset from the WDI series worldbank_get_data reads: it measures welfare in PPP dollars per person per day, at a PPP vintage ppp_version selects, and computes its aggregates at any poverty line, where worldbank_get_data carries only the published lines. Every row reports how it was produced. Nullable estimateType separately identifies actual, nowcast, or projection estimates, while distributionType preserves the source distribution classification (micro, group, or imputed); missing upstream classifications remain null. On an economy, estimationType "survey" rows carry the full inequality block; "interpolation", "extrapolation", and "CMD estimation" rows are gap-filled estimates for years no survey covers, and their gini, mld, polarization, and decileShares are null — a documented gap in the source data, not an error. Aggregate rows (isAggregate true) are "actual", "nowcast", or "projection", add popInPoverty, and carry no distributional block.

Parameterspageyearper_pagecountriesrequiredfill_gapsppp_versionpoverty_linewelfare_typereporting_level

worldbank_search_projects

Search World Bank Projects

Search the World Bank lending portfolio — the individual loans, credits, and grants the Bank finances — by free text, country, region, status, sector names, financing window (IBRD, IDA, Grants, Other), and board approval date. For classified education commitments use sector: ["Education"], rather than a free-text education query. Returns the project ID, name, borrowing country, region, status, board approval and closing dates, the commitment amount in USD with its IBRD, IDA, and grant parts, financing windows, major sectors, and a link to the project page. This is the operations catalogue, not the statistics catalogue: use it for "what is the World Bank funding in Kenya", "which climate adaptation projects are active", or "how much was committed to education in South Asia since 2020". For development statistics and time series, use worldbank_search_indicators and worldbank_get_data instead. Countries take the ISO3 or ISO2 codes the other tools take (BRA or BR), and multi-country operations carry a World Bank regional code such as 3A; WDI aggregates such as SSF or WLD are rejected, since the portfolio lists operations by economy — use region for those. Every filter is an exact match upstream and combines with the others by AND, so a narrow search can legitimately return nothing; when it does, the response says whether the country codes matched anything on their own.

Parameterspagequeryregionsectorstatusper_pagecountriesapproved_toapproved_fromfinancial_typeinclude_abstract

Version history

9
  1. v0.6.0LatestNov 3, 2026
  2. v0.5.4Oct 18, 2026
  3. v0.5.3Oct 7, 2026
  4. v0.5.2Sep 26, 2026
  5. v0.5.0Sep 25, 2026
  6. v0.4.1Sep 25, 2026
  7. v0.3.8Sep 22, 2026
  8. v0.3.7Sep 16, 2026
  9. v0.3.6Sep 16, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts