wbgapi360
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@wbgapi360show me GDP growth for the US and China for the last 10 years"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
wbgapi360
World Bank Data API client with two interfaces: A synchronous Python API for analysts, and a Model Context Protocol (MCP) server for AI agents.
What You Get
Smart indicator discovery (
search) with heuristic ranking.High-level data retrieval (
get_data) with code normalization.Publication-style charts (
plot) with optional visual dependencies.MCP tools for search, data access, comparisons, trend analysis, rankings, and chart generation.
Related MCP server: Countries MCP Server
Installation
pip install wbgapi360Optional extras:
# Visualization support (matplotlib + seaborn)
pip install "wbgapi360[visual]"
# Mapping support (geopandas + matplotlib)
pip install "wbgapi360[map]"Python API (Analysts)
import wbgapi360 as wb
# 1) Search indicators
results = wb.search("inflation")
for r in results[:3]:
print(f"[{r['code']}] {r['name']}")
# 2) Fetch data
df = wb.get_data(
indicator="NY.GDP.MKTP.KD.ZG",
economies=["USA", "CHN", "PER"],
years=10
)
print(df.head())
# 3) Plot (requires: pip install "wbgapi360[visual]")
wb.plot(
chart_type="trend",
data=df,
title="GDP Growth",
subtitle="Annual %"
)MCP Server (AI Agents)
Run the server
After installation:
wbgapi360From repository source:
python -m wbgapi360.mcp.serverClaude Desktop example
{
"mcpServers": {
"worldbank": {
"command": "wbgapi360",
"args": []
}
}
}MCP tools
Tool | Description |
| Semantic search for indicator codes. |
| Retrieve time series data for one or many countries. |
| Compare countries across one or many indicators. |
| Return trend statistics (growth, volatility, direction). |
| Rank countries for an indicator globally or by region. |
| Generate chart images from JSON payloads. |
CLI (Developer Utility)
A separate CLI is provided for manual testing and quick queries:
wbgapi360-cli --helpCommands:
searchdataconfig
Development
pip install -e ".[dev,visual]"
python -m pytest -q testsProject Notes
Unofficial client
This software is an independent open-source project. It is not affiliated with The World Bank Group.
Attribution
wbgapi360 is inspired by Tim Herzog's original wbgapi project and extends it with MCP support and AI-focused workflows.
Author
Maykol Medrano
Applied Economist / Policy Data Scientist
Email: mmedrano2@uc.cl
License
MIT. See LICENSE.
Available Tools
6 toolsanalyze_trendA
Analyze time-series trend with statistical insights.
Returns growth rates, volatility, trend direction, and more.
| Name | Required | Description | Default |
|---|---|---|---|
| years | No | Years of historical data (default: 20) | |
| economy | Yes | ISO3 country code | |
| indicator | Yes | Indicator code | |
| include_stats | No | Include statistical analysis (default: True) |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool 'Returns growth rates, volatility, trend direction, and more,' which gives some insight into output behavior. However, it does not disclose side effects, error conditions, or specifics about statistical methods, and there is no mention that the operation is read-only. The description adds limited context beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise: two sentences that front-load the primary purpose and then list key outputs. It avoids filler and is appropriately sized for the tool's complexity. A slight deduction because it could have packed more useful guidance (e.g., a usage tip) without much extra length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has an output schema, so the description need not detail return values. However, the description lacks context about when to use this analysis tool versus siblings like compare_countries or rank_countries. It also does not mention prerequisites (e.g., valid indicator codes) or limitations. Given the presence of a full output schema and 100% parameter coverage, the description is adequate but not rich enough for a higher score.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, meaning all four parameters have descriptions in the input schema. The tool description does not add new meaning about parameters, such as how 'years' affects the trend analysis or how 'include_stats' changes output. Since the schema already documents all parameters, a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: 'Analyze time-series trend with statistical insights.' It specifies the resource (time-series trend) and the action (analyze), and distinguishes itself from siblings like get_data (fetching) and plot_chart (visualizing). The added details about output ('growth rates, volatility, trend direction') further clarify its unique role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for trend analysis but provides no explicit guidance on when to use this tool versus alternatives. It does not reference sibling tools or state conditions like 'use this when you need statistical summaries rather than raw data or charts.' The context is clear but lacks explicit exclusions or alternative recommendations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
compare_countriesB
Compare multiple countries across indicators.
| Name | Required | Description | Default |
|---|---|---|---|
| years | No | Years of historical data (default: 10) | |
| economies | Yes | List of ISO3 country codes | |
| normalize | No | Normalize to 0-100 scale for comparison (default: False) | |
| indicators | Yes | One or more indicator codes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It only says 'Compare multiple countries across indicators,' which does not disclose whether this is a read-only operation, any side effects, or what the output represents. This is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single clear sentence with no wasted words. It is front-loaded and easy to parse, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The output schema and parameter schema cover technical details, so the description need not explain return values. However, it lacks usage context, such as when to choose compare_countries over rank_countries, and does not mention behavioral aspects like normalization or historical data. It is adequate but has clear gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with all four parameters (economies, indicators, years, normalize) already documented in the schema. The description adds no additional meaning beyond the schema, so the baseline score of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool compares multiple countries across indicators, which is a specific verb+resource combination. It also distinguishes this tool from siblings like get_data or rank_countries by focusing on cross-country comparison.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives such as rank_countries or get_data. There are no mentions of prerequisites, exclusions, or specific use cases beyond the generic statement.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_dataC
Fetch World Bank data with auto-correction. Set labels=True for human-readable country names.
| Name | Required | Description | Default |
|---|---|---|---|
| years | No | ||
| labels | No | ||
| economies | Yes | ||
| indicator_code | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits. 'Auto-correction' is mentioned but not explained, and there is no detail about return format, limitations, or side effects. This is a significant gap for a data-fetching tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, front-loaded with the main action. It is concise and free of fluff, though the unexplained 'auto-correction' term introduces ambiguity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite the presence of an output schema, the description lacks essential context: what 'auto-correction' does, how years and economies interact, and what the returned data structure represents. This is incomplete for a tool with moderate parameter complexity and important behavioral nuances.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It explains 'labels=True' yields human-readable country names, but years, economies, and indicator_code are left purely to their types. This is only partial value addition.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches World Bank data, using a specific verb 'fetch' and resource. It distinguishes from siblings like search_indicators and plot_chart, though the phrase 'auto-correction' is vague. Overall, the core purpose is clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like compare_countries or analyze_trend. The usage context is only implied by the sibling names, not explicitly stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
plot_chartC
Generate chart with FT style. Advanced: region (latam/africa/europe), bbox, bins, category_labels for map_categorical.
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | ||
| bins | No | ||
| title | No | Chart | |
| region | No | ||
| subtitle | No | ||
| data_json | Yes | ||
| chart_type | Yes | ||
| category_labels | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavioral traits, but it only mentions FT styling and that certain parameters are advanced for map_categorical. It does not describe output format, side effects, error handling, or data requirements, leaving significant behavioral unknowns.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with the main purpose front-loaded and an advanced note appended. It is concise and free of fluff, though very brief; every sentence contributes to understanding the tool's purpose and some parameter context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 8 parameters, no annotations, and 0% schema description coverage, the description is too sparse. The output schema exists, so return values are covered, but the two required parameters (chart_type and data_json) are entirely unexplained, and the tool's behavior is only partially specified. This is inadequate for an agent to confidently invoke the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It names region, bbox, bins, and category_labels with a hint about map_categorical, but it does not explain the required chart_type and data_json parameters, nor the meaning of bbox and bins values. This is insufficient compensation for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Generate chart with FT style', which is a specific verb+resource action that is distinct from sibling tools focused on data retrieval, comparison, and ranking. However, it does not enumerate chart types or fully differentiate its scope from potential visualization alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this tool is for chart generation, and the advanced note hints at map_categorical use. However, it provides no explicit guidance on when to use this versus siblings like analyze_trend or compare_countries, nor any exclusions or alternative recommendations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
rank_countriesB
Rank countries by indicator value.
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | Number of top countries to return (default: 20) | |
| region | No | Region filter (latam, africa, asia, europe, mena) or None for global | |
| indicator | Yes | Indicator code |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure, but it only restates the core action. It does not indicate ranking direction (ascending/descending), tie handling, missing data behavior, or whether it returns only top N despite the top_n parameter. No behavioral traits are disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A concise one-sentence description that wastes no words. It is appropriately sized for a simple tool while still including the core action and object.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description fails to mention key behavioral aspects like the top_n limit or region filtering, which are crucial for a ranking tool. Even with schema coverage, the overall context is incomplete for a tool with 3 parameters and an output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 100% coverage of all parameters (indicator, top_n, region) with descriptions, so baseline 3 applies. The description adds no extra meaning beyond the schema; 'indicator value' merely mirrors the indicator parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Rank countries by indicator value' uses a specific verb (rank) and resource (countries), clearly distinguishing it from siblings like compare_countries or get_data. It conveys a distinct operation on countries based on indicator data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like compare_countries or analyze_trend. The description does not mention any context, exclusions, or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_indicatorsC
Search for World Bank indicators using Smart Ranking.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| database_id | No | WB_WDI |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and only says 'using Smart Ranking.' It does not disclose whether the operation is read-only, what Smart Ranking entails, or the response format, leaving behavioral traits unexplained.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that directly states the tool's purpose without unnecessary words. It is highly concise and front-loaded, earning the highest score for efficiency.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite having an output schema, the description lacks usage guidelines, parameter semantics, and behavioral context. With three parameters and sibling tools that could overlap in function, the description is insufficient for an agent to select and invoke the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage for its three parameters (query, limit, database_id), and the description does not explain any of them. The agent is left to infer the meaning and purpose of each parameter without any guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Search for World Bank indicators using Smart Ranking,' clearly identifying the verb and resource. However, it does not distinguish this tool from siblings like get_data or rank_countries, so it lacks explicit sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives. The description only states what it does without any context, exclusions, or mention of when it should be preferred over sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v0.1.0- First observed
analyze_trend - First observed
compare_countries - First observed
get_data - First observed
plot_chart - First observed
rank_countries - First observed
search_indicators
TDQS
Each tool has a clearly distinct purpose: searching indicators, fetching data, plotting, comparing, analyzing trends, and ranking. No two tools appear to do the same thing.
All tool names follow a consistent verb_noun pattern in lowercase snake_case (search_indicators, get_data, plot_chart, compare_countries, analyze_trend, rank_countries). The naming is uniform and predictable.
With 6 tools, the server is well-scoped for a World Bank data analysis context. Each tool covers a distinct aspect of the workflow without being excessive or minimal.
The surface covers discovery, data retrieval, visualization, comparison, trend analysis, and ranking, which is solid. A minor gap is the lack of explicit country metadata or list endpoints, but this can often be worked around with known country codes.
Maintenance
Related MCP Connectors
World Bank MCP — wraps the World Bank Data API v2 (free, no auth)
Access World Bank development indicators for 200+ countries.
World Bank Data360 MCP — the World Bank's modern unified data platform.
Query 29,500+ World Bank development indicators for 200+ countries across 60+ years.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that interfaces with the WorldBank API to retrieve economic and labor market data such as GDP and employment indicators. It allows LLMs to query global development statistics including unemployment rates, labor force participation, and sectoral employment data.-
- AlicenseNot gradedqualityDmaintenanceMCP Server that gives AI assistants access to comprehensive country data from 250+ countries.1MIT
- AlicenseAqualityCmaintenanceMCP server for UNICEF child development statistics. Query 790+ child-focused indicators across 200+ countries with disaggregations by sex, age, wealth quintile, and residence. No API key required.95MIT
- FlicenseNot gradedqualityDmaintenanceExposes World Bank development data and country information via MCP resources and tools, enabling AI agents to query historical indicators and live API data.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MaykolMedrano/mcp_wbgapi360'
If you have feedback or need assistance with the MCP directory API, please join our Discord server