Worldbank MCP README

The full upstream README, mirrored for reference. Install config, tool schemas, adoption signals and our own overview live on the Worldbank MCP listing page.

World Bank MCP 🌐

npm version License: MIT GitHub issues

World Bank Model Context Protocol service based on World Bank Open Data API, which provides query capabilities for global economic and social development data.

πŸ“‹ Features

  • βœ… Country information query
  • βœ… Indicator search (education, health, environment, etc.)
  • βœ… Economic data query (GDP, inflation, unemployment, etc.)
  • βœ… Social development data query (population, life expectancy, internet usage, etc.)
  • βœ… Education data query (literacy rate, school enrollment, etc.)
  • βœ… Health and nutrition data query (hospitals, immunization, HIV prevalence, malnutrition, etc.)
  • βœ… Real-time World Bank API integration
  • βœ… Model Context Protocol compatibility

πŸ“¦ Installation

Install globally with npm

Terminal
npm install -g worldbank-mcp

Run instantly with npx

Terminal
npx worldbank-mcp

πŸ’» Usage in MCP Clients

To use this service in MCP-compatible clients (such as Claude Desktop, Cursor, Cherry Studio, etc.), you need to configure it as follows:

Configuration example:

Run with npm if you have installed it globally:

config.json
{
  "mcpServers": {
    "worldbank-mcp": {
      "name": "World Bank Data",
      "command": "worldbank-mcp",
      "description": "World Bank Open Data MCP Server"
    }
  }
}

Run instantly with npx:

config.json
{
  "mcpServers": {
    "worldbank-mcp": {
      "name": "World Bank Data",
      "command": "npx",
      "args": ["worldbank-mcp"],
      "description": "World Bank Open Data MCP Server"
    }
  }
}

Run directly with node:

config.json
{
  "mcpServers": {
    "worldbank-mcp": {
      "name": "World Bank Data",
      "command": "node",
      "args": ["path/to/worldbank-mcp/build/index.js"],
      "description": "World Bank Open Data MCP Server"
    }
  }
}

Replace path/to/ with the actual path to your project directory.

πŸ”§ MCP Tools

1. Get Countries List

config.json
{
  "name": "get-countries",
  "description": "Get all countries supported by World Bank",
  "parameters": {
    "region": "Filter by region (optional)",
    "incomeLevel": "Filter by income level (optional)"
  }
}

2. Get Country Information

config.json
{
  "name": "get-country-info", 
  "description": "Get detailed information for a specific country",
  "parameters": {
    "countryCode": "Country code (e.g.: CN, US)"
  }
}

3. Search Indicators

config.json
{
  "name": "search-indicators",
  "description": "Search for available indicators",
  "parameters": {
    "keyword": "Search keyword"
  }
}

4. Get Economic Data

config.json
{
  "name": "get-economic-data",
  "description": "Get economic data for a country",
  "parameters": {
    "countryCode": "Country code",
    "indicator": "Economic indicator (GDP, GDP_GROWTH, GDP_PER_CAPITA, GNI, GNI_PER_CAPITA, EXPORTS_GDP, FDI_NET, INFLATION, UNEMPLOYMENT)",
    "years": "Number of years to query (optional, default 10 years)"
  }
}

5. Get Social Development Data

config.json
{
  "name": "get-social-data",
  "description": "Get social development data for a country", 
  "parameters": {
    "countryCode": "Country code",
    "indicator": "Social indicator (POPULATION, LIFE_EXPECTANCY, BIRTH_RATE, DEATH_RATE, INTERNET_USERS)",
    "years": "Number of years to query (optional, default 10 years)"
  }
}

6. Get Education Data

config.json
{
  "name": "get-education-data",
  "description": "Get education data for a country", 
  "parameters": {
    "countryCode": "Country code",
    "indicator": "Education indicator (LITERACY_RATE, SCHOOL_ENROLLMENT, SCHOOL_COMPLETION, TEACHERS_PRIMARY, EDUCATION_EXPENDITURE)",
    "years": "Number of years to query (optional, default 10 years)"
  }
}

7. Get Health and Nutrition Data

config.json
{
  "name": "get-health-data",
  "description": "Get health and nutrition data for a country", 
  "parameters": {
    "countryCode": "Country code",
    "indicator": "Health indicator (HEALTH_EXPENDITURE, PHYSICIANS, HOSPITAL_BEDS, IMMUNIZATION, HIV_PREVALENCE, MALNUTRITION, TUBERCULOSIS)",
    "years": "Number of years to query (optional, default 10 years)"
  }
}

πŸ“– Supported Indicators

Economic Indicators

Indicator CodeDescriptionUnit
GDPGross Domestic ProductCurrent US$
GDP_GROWTHGDP growth rateAnnual %
GDP_PER_CAPITAGDP per capitaCurrent US$
GNIGross National IncomeCurrent US$
GNI_PER_CAPITAGNI per capitaCurrent US$
EXPORTS_GDPExports of goods and services% of GDP
FDI_NETForeign direct investment, net inflowsCurrent US$
INFLATIONInflation rateAnnual %
UNEMPLOYMENTUnemployment rate% of total labor force

Social Indicators

Indicator CodeDescriptionUnit
POPULATIONPopulation, totalPeople
LIFE_EXPECTANCYLife expectancy at birthYears
BIRTH_RATEBirth rateper 1,000 people
DEATH_RATEDeath rateper 1,000 people
INTERNET_USERSInternet users% of population

Education Indicators

Indicator CodeDescriptionUnit
LITERACY_RATELiteracy rate% of people ages 15 and above
SCHOOL_ENROLLMENTSchool enrollment, primary% gross
SCHOOL_COMPLETIONPrimary completion rate% of relevant age group
TEACHERS_PRIMARYTeachers in primary educationCount
EDUCATION_EXPENDITUREGovernment expenditure on education% of GDP

Health and Nutrition Indicators

Indicator CodeDescriptionUnit
HEALTH_EXPENDITURECurrent health expenditure% of GDP
PHYSICIANSPhysiciansper 1,000 people
HOSPITAL_BEDSHospital bedsper 1,000 people
IMMUNIZATIONImmunization, measles% of children ages 12-23 months
HIV_PREVALENCEPrevalence of HIV% of population ages 15-49
MALNUTRITIONPrevalence of undernourishment% of population
TUBERCULOSISIncidence of tuberculosisper 100,000 people

Common Country Codes

CountryCodeCountryCode
ChinaCNUnited StatesUS
JapanJPGermanyDE
United KingdomGBFranceFR
IndiaINBrazilBR
RussiaRUAustraliaAU

Project Structure

Code
worldbank-mcp/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts      # Main entry file
β”‚   └── types.ts      # Type definitions
β”œβ”€β”€ build/            # Compiled output
β”œβ”€β”€ package.json      # Project configuration
β”œβ”€β”€ tsconfig.json     # TypeScript configuration
└── README.md         # Documentation

Technology Stack

  • TypeScript - Type-safe development language
  • Model Context Protocol SDK - MCP protocol implementation
  • Axios - HTTP client
  • Zod - Data validation
  • Commander - Command-line tool

API Endpoints

Project uses World Bank Open Data API:

  • Base URL: https://api.worldbank.org/v2
  • Country data: /countries
  • Indicator data: /indicators
  • Country indicator data: /country/{code}/indicator/{id}

License

This project is licensed under the MIT License - see the LICENSE file for details.