Skip to main content
Glama
World Bank Data360 MCP Server

World Bank Data360 MCP Server

by llnOrmll

World Bank Data360 MCP Server

MCP server that exposes World Bank Data360 OPEN API to Claude Desktop.

Features

  • πŸ” Search 1000+ economic and social indicators

  • πŸ“Š Access data for 200+ countries

  • πŸ“… Historical data spanning 60+ years

  • 🌍 Filter by country, year, demographics

Related MCP server: Data360 MCP Server

Installation

cd /Users/llnormll/WorkSpace/world-bank-mcp

# Install dependencies
uv sync

Test

uv run world_bank_mcp/server.py

Claude Desktop Configuration

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "world-bank-data": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/world-bank-mcp",
        "run",
        "src/world_bank_mcp/server.py"
      ]
    }
  }
}

Restart Claude Desktop.

Usage

Ask Claude:

  • "Get world poverty data for 2024"

  • "Show me GDP per capita for Japan in 2020"

  • "Compare CO2 emissions for USA, China, and India"

Claude will automatically:

  1. Search for the right dataset

  2. Check available years

  3. Retrieve the data with proper filters

  4. Format and present results

Available Tools

1. search_datasets

Search for datasets by keywords.

Tip: Use optimized queries like "gross domestic product total" instead of "GDP data"

2. get_temporal_coverage

Get available years for a specific dataset.

3. retrieve_data

Retrieve actual data with filters (year, countries, demographics).

Data Sources

  • WB_WDI: World Development Indicators

  • WB_HNP: Health, Nutrition & Population Statistics

  • WB_GDF: Global Development Finance

  • WB_IDS: International Debt Statistics

Common Country Codes

USA, CHN, JPN, DEU, GBR, FRA, IND, BRA, RUS, CAN, KOR, AUS, MEX, IDN, TUR, SAU, ARG, ZAF, ITA, ESP

License

MIT

Available Tools

5 tools
get_temporal_coverage_toolA

[STEP 2/3] Get available years for a specific dataset.

    CRITICAL: Always call this BEFORE retrieve_data to avoid errors.
    
    Workflow:
    1. search_datasets - Done βœ“
    2. get_temporal_coverage (this tool) - Check what years are available
    3. retrieve_data - Use latest_year from this response
    
    Returns: start_year, end_year, latest_year, and full list of available years.
    Next step: Call retrieve_data with year=latest_year.
    

Inputs: indicator (required), database (required). Returns: object

retrieve_data_toolA

[STEP 3/3] Retrieve actual data from World Bank Data360.

⚠️ PREREQUISITE: Call get_temporal_coverage first to get latest_year.

🚨 CRITICAL TYPE REQUIREMENTS 🚨

When calling this tool, you MUST pass parameters with the EXACT types shown below. Common mistakes that cause validation errors:

❌ INCORRECT: {"limit": "10"} ← limit as STRING (causes error!) βœ… CORRECT: {"limit": 10} ← limit as INTEGER

❌ INCORRECT: {"exclude_aggregates": "true"} ← boolean as STRING βœ… CORRECT: {"exclude_aggregates": true} ← boolean as BOOLEAN

❌ INCORRECT: {"year": 2023} ← year as NUMBER βœ… CORRECT: {"year": "2023"} ← year as STRING

πŸ“‹ PARAMETER TYPES - MUST MATCH EXACTLY:

STRING parameters (use quotes in JSON): indicator: "WB_WDI_SP_POP_TOTL" database: "WB_WDI" year: "2023" countries: "USA,CHN,JPN" sex: "M" or "F" or "_T" age: "0-14" sort_order: "desc" or "asc"

INTEGER parameters (no quotes in JSON): limit: 10 (default: 20)

BOOLEAN parameters (no quotes in JSON): exclude_aggregates: true or false (default: true) compact_response: true or false (default: true)

🎯 CORRECT JSON EXAMPLES:

Example 1 - Top 10 countries by population: { "indicator": "WB_WDI_SP_POP_TOTL", "database": "WB_WDI", "year": "2023", "limit": 10, "sort_order": "desc", "exclude_aggregates": true }

Example 2 - Specific countries GDP: { "indicator": "WB_WDI_NY_GDP_MKTP_CD", "database": "WB_WDI", "year": "2023", "countries": "USA,CHN,JPN" }

Example 3 - All data with aggregates: { "indicator": "WB_WDI_SP_POP_TOTL", "database": "WB_WDI", "year": "2022", "exclude_aggregates": false }

