@cyanheads/worldbank-mcp-server

v0.1.8 pre-1.0

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

@cyanheads/worldbank-mcp-server
claude mcp add --transport http worldbank-mcp-server https://worldbank.caseyjhand.com/mcp
codex mcp add worldbank-mcp-server --url https://worldbank.caseyjhand.com/mcp
{
  "mcpServers": {
    "worldbank-mcp-server": {
      "url": "https://worldbank.caseyjhand.com/mcp"
    }
  }
}
gemini mcp add --transport http worldbank-mcp-server https://worldbank.caseyjhand.com/mcp
{
  "mcpServers": {
    "worldbank-mcp-server": {
      "command": "bunx",
      "args": [
        "@cyanheads/worldbank-mcp-server@latest"
      ]
    }
  }
}
{
  "mcpServers": {
    "worldbank-mcp-server": {
      "type": "http",
      "url": "https://worldbank.caseyjhand.com/mcp"
    }
  }
}
curl -X POST https://worldbank.caseyjhand.com/mcp \
  -H "Content-Type: application/json" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'

Tools

7

worldbank_list_topics

open-world

Lists all 21 World Bank thematic topics (Economy & Growth, Health, Education, etc.) with descriptions. Use to browse the indicator space or find a topic_id for worldbank_search_indicators.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "worldbank_list_topics",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
view source ↗

worldbank_list_sources

open-world

Lists the 70+ World Bank data sources (datasets) such as World Development Indicators, IDS, and Doing Business. Returns source IDs and names for use as source_id in worldbank_search_indicators. Supports pagination.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "worldbank_list_sources",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "page": {
      "default": 1,
      "description": "Pagination page number (1-based).",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "per_page": {
      "description": "Results per page (default: server default, max: 100).",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "required": [
    "page"
  ],
  "additionalProperties": false
}
view source ↗

worldbank_list_countries

open-world

Lists countries and regional aggregates with metadata: ISO codes, region, income level, capital, and coordinates. Filterable by region code (e.g. EAS, SSF, NAC) and income level (LIC, LMC, UMC, HIC). By default, excludes regional/income-group aggregate entries and returns individual countries only. Set include_aggregates=true to also see region, income group, and world aggregate entities.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "worldbank_list_countries",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "region": {
      "description": "Filter by World Bank region code. Valid codes: EAS (East Asia & Pacific), ECS (Europe & Central Asia), LCN (Latin America & Caribbean), MEA (Middle East & North Africa), NAC (North America), SAS (South Asia), SSF (Sub-Saharan Africa).",
      "type": "string"
    },
    "income_level": {
      "description": "Filter by income group code: LIC (Low income), LMC (Lower middle income), UMC (Upper middle income), HIC (High income).",
      "type": "string"
    },
    "include_aggregates": {
      "default": false,
      "description": "When true, includes regional, income-group, and world aggregate entries alongside individual countries. Default false (individual countries only).",
      "type": "boolean"
    },
    "page": {
      "default": 1,
      "description": "Pagination page number (1-based).",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "per_page": {
      "description": "Results per page (default: server default, max: 300).",
      "type": "integer",
      "minimum": 1,
      "maximum": 300
    }
  },
  "required": [
    "include_aggregates",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

worldbank_get_country

open-world

Fetches full metadata for a specific country or aggregate entity: region, income level, capital, coordinates, and lending type. Accepts ISO2 codes (US, DE), ISO3 codes (USA, DEU), or World Bank aggregate codes (EAS, HIC, WLD).

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "worldbank_get_country",
    "arguments": {
      "country_code": "<country_code>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "country_code": {
      "type": "string",
      "minLength": 1,
      "description": "Country code. Accepts ISO2 (US), ISO3 (USA), or aggregate code (EAS, HIC, WLD). Use worldbank_list_countries to browse valid codes."
    }
  },
  "required": [
    "country_code"
  ],
  "additionalProperties": false
}
view source ↗

worldbank_search_indicators

open-world

