worldbank-mcp

worldbank-mcp

Provides query capabilities for global economic and social development data from the World Bank Open Data API.

Category
访问服务器

README

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

npm install -g worldbank-mcp

Run instantly with npx

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:

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

Run instantly with npx:

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

Run directly with node:

{
  "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

{
  "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

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

3. Search Indicators

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

4. Get Economic Data

{
  "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

{
  "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

{
  "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

{
  "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 Code Description Unit
GDP Gross Domestic Product Current US$
GDP_GROWTH GDP growth rate Annual %
GDP_PER_CAPITA GDP per capita Current US$
GNI Gross National Income Current US$
GNI_PER_CAPITA GNI per capita Current US$
EXPORTS_GDP Exports of goods and services % of GDP
FDI_NET Foreign direct investment, net inflows Current US$
INFLATION Inflation rate Annual %
UNEMPLOYMENT Unemployment rate % of total labor force

Social Indicators

Indicator Code Description Unit
POPULATION Population, total People
LIFE_EXPECTANCY Life expectancy at birth Years
BIRTH_RATE Birth rate per 1,000 people
DEATH_RATE Death rate per 1,000 people
INTERNET_USERS Internet users % of population

Education Indicators

Indicator Code Description Unit
LITERACY_RATE Literacy rate % of people ages 15 and above
SCHOOL_ENROLLMENT School enrollment, primary % gross
SCHOOL_COMPLETION Primary completion rate % of relevant age group
TEACHERS_PRIMARY Teachers in primary education Count
EDUCATION_EXPENDITURE Government expenditure on education % of GDP

Health and Nutrition Indicators

Indicator Code Description Unit
HEALTH_EXPENDITURE Current health expenditure % of GDP
PHYSICIANS Physicians per 1,000 people
HOSPITAL_BEDS Hospital beds per 1,000 people
IMMUNIZATION Immunization, measles % of children ages 12-23 months
HIV_PREVALENCE Prevalence of HIV % of population ages 15-49
MALNUTRITION Prevalence of undernourishment % of population
TUBERCULOSIS Incidence of tuberculosis per 100,000 people

Common Country Codes

Country Code Country Code
China CN United States US
Japan JP Germany DE
United Kingdom GB France FR
India IN Brazil BR
Russia RU Australia AU

Project Structure

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选