Worldbank Server
БесплатноНе проверенEnables querying 29,500+ World Bank development indicators for 200+ countries across 60+ years via MCP, with 7 tools for browsing topics, sources, countries, an
Описание
Enables querying 29,500+ World Bank development indicators for 200+ countries across 60+ years via MCP, with 7 tools for browsing topics, sources, countries, and indicators.
README
@cyanheads/worldbank-mcp-server
Query 29,500+ World Bank development indicators for 200+ countries across 60+ years via MCP. STDIO or Streamable HTTP.
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
| Tool | Description |
|---|---|
worldbank_list_topics |
List all 21 World Bank thematic topics with descriptions |
worldbank_list_sources |
List 70+ World Bank data sources (datasets) with pagination |
worldbank_list_countries |
List countries and aggregates with global metadata, or discover a selected source's own entity IDs, by name or code with filter |
worldbank_get_country |
Fetch full metadata for a specific country or aggregate by ISO2, ISO3, or aggregate code |
worldbank_search_indicators |
Search the 29,500+ indicator catalog by keyword, topic, or source |
worldbank_get_indicator |
Fetch complete metadata for a single indicator: name, description, source, unit, and topics |
worldbank_get_data |
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 |
worldbank_get_poverty |
Poverty 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_projects |
Search the World Bank lending portfolio by text, country, region, sector, status, financing window, and board approval date |
Resources
| Resource | Description |
|---|---|
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.md |
Research 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.
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, which holds them all
- 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, andworldbank_get_data
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 300 per page - Returns ISO codes, region, income level, lending type, capital, and coordinates; an invalid region or income code is a typed
invalid_filtererror - Individual countries only by default —
include_aggregates=trueadds regional, income-group, and world aggregates, flaggedisAggregate filteron both listings matches every word against each entry's id and name, ignoring case, diacritics, punctuation, and word order (source_id=50withKenyareturns Kenya and its provinces); totals and pages count matches- With
source_id, returns that dataset's canonical entities asid,name, andsourceId, including subnational IDs;filterworks there too. Global classification filters andinclude_aggregates=truefail asunsupported_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) —allor a list is rejected asmultiple_countries - Returns 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 3000 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.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 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_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 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, 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 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
sourceScopedwith the release, classification, sector, or counterpart area applied (dimension_value, by id or label) source_idselects a dataset explicitly; discover its entity IDs with the same source onworldbank_list_countries. Source-only entities retain their opaquecountryCodeand an emptycountryIso3;sourceIdnames the serving dataset when known. Unknown or unsupported sources fail assource_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'sFCSis rejected withFCVYguidance, without asserting the same membership);yearas a year,all, orMRV; anypoverty_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;
estimationTypeseparates survey rows from gap-filled ones, whose inequality fields are null, andisAggregateflags aggregate rows estimateTypepreserves actual/projection/nowcast provenance independently ofestimationType;distributionTypepreserves micro/group/imputed classification. Both remain null when upstream supplies nonefill_gaps(defaulttrue) includes gap-filled years and fills a reporting level or welfare type a surveyed year lacks;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 as3Wor3E;3Ais the pre-split Africa code, found only on closed and dropped operations),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,
objective(the project development objective, plain text), country, region, status, dates, the commitment amount with its IBRD, IDA, and grant parts, financing windows, major sectors,sectors(name, code, major sector, and percent share, null where the project publishes no split), 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 it include_abstract(off by default) adds complete abstracts, as plain text, without changing the page sizesectoraccepts an array ofsectors[].namevalues (notmajorSectorsnames), combining them by OR and with other filters by AND. A project matches when it lists the sector at any share, so weight totals bypercent. Each name is queried bare, with a trailing space, and with theFY17 -prefix, covering every upstream spelling; codes are not aliases. Unknown names return no matches; blank names and embedded caret separators fail asinvalid_sector_name
worldbank://indicator/{indicatorId} resource
- Indicator metadata as
application/json— name, description, unit, source dataset, source organization, and topics indicatorIdcomes 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, coordinates - Accepts 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 filter - Null-value transparency —
nullobservations andnullCountsurfaced rather than silently dropped isAggregatedistinguishes 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_indicatorsnamesworldbank_list_topicsfor topic IDs,worldbank_get_datanamesworldbank_search_indicatorsfor indicator discovery - Structured error contracts with typed
reasoncodes and actionablerecoveryhints 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 - Every paged tool honors
per_pageup to its page maximum (indicator search 3000, sources 100, countries 300, data, poverty, and projects 1000); larger requests are served at that maximum with requested/served sizes and a notice.WORLDBANK_CLAMP_LIMITS=falseadvertises each maximum in the input schema and rejects a largerper_pageinstead. The default is 50
Getting started
Connect to the hosted instance, no install:
claude mcp add --transport http worldbank-mcp-server https://worldbank.caseyjhand.com/mcp
Or run it locally:
claude mcp add worldbank-mcp-server -- npx -y @cyanheads/worldbank-mcp-server
For other clients, add this to the MCP config file:
{
"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:
| Variable | Description | Default |
|---|---|---|
MCP_TRANSPORT_TYPE |
Transport: stdio or http |
stdio |
MCP_HTTP_PORT |
HTTP server port | 3010 |
MCP_HTTP_HOST |
HTTP server hostname | 127.0.0.1 |
MCP_HTTP_ENDPOINT_PATH |
HTTP endpoint path where the MCP server is mounted | /mcp |
MCP_PUBLIC_URL |
Public origin override for TLS-terminating reverse-proxy deployments | none |
MCP_AUTH_MODE |
Authentication: none, jwt, or oauth |
none |
MCP_SESSION_MODE |
HTTP 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 declaration |
stateless |
MCP_LOG_LEVEL |
Log level (debug, info, notice, warning, error) |
info |
LOG_TOOL_FAILURE_PAYLOADS |
Log 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 redacted |
false |
STORAGE_PROVIDER_TYPE |
Storage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1 |
in-memory |
OTEL_ENABLED |
Enable OpenTelemetry | false |
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT |
Opt-in OTLP log export (e.g. http://localhost:4318/v1/logs); the base OTEL_EXPORTER_OTLP_ENDPOINT never enables it |
none |
WORLDBANK_API_BASE_URL |
World Bank Indicators API base URL override | https://api.worldbank.org/v2 |
WORLDBANK_PIP_BASE_URL |
Poverty and Inequality Platform API base URL override | https://api.worldbank.org/pip/v1 |
WORLDBANK_PROJECTS_BASE_URL |
Projects API base URL override | https://search.worldbank.org/api/v3 |
WORLDBANK_DEFAULT_PER_PAGE |
Positive-integer default page size for list/search/data operations; every paged tool clamps it to its page maximum | 50 |
WORLDBANK_CLAMP_LIMITS |
Serve a per_page above a tool's page maximum at that maximum, with a notice; false advertises each maximum in the input schema and rejects a larger per_page (a server default above a maximum is still served at it) |
true |
WORLDBANK_CATALOG_CACHE_TTL_MS |
Lifetime 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 all |
3600000 |
See .env.example for the full list of optional overrides.
Running the server
Local development
Requires Bun v1.4.4 or higher (or Node.js v24+).
Clone and install:
git clone https://github.com/cyanheads/worldbank-mcp-server.git cd worldbank-mcp-server && bun install cp .env.example .env # optional overridesBuild 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 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
| Directory | Purpose |
|---|---|
src/mcp-server/tools |
Tool definitions (*.tool.ts). Nine tools covering topics, sources, countries, indicators, data, poverty, and projects. |
src/mcp-server/resources |
Resource definitions. Indicator and country metadata resources. |
src/services/worldbank |
World Bank Indicators API service layer — API client and domain types. |
src/services/pip |
Poverty and Inequality Platform API service layer — separate client and domain types. |
src/services/projects |
Projects API service layer — separate client and domain types. |
src/config |
Server-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/catchin tool logic - Use
ctx.logfor logging,ctx.statefor 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:
bun run devcheck
bun run test
License
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Установка Worldbank Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/cyanheads/worldbank-mcp-serverFAQ
Worldbank Server MCP бесплатный?
Да, Worldbank Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Worldbank Server?
Нет, Worldbank Server работает без API-ключей и переменных окружения.
Worldbank Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Worldbank Server в Claude Desktop, Claude Code или Cursor?
Открой Worldbank Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Unyly Deploy
Deploy sites and MCP servers to Unyly straight from your AI agent
автор: UnylyTemplate MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectServer Sequential Thinking
MCP server for sequential thinking and problem solving
автор: GitHub ActionsAmap Maps Mcp Server
MCP server for using the AMap Maps API
автор: duxiaohuiPayMCP
Lightweight payments layer for MCP servers: turn tools into paid endpoints with a two-line decorator. [PyPI](https://pypi.org/project/paymcp/) · [npm](https://w
автор: blustAIdemo
demo — MCP server via Smithery
автор: yoojoohans-jpgServer For Power BI
Enables exploring Microsoft Fabric / Power BI workspaces and semantic models, and executing ad-hoc DAX queries.
автор: Mitsubishi-FusoCompare Worldbank Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
