MapleStats: One MCP to rule all Canadian Data

MapleStats is an open-source MCP server that lets AI assistants search 186 Canadian data sources, pull numbers straight from the publisher, and tell you where they came from.
english
canada
MCP
AI
open data
statcan
Author

Daniel Sánchez

Published

November 6, 2026

3 MCPs for the statisticians, keepers of the weights and the margins,
7 for the demographers, counting who comes to stay,
9 for the financial analysts, doomed to explain the rate…
But MapleStats is the one MCP to rule them all.

Okay, not quite. But over the last few weeks I’ve been building MapleStats, my solution to the wild goose chase that happens every time a project needs data from several Canadian sources.

It’s a pain many of us know. Say you need one number, like two-bedroom rents in Calgary or how much Canadians put into their RRSPs, and you end up with eight tabs open: the StatCan table viewer, the CMHC housing portal, a Bank of Canada page, some provincial open-data catalogue. Canada produces a lot of great data, but that also means there can be ten different places to find the same number, or different versions of it, and it’s not obvious to a newcomer which portal has what you need. Each one has its own search, its own data identifiers and its own way of exporting a CSV.

Asking ChatGPT usually doesn’t help. It sends you to the wrong table or, worse, hallucinates a number. Government websites were built for people clicking around, and AI assistants have a hard time with them, even the newer agents that can click around in your browser.

That’s the gap MapleStats fills. It’s an open-source Model Context Protocol (MCP) server that lets AI assistants like Claude or ChatGPT search 186 Canadian data sources, pull numbers straight from the publisher, and tell you where they came from. No more 100 tabs open to find one number.

Why an MCP, and what’s inside

In big 2026, the newest AIs took the world by storm. I remember thinking: these are great, but they still can’t automate the most annoying part of my work, which is googling like a maniac and clicking through portals without knowing if I’m in the right place. Claude in Chrome showed some promise, but I noticed it messed around with the StatCan portal much like a toddler would.

MCPs change the game. MCP is a standard, released by Anthropic in late 2024, for plugging tools and data into AI assistants. An MCP server tells the assistant what it can do, like searching StatCan tables, and does it when asked. Claude, ChatGPT, Cursor and most other assistants now support it.

There are 399 tools at this point, covering 49 federal and national sources and 137 provincial, territorial and municipal ones. The main ones are:

Source What your assistant can reach
Statistics Canada Every data table and series, Census Profiles from 2001 to 2021, 158 public use microdata files with their codebooks and survey weights, classifications such as NAICS, and The Daily
Bank of Canada About 16,000 series through its Valet API: the policy rate, bond yields, exchange rates, commodity prices
CMHC Housing starts, rents, vacancy rates and the rest of the Housing Market Information Portal
Other federal agencies IRCC immigration tables, CRA tax statistics, FCAC credit card and bank account comparisons, CIHI health indicators, etc.
Provinces and cities The Alberta Economic Dashboard, about 7,000 Institut de la statistique du Québec tables, and open-data catalogues in 12 of 13 provinces and territories

You might say: “I still don’t trust a clanker to get it right, and even if it does, I want to check it myself.” Fair enough. So ask for a script: MapleStats writes an Excel Power Query, or R or Python code (Stata and Julia too), that fetches the same data from the source, so you can check it yourself without the AI.

One does not simply query StatCan

Statistics Canada is the heart of MapleStats, and also the trickiest part. StatCan doesn’t have one API, it has several: the Web Data Service for tables and series, an SDMX API for slicing big tables, a separate service for classifications, another for the 2021 Census Profile, plus microdata files, The Daily, open databases and daily bulk-update files. Each one has its own identifiers and its own quirks.

Eighty-six of MapleStats’ 399 tools are for StatCan alone, and a lot of the work went into the annoying details so your agent doesn’t have to learn them. Some services lock overnight while StatCan updates its data (midnight to 8:30 a.m. Eastern). Big SDMX queries quietly return a random sample unless you list every code. Values come in thousands or millions depending on the table. MapleStats handles the first two, and it never rescales a number behind your back: the value is exactly what StatCan published, with its scale right beside it.

If you want the gory details, I wrote them up on the StatCan page of the website.

En français, s’il vous plaît

MapleStats is meant to be truly bilingual, so this section is in French.