⚑ HOW IT WORKS:

  • countries parameter: API fetches ONLY those countries (efficient)

  • exclude_aggregates: Filters out 47 regional/income codes (ARB, AFE, WLD, HIC, etc.) ⚠️ DEFAULT is TRUE - only individual countries returned Set to false to include aggregates like "World", "High income", "Arab World"

  • sort_order: Sorts by OBS_VALUE before limiting

  • limit parameter: Returns top N records to minimize tokens ⚠️ DEFAULT is 20 - provides reasonable default, override if you need more

  • compact_response: Returns only essential fields (country, country_name, year, value) ⚠️ DEFAULT is TRUE - minimizes token usage by ~75% Set to false if you need all fields (REF_AREA, TIME_PERIOD, OBS_VALUE, UNIT_MEASURE, etc.)

πŸ“Š AFTER RECEIVING DATA: Format results as markdown table:

  • Sort by value (highest to lowest)

  • Add rank numbers

  • Format with thousand separators

  • Include country names (not just codes)

Returns: Data records with summary statistics.

Inputs: indicator (required), database (required), year, countries, +6 more. Returns: object

search_datasets_toolA

[STEP 1/3] Search World Bank Data360 for datasets.

    <purpose>
        Search World Bank Data360 for datasets. This is STEP 1 of 3 in the data retrieval workflow.
        Find indicator IDs and database IDs needed for subsequent data operations.
    </purpose>

    <workflow>
        <step number="1">search_datasets (this tool) - Find indicator ID and database ID</step>
        <step number="2">get_temporal_coverage - Check available years BEFORE retrieving data</step>
        <step number="3">retrieve_data - Fetch actual data with proper year and limit parameters</step>
    </workflow>

    <optimization_tips>
        <tip>Remove punctuation: "GDP, total" becomes "GDP total"</tip>
        <tip>Expand abbreviations: "GDP" becomes "Gross Domestic Product"</tip>
        <tip>Add "total" for aggregates: "population" becomes "population total"</tip>
        <tip>Use lowercase for consistency</tip>
        <tip>Remove filler words: "data", "statistics"</tip>
    </optimization_tips>

    <common_databases>
        <database id="WB_WDI">World Development Indicators (most comprehensive)</database>
        <database id="WB_HNP">Health, Nutrition and Population</database>
        <database id="WB_GDF">Global Development Finance</database>
    </common_databases>

    <examples>
        <example original="GDP">gross domestic product total</example>
        <example original="population data">population total</example>
        <example original="">poverty headcount ratio</example>
    </examples>

    <returns>
        List of datasets with indicator IDs, names, database IDs, and search scores.
    </returns>

    <next_step>
        Call get_temporal_coverage with the indicator and database from results.
    </next_step>

Inputs: search_query (required), top. Returns: object

search_local_indicatorsA

Search through local metadata for World Bank indicators (instant, offline).

    This is a FAST alternative to search_datasets that searches through locally cached
    metadata. Use this to discover what types of data are available before using the
    API search.

    How it works:
    - Searches indicator names, codes, and descriptions
    - Instant results (no API call)
    - Returns relevance-ranked matches

    Search tips:
    - Use simple keywords: "unemployment", "poverty", "co2", "water"
    - Search works on indicator names AND descriptions
    - Case-insensitive
    - More specific queries = better results

    Example queries:
    - "unemployment" β†’ finds all unemployment-related indicators
    - "mortality infant" β†’ finds infant mortality indicators
    - "internet" β†’ finds internet usage indicators
    - "renewable energy" β†’ finds renewable energy indicators

    Parameters:
    - query: Search term (e.g., "unemployment", "gdp growth", "water access")
    - limit: Maximum number of results to return (default: 20)

    Returns: List of matching indicators with codes, names, descriptions, and relevance scores.

    Note: This returns indicator codes but NOT database IDs. After finding an indicator,
    use search_datasets with the indicator name to get the database ID needed for data retrieval.
    

Inputs: query (required), limit. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: search_datasets_tool and search_local_indicators serve different search functions (API vs. offline), get_temporal_coverage_tool handles year availability, retrieve_data_tool fetches actual data, and list_popular_indicators provides curated discovery. The descriptions explicitly differentiate their roles, preventing agent misselection.

    Naming Consistency3/5

    The naming is mixed, with some tools using verb_noun (search_datasets_tool, retrieve_data_tool) and others using noun_verb (get_temporal_coverage_tool, list_popular_indicators). While all names are readable and descriptive, the inconsistency in verb placement and suffix usage ('_tool' on some but not others) reduces predictability. The pattern is not chaotic but lacks uniformity.

    Tool Count5/5

    With 5 tools, the count is well-scoped for a World Bank data server, covering essential workflows: discovery (search_local_indicators, list_popular_indicators), search (search_datasets_tool), validation (get_temporal_coverage_tool), and retrieval (retrieve_data_tool). Each tool earns its place without bloat, supporting a clear data access pipeline.

    Completeness4/5

    The tool set covers the core data retrieval workflow comprehensively: search, temporal validation, and data fetching, with additional discovery aids. Minor gaps exist, such as no explicit tools for filtering or aggregating data beyond basic parameters, but agents can work around these using the provided tools. The surface supports end-to-end data access without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers