@pipeworx/morocco-hcp-statistics
Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/morocco-hcp-statistics’s. Install: one-click buttons
Connect to just the @pipeworx/morocco-hcp-statistics pack
https://gateway.pipeworx.io/morocco-hcp-statistics/mcp — only @pipeworx/morocco-hcp-statistics’s own tools, nothing else in the catalog.
No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.
Tools: 3
Morocco’s national economic and social indicators from the Haut-Commissariat au Plan (HCP), the national statistics authority: monthly and quarterly series for consumer prices (national and by city), industrial producer prices, industrial, mining, energy and fishing output, tourism nights, rail traffic, external trade, exchange rates, public finances, the Casablanca stock exchange, labour-force indicators, land registrations and national accounts. Labels are in the publisher’s French wording.
Tools
ma_bulletins()— the quarterly bulletins covered (title, quarter, publication date, series parsed from each, sheets not parsed), the topic areas, anddata_as_of.ma_indicators(search?, topic?, limit?)— find indicator series by name. Accepts French terms (“indice general”, “tourisme”, “chomage”) or English ones (“inflation”, “unemployment”, “euro”). Returns an id, table, unit note, frequency and latest value per hit. No arguments lists the topics.ma_indicator_series(id, from?, to?)— the full time series for one id (YYYY-MM or YYYY-Qn periods), the latest value, and the change versus the previous period and versus a year earlier (computed by Pipeworx from the published values and labelled as such). A miss returnsfound:falsewithdata_as_ofand nearby ids.
Every response carries source, data_as_of (the newest bulletin’s publication date) and reuse_terms.
Auth
Keyless.
Data sources
- Haut-Commissariat au Plan (HCP, Morocco), Bulletin statistique — the quarterly statistical bulletin of national indicators.
The bulletin is published as a presentation-style workbook (bilingual French/Arabic, merged cells, several tables per sheet), not through a per-indicator interface. There is nothing to proxy, so this pack serves a parsed copy: scripts/bake-index.mjs reads the newest bulletins, finds each table’s period header, turns every labelled numeric row into a series, merges the editions (newest wins per period) and writes src/hcp-index-data.ts. The gateway loads that table from KV on first use (workers/gateway/src/pack-baked-indexes.json); the pack makes no request to the publisher at call time.
Reuse terms
The publisher’s site terms (Conditions générales d’utilisation, Version 1.0) state:
“En conformité avec les dispositions et normes internationales d’ouverture des données et notamment les dispositions de la licence CC BY 4.0, vous êtes autorisés à télécharger les indicateurs du site hcp.ma et bds.hcp.ma librement sauf spécification contraire et à les réutiliser, y compris à des fins commerciales. La réutilisation est toutefois conditionnée par le respect de l’intégrité de l’information et des données et la mention précise des sources.”
Redistribution is therefore permitted with attribution (credit the Haut-Commissariat au Plan) and without altering the meaning of the data. Every response repeats this in reuse_terms.
Refreshing
Run node mcps/morocco-hcp-statistics/scripts/bake-index.mjs when the publisher lists a new bulletin (about one per quarter; --limit N sets how many recent editions to merge, default 12). It needs the unzip CLI, makes one request per workbook, and refuses to write if the newest bulletin does not parse. Commit the regenerated src/hcp-index-data.ts; the deploy uploads it to KV.
Known gaps
- Ids are positional within a sheet. When one label repeats in a sheet’s table, later copies carry a
~Nsuffix and are taken from the newest bulletin only, because their order cannot be trusted to line up across editions. A label spelled differently between editions (e.g. “1 EUR” and “1EUR”) is held as two series. - Provisional and revised markers the publisher puts in sheet headings (
*,R) are stripped, not carried per value. - Units come from the table heading (
unit_note) and, for labour-force rows, from the row label (“en milliers”); there is no separate unit column in the source. - Not every sheet parses in every edition.
ma_bulletinslists the sheets that were not turned into series for each bulletin (for example the labour-force sheet in the Q1 2026 edition). - Older editions use older sheet layouts; the merged history starts about three years back and is thinner for tables that were reorganised.
Tools
- ma_bulletins — List the Moroccan Haut-Commissariat au Plan (HCP) quarterly statistical bulletins covered: title, quarter, publication date, how many indicator series parsed from each, plus the topic areas (prices, t
- ma_indicators — Search Morocco’s national economic and social indicators from the HCP quarterly bulletin (monthly and quarterly series: consumer and producer price indexes by city, industrial/mining/energy output, to
- ma_indicator_series — Time series for one Moroccan HCP indicator by id (from ma_indicators): every period with its value, latest value, and the change vs the previous period and vs a year earlier. Optional from/to as YYYY-
Tools
ma_bulletins— List the Moroccan Haut-Commissariat au Plan (HCP) quarterly statistical bulletins covered: title, quarter, publication date, how many indicator series parsed from each, plus the topic areas (prices, tma_indicator_series— Time series for one Moroccan HCP indicator by id (from ma_indicators): every period with its value, latest value, and the change vs the previous period and vs a year earlier. Optional from/to as YYYY-ma_indicators— Search Morocco's national economic and social indicators from the HCP quarterly bulletin (monthly and quarterly series: consumer and producer price indexes by city, industrial/mining/energy output, to