Au Canada, les données publiques sont bilingues, mais les outils pour les trouver le sont rarement. La plupart des assistants IA, des API et des bibliothèques de code ont été pensés d’abord en anglais. Une question posée en français mène donc souvent à de moins bons résultats, et les sources publiées seulement en français, comme les catalogues de Données Québec et de la Ville de Montréal, passent facilement sous le radar. Bien des francophones finissent par travailler en anglais simplement pour avoir accès aux mêmes données.

MapleStats a été conçu bilingue dès le départ. Chaque outil est décrit en anglais et en français, alors une recherche en français trouve exactement les mêmes outils qu’une recherche en anglais. La plupart des outils acceptent un paramètre de langue et renvoient les titres, les étiquettes et les notes en français quand la source les publie. Les sources québécoises, comme Données Québec, Montréal et les quelque 7 000 tableaux de l’Institut de la statistique du Québec, font partie du même catalogue que Statistique Canada ou la Banque du Canada. Vous pouvez donc travailler entièrement en français, du début à la fin, avec les mêmes sources citées et les mêmes scripts pour refaire l’analyse.

Essayez par exemple : « Combien de logements ont été mis en chantier dans la région de Montréal l’an dernier, et comment ça se compare à Toronto? »

Beyond just ‘stats’

Pulling the number is often only part of the job. MapleStats also finds the material around it: StatCan’s analysis articles, The Daily and its release calendar, definitions and methodology documents, survey metadata, microdata codebooks, and classifications like NAICS and NOC with the concordances between versions. Outside StatCan, it reads PBO reports, the Canada Gazette and House of Commons debates.

You can ask methodology questions too. For example:

How many non-permanent residents (NPRs) live in Alberta, how does StatCan count them, and why doesn’t it match IRCC’s numbers?

MapleStats pulled 279,477 NPRs in Alberta on July 1, 2026. From the table’s footnotes, it explained who counts as an NPR (permit holders, asylum claimants and their families) and why it won’t match IRCC: IRCC counts valid permits, while StatCan estimates the people actually living here, so it drops permit holders who have left and keeps those still in Canada while a renewal is pending.

How to use it

The easiest way to start is the hosted server. Nothing to install, no account, no API key. Point your assistant to this address:

https://mcp.maplestats.danielstats.io/mcp

If you use an agent like Claude Code, Codex, OpenCode or Cursor, that’s it: your agent can install the MCP and you can query it from then on.

For assistants that live on the web, you can hook up the server too. In Claude (claude.ai or the desktop app), you add it as a custom connector with the address above and no sign-in, on any plan, including Free. In ChatGPT, you turn on developer mode and create an app with the same address and no authentication; this works on the ChatGPT website only. If your workplace uses Microsoft 365 Copilot, you can build a small Copilot Studio agent that uses MapleStats.1 The Connect page has step-by-step instructions for all three, plus every other client.

Tip: Agents don’t always reach for MapleStats on their own. Sometimes they decide a quick web search is easier and go off googling the number, which is exactly what you were trying to avoid. To be safe, tell your agent to use MapleStats in your question (“Using MapleStats, find…”) or add it to your custom instructions.

If you just want to see it work first, I created a chat version you can use in your browser, with nothing to connect. It runs on Claude Haiku 5.5 and uses the same hosted server.2

Running it locally

The hosted server has some limits, which I go over at the end of this post. If you want the full version, run MapleStats on your own computer. The easiest way is to let your agent do it. Paste this into Claude Code, Codex, Cursor or any agent that can run commands on your computer:

Install the MapleStats MCP server locally with uvx and connect it to this agent. Follow the setup steps in https://github.com/dsanchezp18/maplestats-mcp

The agent installs what it needs and tells you when to restart. After that, your assistant starts the server by itself whenever it needs it. If you’d rather do it by hand, or use Claude Desktop, VS Code or Gemini CLI, the Connect page has step-by-step instructions for each, plus Docker and self-hosting options for teams.3

What can this palantír show me?

These are real answers from MapleStats, recorded in fall 2026:

Ask it What came back Where the answer comes from
How has the gap between 10-year and 2-year Government of Canada bond yields moved since 2001? The curve inverted in 2007, 2019 to 2020 and 2022 to 2024. The deepest month was minus 123 basis points in July 2023; by September 2026 it was back to plus 62. Bank of Canada, 6,434 days of yields
Is Canada building more houses or more apartments? Apartments went from 34% of starts in 2005 to 68% in 2025: 164,839 apartments against 41,837 single-detached homes last year. CMHC housing starts
How many new permanent residents chose Edmonton and Calgary? Calgary peaked at 31,165 in 2024 and Edmonton at 24,075. Both fell in 2025, to 23,560 and 18,980. IRCC monthly immigration tables

