---
summary: "Fix TypeError on invalid indicator/country, isAggregate lookup for aggregate codes, and inaccurate total/pages when filtering aggregates"
breaking: false
security: false
---

# 0.1.6 — 2026-05-24

## Fixed

- **`worldbank_get_data`** crashed with `TypeError: Cannot read properties of undefined (reading '0')` when the World Bank API returned an error for an invalid indicator or country code. The `/country/{code}/indicator/{id}` endpoint wraps error envelopes in an array (`[{ message: [...] }]`); the handler now unwraps the array before accessing `message`. ([#5](https://github.com/cyanheads/worldbank-mcp-server/issues/5))
- **`isAggregate`** was always `false` for aggregate entries. The data endpoint returns `country.id` as ISO2 (e.g. `"ZH"` for AFE), but aggregate codes are ISO3 (e.g. `"AFE"`). The lookup now checks both `raw.countryiso3code` and `country.id`. ([#6](https://github.com/cyanheads/worldbank-mcp-server/issues/6))
- **`worldbank_list_countries`** with `include_aggregates: false` returned inaccurate `total` and `pages` counts. The World Bank API has no server-side filter for aggregates, so the handler now over-fetches all entries (max 300), filters client-side, and re-paginates to compute accurate totals. ([#7](https://github.com/cyanheads/worldbank-mcp-server/issues/7))