Searches the 29,500+ World Bank indicator catalog by keyword, topic, or source. Returns indicator IDs and metadata for chaining into worldbank_get_data. At least one of query, topic_id, or source_id must be provided. When combined with topic_id or source_id, keyword filtering applies across all results in that topic or source. Use worldbank_list_topics for topic IDs, worldbank_list_sources for source IDs.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "worldbank_search_indicators",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "description": "Keyword search terms. At least one of query, topic_id, or source_id must be provided.",
      "type": "string"
    },
    "topic_id": {
      "description": "Filter by topic ID (e.g. \"1\" for Agriculture, \"3\" for Economy & Growth). Use worldbank_list_topics to browse valid IDs.",
      "type": "string"
    },
    "source_id": {
      "description": "Filter by data source ID (e.g. \"2\" for World Development Indicators). Use worldbank_list_sources to browse valid IDs.",
      "type": "string"
    },
    "page": {
      "default": 1,
      "description": "Pagination page number (1-based).",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "per_page": {
      "description": "Results per page (default: server default, max: 100).",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "required": [
    "page"
  ],
  "additionalProperties": false
}
view source ↗

worldbank_get_indicator

open-world

Fetches complete metadata for a single World Bank indicator by its ID: name, description, source dataset, source organization, unit, and thematic topics. Use worldbank_search_indicators to discover indicator IDs if you only know the concept.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "worldbank_get_indicator",
    "arguments": {
      "indicator_id": "<indicator_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "indicator_id": {
      "type": "string",
      "minLength": 1,
      "description": "Indicator code (e.g. NY.GDP.PCAP.CD, SP.POP.TOTL). Use worldbank_search_indicators to find valid IDs."
    }
  },
  "required": [
    "indicator_id"
  ],
  "additionalProperties": false
}
view source ↗

worldbank_get_data

open-world

Queries World Bank indicator values for one or more countries across a time range. The primary data-access tool — use worldbank_search_indicators to find indicator_id values. Returns observations with null values when data is not available for a country×year cell (common for sparse series). Specify either date_range (historical analysis) or mrv (most recent N values), not both. For "all" countries, use pagination (per_page up to 1000) since the API returns ~266 entries per indicator.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "worldbank_get_data",
    "arguments": {
      "indicator_id": "<indicator_id>",
      "countries": "<countries>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "indicator_id": {
      "type": "string",
      "minLength": 1,
      "description": "Indicator code to query (e.g. NY.GDP.PCAP.CD, SP.POP.TOTL). Use worldbank_search_indicators to find valid IDs."
    },
    "countries": {
      "anyOf": [
        {
          "type": "string",
          "description": "A single country code or \"all\"."
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "description": "A country code."
          },
          "description": "An array of country codes."
        }
      ],
      "description": "Country codes. Accepts: ISO2 (US, CN), ISO3 (USA, CHN), regional aggregate codes (EAS, LCN, MEA, SAS, SSF, ECS, NAC), income group codes (HIC, UMC, LMC, LIC), world code (WLD), or \"all\" for all 266 entries (use pagination). Pass a single string or an array of codes for multi-country queries."
    },
    "date_range": {
      "description": "Year or year range in YYYY or YYYY:YYYY format (e.g. \"2020\" or \"2010:2023\"). Mutually exclusive with mrv.",
      "type": "string"
    },
    "mrv": {
      "description": "Return the N most recent available values (1–10). Mutually exclusive with date_range.",
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    },
    "page": {
      "default": 1,
      "description": "Pagination page number (1-based).",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "per_page": {
      "description": "Results per page (default: server default, max: 1000). Use higher values for \"all\" country queries.",
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    }
  },
  "required": [
    "indicator_id",
    "countries",
    "page"
  ],
  "additionalProperties": false
}
view source ↗

Resources

2

Indicator metadata for a known World Bank indicator ID: name, description, source, and thematic topics. Stable reference URI — use worldbank_search_indicators to discover indicator IDs.

uri worldbank://indicator/{indicatorId} mime application/json

Country metadata for a known country or aggregate code: ISO codes, region, income level, capital, and coordinates. Accepts ISO2 (US), ISO3 (USA), or World Bank aggregate codes (EAS, HIC). Use worldbank_list_countries to browse valid codes.

uri worldbank://country/{countryCode} mime application/json