I have more detailed examples on my demos page, with the charts and the exact tool calls behind each one. Take a look!

Does it actually work?

Building a tool that returns numbers is the easy part. The harder question is whether an assistant using it gives the right number. To find out, I designed the Maple Test: 53 questions about Canadian data, based on my own work, each with an answer key taken from the publisher’s own data. Some are traps, like a figure that isn’t released yet, a closed weather station or a poverty rate StatCan doesn’t publish. Declining a trap is fine; inventing a number is not.

I asked every question three times of eleven setups, all with the same model (Claude Sonnet 5.5) and the same instructions: MapleStats, nine other Canadian data MCP servers, and the model with no data tool at all. I read every answer by hand.

Setup Correct answers, of 53 (average of 3 runs) Share
MapleStats 48.7 92%
Next best MCP server 42.7 81%
No data tool 4 8%

Without data access, the model declined most questions and got 4 right. MapleStats answered 92% correctly, the highest of the ten servers, and made no false claims about the data in any run. One caveat: on Statistics Canada and Bank of Canada questions alone, the servers are close (all but one score between 19 and 23 of 24). MapleStats pulls ahead because it covers more publishers, and I chose the other half of the questions from sources it covers. The benchmarks page has every answer, the grading rules and the full table.

Limitations

I fund this project myself, so the hosted server has some limits, and I can’t guarantee it will always be fast or available.4 Here’s what to expect:

  • Each user can make 60 requests a minute. That’s enough for normal use, but a long research session can hit it.
  • Weighted tables from microdata (statcan_pumf_tabulate) are turned off, since they download whole files. That’s a shame, because it’s one of MapleStats’ best features. For those, you’ll need a local install (see above).

If you plan to use MapleStats heavily, run it on your own computer. If you need heavy online use or a custom application for your team, contact me directly.

Not all who wander are lost

Coverage is in a good place for a first release. Next, I want to make MapleStats more reliable, more precise and broader:

  • A new set of Maple Test questions, written before the next round of fixes, to check whether those fixes make MapleStats more accurate in general and not only on the questions I already know.
  • Standard errors for more microdata files. Only three surveys have them right now (the 2021 Census, the Employment Insurance Coverage Survey and the CSWC), because I only add a method after reading that survey’s user guide.
  • More sources. I’ll keep adding cities and agencies as they open their data (Richmond in BC, Vaughan and St. John’s still don’t have a portal MapleStats can read), plus feeds that are already open but not built yet, like BC Transit’s real-time data.

MapleStats builds on other people’s work. The architecture borrows from EcuDataMCP, the Ecuadorian open data server I built with Luis Figueroa (DweskZ), and from other MCP servers that do similar things, like ReyemTech’s mcp-canada and Hari Saripalli’s opendata.fyi. It also builds on the R and Python packages that did this work first, like cansim and cancensus (Jens von Bergmann and co-authors), statcanR (Thierry Warin), rgovcan (Valentin Lucet) and, in Python, stats_can (Ian Preston). Thanks also to Philip Smith, who shares his own expert knowledge in the open.

The project is still in beta (v0.4.8), so some tools will break when a government site changes, and some answers may be wrong. If you find a problem, open an issue on GitHub. Contributions and requests are welcome too, and the contributor guide explains how to add a new source.

Canadian public data belongs to everyone, and getting to it shouldn’t come with a subscription (and those are often very expensive). Plug MapleStats into your assistant, ask in English or French, and you won’t need to pay for a commercial data platform again. Happy querying! 🍁

Find it on the website, GitHub and PyPI.

P.S. Thank you to J.R.R. Tolkien for allowing me the cringy references, here and all over the MapleStats website. I couldn’t help myself.

MapleStats is independent and open source (MIT). It isn’t affiliated with or endorsed by any government, including my employer, and the data belong to their publishers.

Questions about my work, a collaboration or a speaking invitation? Get in touch →

Footnotes

  1. Check with your IT department first, since your questions go to a server outside your organization.↩︎

  2. The chat demo is preliminary and limited. It caps the number of questions per hour and per day, and answers can be wrong, so check the sources it cites.↩︎

  3. A local install won’t work with ChatGPT or claude.ai in the browser, since they can only reach servers on the public internet. For those, use the hosted server described above.↩︎

  4. Your assistant’s tool calls (a search phrase, a table number) reach the server and Microsoft Azure, its host. MapleStats doesn’t log them, but Azure keeps its own logs.↩︎