MapleStatsMCP

About

About MapleStats

MapleStats is an open-source MCP server that gives AI agents one way into Canadian open data, in English and French. Every figure it returns can be traced to its publisher: the citation, the quality flags and the licence come back with the number.

Looking for the French version? Lisez-le en français.

What it is

One server with 504 tools across 95 modules and 201 sources: Statistics Canada, the Bank of Canada, CMHC, 46 other federal and national sources, 10 international comparators (OECD, Eurostat, the World Bank, BIS, ILOSTAT, the US Federal Reserve, the European Central Bank, the ABS and the UK's ONS), and 142 provincial, territorial and city sources (102 open-data catalogues, plus agencies and data feeds). A connected agent sees only three tools, plan_query, search_tools and call_tool, and finds the other 503 by searching in plain language.

How it works

MapleStats leaves the data with their publishers. It keeps no dataset of its own, only short-lived caches: every call goes to the publisher, and every result names its source, the exact URL and the time of the query. Most data calls can also come back as an R, Python, Stata or Julia script, an Excel Power Query or a formatted Excel workbook, so the analysis can be rerun without the agent.

What comes back is built to be checked. A Statistics Canada value carries its table and vector, reference period, release date, unit and scale, geography and a link to the table's page. StatCan's quality flags stay on the value ("use with caution", "too unreliable to be published", preliminary, revised), and microdata tabulations give a CV and a quality grade for each cell where the survey's user guide sets one. When a figure is not published, or a period is not released yet, the server says so and points to the closest published figure. Before an answer goes out, check_answer re-reads the StatCan and Bank of Canada figures it cites and reports only the problems.

Use the hosted server, or run it on your machine over stdio; either way there is no account or API key. The code is on GitHub under the MIT licence. Version 0.7.0 is a beta; the roadmap lists what is covered and what is next.

Who builds it

Hi, I'm Daniel Sánchez Pazmiño, an economist and statistician in Edmonton who loves data and wants more people to get it easily. MapleStats is my independent project, not affiliated with my employer. More at danielstats.io.

Acknowledgements. MapleStats owes its architecture to EcuDataMCP, the MCP server for Ecuador's open data that I help maintain with DweskZ and its other contributors. Its approach to Canadian data owes much to the R developers who got there first: Jens von Bergmann (mountainMath) and his co-authors, including Dmitry Shkolnik (dshkol), Thierry Warin (statcanR), Valentin Lucet (rgovcan), and others. Thanks to them, and to everyone who publishes Canadian data in the open.

Alternatives

MapleStats is one way into Canadian data, not the only one. These are the other options I know of, checked in November 2026.

Other MCP servers

A narrower server is simpler to set up and leaves the agent fewer tools to choose from.

  • openmcpopendatafyi · Python An open-source MCP server for about 75,000 datasets and statistical tables from open.canada.ca, Alberta, Ontario and the full Statistics Canada table inventory: semantic search over a DuckDB index plus live CKAN search, 12 tools, no API keys.
  • mcp-canadaReyemTech · Python Bilingual tools for federal, provincial and municipal APIs, with a local SQLite store.
  • mcp-statcanAryan-Jhaveri · Python StatCan only, through its WDS and SDMX APIs, with a hosted endpoint and a command-line tool.
  • statcan-mcp bank-of-canada-mcpKole Harvey · TypeScript Two small servers, for StatCan tables and Bank of Canada series, run with npx.
  • mcp-statcan mcp-bank-of-canada mcp-opendata-canadapipeworx-io · TypeScript One server each for StatCan, the Bank of Canada and open.canada.ca, run locally or hosted.
  • ca-economic-indicators-mcpdonniertf-hub · hosted A hosted server for StatCan headline indicators (CPI, unemployment, GDP, population): one free tool limited to 20 calls a day, and two more on a paid monthly plan.

The official MCP Registry and Glama list more single-topic servers.

R and Python packages

Libraries you call from your own code, with no agent in between.

  • cansimmountainMath · R StatCan tables and vectors as tidy data frames; MapleStats's R scripts use it.
  • statcanRwarint · R Whole StatCan tables through the Web Data Service, in English or French.
  • stats_canianepreston · Python StatCan tables and vectors in pandas.
  • cancensusmountainMath · R Census data and boundaries through the CensusMapper API, with a free key.
  • pycancensusdshkol · Python A Python port of cancensus, with the same data and the same key.
  • cmhcmountainMath · R Starts, rents and vacancy rates from CMHC's Housing Market Information Portal.
  • publicdata_caajharris · Python Downloads StatCan tables, CMHC files and open.canada.ca datasets, with provenance records.
  • rgovcanVLucet · R Searches and downloads datasets from open.canada.ca; installs from GitHub, no longer on CRAN.
  • valetrunkelcorey · R A client for every Bank of Canada Valet endpoint, on CRAN.
  • canpumfmountainMath · R Downloads and labels StatCan's public use microdata files.

The official sources

MapleStats calls these directly. None needs a key.

  • Web Data ServiceStatistics Canada · API Every StatCan table and vector, updated each business day.
  • Valet APIBank of Canada · API The Bank's series and groups in JSON, CSV or XML.
  • Housing Market Information PortalCMHC · Portal Starts, rents and vacancy rates, with CSV downloads.
  • Open Government PortalGovernment of Canada · Portal The federal open-data catalogue.
  • CKAN APICKAN project · API The catalogue API behind open.canada.ca and many provincial and city portals.

If I have missed a tool or described one unfairly, please open an issue.