Query 1 billion time series from 93 statistics providers (ECB, BLS, OECD, IMF, World Bank, Eurostat) via @pipeworx/mcp-dbnomics — 5 tools
@pipeworx/mcp-dbnomics v0.1.0 -- verified recipe
Install: npm install @pipeworx/mcp-dbnomics
Transport: Library-style export ({tools, callTool}) -- NOT stdio. Copy src/index.ts outside node_modules, run with node --experimental-strip-types.
5 Tools
| Tool | Params | Description |
|---|---|---|
search | query, limit?, offset? | Full-text search across all 93 providers (~1B series) |
list_providers | (none) | All 93 statistics providers with codes and names |
list_datasets | provider, limit?, offset? | Datasets for a provider (returns hierarchical category_tree, not flat list) |
get_series | provider, dataset, series_code, observations? | Fetch a specific time series with data points |
find_series | provider, dataset, dimensions?, limit?, offset?, observations? | Browse/filter series within a dataset |
CRITICAL BUG: .toUpperCase() breaks most providers
Lines 130, 139, 147 of src/index.ts call reqStr(args, 'provider', ...).toUpperCase() on the provider code before passing it to the API. The DBnomics API is case-sensitive. This silently breaks every provider whose canonical code is not all-uppercase:
| Provider | Canonical code | After .toUpperCase() | Result |
|---|---|---|---|
| Eurostat | Eurostat | EUROSTAT | 404 — 21,068 datasets invisible |
| Apple | Apple | APPLE | 404 |
Google | GOOGLE | 404 | |
| citymapper | citymapper | CITYMAPPER | 404 |
| OpenTable | OpenTable | OPENTABLE | 404 |
| openfisca-tunisia | openfisca-tunisia | OPENFISCA-TUNISIA | 404 |
Providers that happen to be all-caps (ECB, BLS, OECD, IMF, FRED, WB) work fine, which masks the bug for the most common use cases.
Workaround: Bypass callTool and call the API directly with the correct case, OR patch the source to remove .toUpperCase() from listDatasets, getSeries, and findSeries.
BUG: find_series dimensions must be arrays, not strings
The tool schema declares dimensions as additionalProperties: { type: 'string' }, suggesting {"FREQ": "A"}. But the API requires array values: {"FREQ": ["A"]}. Passing string values returns HTTP 400.
BUG: list_datasets response structure
The API returns a hierarchical category_tree (nested children), not a flat array. The tool returns the raw tree without flattening. To get a flat list of dataset codes, you must recursively walk category_tree[].children[] looking for entries with code properties.
Verified Execution Trace (20 calls)
list_providers({}) -> 93 providers (ECB,BLS,Eurostat,FRED,IMF,OECD,WB,INSEE,ISTAT,...)
search({query:'GDP growth annual'}) -> {num_found:3854, docs:[{provider_code:'Eurostat',dataset_code:'CENS_21COB_R3',...}]}
search({query:'consumer price index United States'}) -> {num_found:678}
search({query:'unemployment rate Germany'}) -> {num_found:1293}
search({query:'bitcoin price'}) -> {num_found:0} (crypto NOT covered)
list_datasets({provider:'ECB'}) -> category_tree with 72 datasets (BSI,CBD,EXR,FM,...)
list_datasets({provider:'Eurostat'}) -> ERROR 404 (toUpperCase bug: 'EUROSTAT' != 'Eurostat')
Direct fetch https://api.db.nomics.world/v22/providers/Eurostat -> 200 OK, 21068 datasets
list_datasets({provider:'BLS'}) -> category_tree with 34 datasets (ap,bd,ce,ci,cs,...)
get_series({provider:'ECB',dataset:'EXR',series_code:'A.USD.EUR.SP00.A'}) -> EUR/USD annual rate 2000-2024 (25 observations)
get_series({provider:'OECD',dataset:'DP_LIVE',series_code:'DEU.UNEMP.TOT.PC_LF.A'}) -> DE unemployment 2000-2023 (24 obs)
get_series({provider:'BLS',dataset:'ln',series_code:'LNS14000000'}) -> US unemployment monthly 1948-2024 (921 obs)
get_series({provider:'IMF',dataset:'WEO:2024-10',series_code:'USA.NGDP_RPCH'}) -> US GDP growth forecast 1980-2029 (50 obs)
get_series({provider:'IMF',dataset:'WEO:2024-10',series_code:'DEU.PCPIPCH'}) -> DE CPI