aryan-jhaveri avatar

Statistics Canada MCP Server

aryan-jhaveri/mcp-statcan

Gives Claude direct access to Statistics Canada's Web Data Service and SDMX REST APIs for retrieving official Canadian economic, demographic, and social statistics. You get tools to search datasets by keyword, fetch time series data with configurable date ranges, and pull metadata for tables and indicators. Comes with a standalone CLI if you want to download CSV exports without an LLM in the loop. The developer hosts a public HTTP endpoint on Render, so most users can connect without installing anything locally. Stdio mode adds SQLite tools for storing and querying datasets with SQL. Useful when you need authoritative Canadian data for analysis, dashboards, or fact checking economic claims without manually browsing StatCan's web interface.

GitHub stars
8
tools
17
transport
STDIO, HTTP
last updated
Nov 6, 2026

Install

From registry metadata
$ npx add-mcp https://mcp-statcan.com/mcp --name mcp-statcan

Run in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http mcp-statcan https://mcp-statcan.com/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 17 tools

Verified live against the running server on Nov 6, 2026.

get_code_setsDecode StatCan WDS numeric codes (e.g. frequencyCode 6 = Monthly, scalarFactorCode 0 = units). Corresponds to: GET /getCodeSets Without arguments, returns a summary: small code sets (scalar, frequency, symbol, status, ...) in full, and only entry counts for large ones (uom, su...2 params

Decode StatCan WDS numeric codes (e.g. frequencyCode 6 = Monthly, scalarFactorCode 0 = units). Corresponds to: GET /getCodeSets Without arguments, returns a summary: small code sets (scalar, frequency, symbol, status, ...) in full, and only entry counts for large ones (uom, su...

Parameters* required
code_setvalue
One code set to return in full: scalar, frequency, symbol, status, uom, survey, subject, classificationType, securityLevel, terminated, wdsResponseStatus. Omit for a summary (small sets in full, co...
searchvalue
Case-insensitive text or code to filter entries of code_set (e.g. 'percent', '17').
get_all_cubes_listProvides a complete inventory of data tables available via the API, including dimension-level details. Disables SSL Verification. Corresponds to: GET /getAllCubesList Results are paginated. Default returns first 100 cubes. Use offset/limit to page through. Prefer search_cubes_...2 params

Provides a complete inventory of data tables available via the API, including dimension-level details. Disables SSL Verification. Corresponds to: GET /getAllCubesList Results are paginated. Default returns first 100 cubes. Use offset/limit to page through. Prefer search_cubes_...

Parameters* required
limitinteger
Max cubes to return. Default 100.default: 100
offsetinteger
Number of cubes to skip (for pagination). Default 0.default: 0
get_all_cubes_list_liteProvides a complete inventory of data tables available via the API, excluding dimension or footnote information (lighter version). Disables SSL Verification. Corresponds to: GET /getAllCubesListLite Results are paginated. Default returns first 100 cubes. Use offset/limit to pa...2 params

Provides a complete inventory of data tables available via the API, excluding dimension or footnote information (lighter version). Disables SSL Verification. Corresponds to: GET /getAllCubesListLite Results are paginated. Default returns first 100 cubes. Use offset/limit to pa...

Parameters* required
limitinteger
Max cubes to return. Default 100.default: 100
offsetinteger
Number of cubes to skip (for pagination). Default 0.default: 0
search_cubes_by_titleSearches for data cubes/tables where the English or French title contains the provided search term (case-insensitive). Multiple keywords use AND logic (e.g., "tobacco smoking age" finds cubes containing ALL three words). Returns max_results matches (default 10) from offset. Re...3 params

Searches for data cubes/tables where the English or French title contains the provided search term (case-insensitive). Multiple keywords use AND logic (e.g., "tobacco smoking age" finds cubes containing ALL three words). Returns max_results matches (default 10) from offset. Re...

Parameters* required
max_resultsinteger
Max matching cubes to return. Default 10.default: 10
offsetinteger
Skip this many matches; use next_offset from the previous page.default: 0
search_term*string
Text to search for in cube titles. Multiple keywords use AND logic.
get_cube_metadataRetrieves detailed metadata for a specific data table/cube using its ProductId. Includes dimension info, titles, date ranges, codes, etc. Disables SSL Verification. Corresponds to: POST /getCubeMetadata Start with summary=True (default). The summary strips noise (French transl...2 params

Retrieves detailed metadata for a specific data table/cube using its ProductId. Includes dimension info, titles, date ranges, codes, etc. Disables SSL Verification. Corresponds to: POST /getCubeMetadata Start with summary=True (default). The summary strips noise (French transl...

Parameters* required
productId*integer
summaryboolean
When True (default), returns a compact summary: essential cube metadata, dimension names, 3 sample members per dimension, and _next_steps guidance. Set to False only when you need the full raw memb...default: true
get_changed_series_data_from_cube_pid_coordGet the data points of a series (by ProductId + Coordinate) that changed TODAY only. StatCan publishes at 08:30 ET; before then, or on a day the series did not change, this returns changed=false. For past releases use get_changed_cube_list(date). Coordinates are automatically...2 params

Get the data points of a series (by ProductId + Coordinate) that changed TODAY only. StatCan publishes at 08:30 ET; before then, or on a day the series did not change, this returns changed=false. For past releases use get_changed_cube_list(date). Coordinates are automatically...

Parameters* required
coordinate*string
Coordinate string (e.g., '1.1'). Padding to 10 dimensions is handled automatically.
productId*integer
get_series_infoResolve one or more {productId, coordinate} pairs to series metadata (vectorId, titles, frequency, UOM, etc.) in a single API call. Use this to find vectorIds before fetching data with get_sdmx_data or get_sdmx_vector_data. Pass one item or many — same tool either way. Each re...3 params

Resolve one or more {productId, coordinate} pairs to series metadata (vectorId, titles, frequency, UOM, etc.) in a single API call. Use this to find vectorIds before fetching data with get_sdmx_data or get_sdmx_vector_data. Pass one item or many — same tool either way. Each re...

Parameters* required
items*array
List of {productId, coordinate} pairs to fetch series info for in a single batch call.
limitvalue
Max results to return. Default 50.
offsetvalue
Number of results to skip (for pagination). Default 0.default: 0
get_changed_cube_listGet the list of data tables/cubes that were updated on a specific date (YYYY-MM-DD). Disables SSL Verification. Corresponds to: GET /getChangedCubeList/{date} Returns: List[Dict[str, Any]]: A list of dictionaries describing changed cube objects. IMPORTANT: In your final respon...1 params

Get the list of data tables/cubes that were updated on a specific date (YYYY-MM-DD). Disables SSL Verification. Corresponds to: GET /getChangedCubeList/{date} Returns: List[Dict[str, Any]]: A list of dictionaries describing changed cube objects. IMPORTANT: In your final respon...

Parameters* required
date*string
get_series_info_from_vectorRequest series metadata (productId, coordinate, titles, frequency, etc.) by Vector ID. Use only when you start from a vectorId: get_series_info already returns this metadata for series it resolved. Disables SSL Verification. Corresponds to: POST /getSeriesInfoFromVector Return...1 params

Request series metadata (productId, coordinate, titles, frequency, etc.) by Vector ID. Use only when you start from a vectorId: get_series_info already returns this metadata for series it resolved. Disables SSL Verification. Corresponds to: POST /getSeriesInfoFromVector Return...

Parameters* required
vectorId*integer
get_bulk_vector_data_by_rangeFetches bulk data for multiple vectors filtered by *release date* range (YYYY-MM-DDTHH:MM), NOT by reference period. Use this when you want data released within a specific date/time window (e.g., "all updates released yesterday"). *** IMPORTANT: release date vs reference perio...5 params

Fetches bulk data for multiple vectors filtered by *release date* range (YYYY-MM-DDTHH:MM), NOT by reference period. Use this when you want data released within a specific date/time window (e.g., "all updates released yesterday"). *** IMPORTANT: release date vs reference perio...

Parameters* required
endDataPointReleaseDatevalue
limitvalue
Max rows to return. Default 50. Set higher to get more rows.
offsetvalue
Number of rows to skip (for pagination). Default 0.default: 0
startDataPointReleaseDatevalue
vectorIds*array
List of integer vector IDs (e.g. [42076, 41690973]).
get_changed_series_data_from_vectorGet the data points of a series (by Vector ID) that changed TODAY only. StatCan publishes at 08:30 ET; before then, or on a day the series did not change, this returns changed=false. For past releases use get_changed_cube_list(date). Disables SSL Verification. Corresponds to:...1 params

Get the data points of a series (by Vector ID) that changed TODAY only. StatCan publishes at 08:30 ET; before then, or on a day the series did not change, this returns changed=false. For past releases use get_changed_cube_list(date). Disables SSL Verification. Corresponds to:...

Parameters* required
vectorId*integer
get_changed_series_listGet the list of series (vectorId, productId, coordinate, releaseTime) updated today. Statistics Canada publishes this list after 08:30 ET; the endpoint does not accept a date. For a historical release date, use get_changed_cube_list(date) to list the cubes updated on that date...

Get the list of series (vectorId, productId, coordinate, releaseTime) updated today. Statistics Canada publishes this list after 08:30 ET; the endpoint does not accept a date. For a historical release date, use get_changed_cube_list(date) to list the cubes updated on that date...

No parameters. Call it with no arguments.

get_sdmx_structureFetch the Data Structure Definition (DSD) for a StatCan table via SDMX REST. Returns dimension codelists with code IDs, names, and parent hierarchy. Use this BEFORE get_sdmx_data to understand the key syntax for that table. Each dimension entry includes: - id: dimension identi...1 params

Fetch the Data Structure Definition (DSD) for a StatCan table via SDMX REST. Returns dimension codelists with code IDs, names, and parent hierarchy. Use this BEFORE get_sdmx_data to understand the key syntax for that table. Each dimension entry includes: - id: dimension identi...

Parameters* required
productId*integer
get_sdmx_dataFetch filtered time-series observations from a StatCan table via SDMX REST. Filtering is done server-side — only the requested slice is returned. Call get_sdmx_structure first to see dimension positions and valid codes. Key syntax (dot-separated codes in dimension position ord...6 params

Fetch filtered time-series observations from a StatCan table via SDMX REST. Filtering is done server-side — only the requested slice is returned. Call get_sdmx_structure first to see dimension positions and valid codes. Key syntax (dot-separated codes in dimension position ord...

Parameters* required
endPeriodvalue
End period in YYYY or YYYY-MM format.
fullboolean
Return every observation (max 500). Default: results over 100 observations come back as a per-series summary (latest, min, max, period range).default: false
key*string
Dot-separated dimension codes in position order (e.g. '1.2.1'). Use '+' for OR ('1+2.2.1' = Geography 1 or 2). Omit a value for wildcard ('.2.1' = all geographies, Gender=2, Age=1). Code numbers ma...
lastNObservationsvalue
Return only the last N observations per series (e.g. 12 for one year of monthly data).
productId*integer
startPeriodvalue
Start period in YYYY or YYYY-MM format.
query_sdmxFetch SDMX observations and run ONE read-only SQL query over them server-side, returning only the query result. Nothing is stored — the data is loaded into a temporary in-memory table named `data` and discarded after the query. *** Use this for compute/compare/rank questions (...6 params

Fetch SDMX observations and run ONE read-only SQL query over them server-side, returning only the query result. Nothing is stored — the data is loaded into a temporary in-memory table named `data` and discarded after the query. *** Use this for compute/compare/rank questions (...

Parameters* required
endPeriodvalue
End period in YYYY or YYYY-MM format.
key*string
Dot-separated dimension codes in position order (e.g. '1.2.1'). Use '+' for OR ('1+2.2.1' = Geography 1 or 2). Omit a value for wildcard ('.2.1' = all geographies, Gender=2, Age=1). Code numbers ma...
lastNObservationsvalue
Return only the last N observations per series (e.g. 12 for one year of monthly data).
productId*integer
sql*string
One read-only SELECT (WITH/CTEs and window functions allowed) against table 'data'. Columns: one per dimension (spaces/punctuation -> '_', e.g. "Products_and_product_groups"), period, value (REAL),...
startPeriodvalue
Start period in YYYY or YYYY-MM format.
get_sdmx_vector_dataFetch time-series observations for a single StatCan vector via SDMX REST. Simpler alternative to get_sdmx_data when you already know the vectorId. Use get_series_info (productId + coordinate) to find vectorIds. Time filtering (use one or the other, not both): lastNObservations...5 params

Fetch time-series observations for a single StatCan vector via SDMX REST. Simpler alternative to get_sdmx_data when you already know the vectorId. Use get_series_info (productId + coordinate) to find vectorIds. Time filtering (use one or the other, not both): lastNObservations...

Parameters* required
endPeriodvalue
End period in YYYY or YYYY-MM format.
fullboolean
Return every observation (max 500). Default: results over 100 observations come back as a per-series summary (latest, min, max, period range).default: false
lastNObservationsvalue
Return only the last N observations (e.g. 5 for last 5 periods).
startPeriodvalue
Start period in YYYY or YYYY-MM format.
vectorId*integer
get_sdmx_key_for_dimensionReturn all leaf member IDs for a single dimension as a ready-to-use OR key string. Use this before get_sdmx_data when a dimension has many codes (e.g. 162 NOC minor groups, hundreds of CMA geographies). Avoids the need to call get_cube_metadata and manually parse a large JSON...2 params

Return all leaf member IDs for a single dimension as a ready-to-use OR key string. Use this before get_sdmx_data when a dimension has many codes (e.g. 162 NOC minor groups, hundreds of CMA geographies). Avoids the need to call get_cube_metadata and manually parse a large JSON...

Parameters* required
dimension_position*integer
1-based position of the dimension in the SDMX key (use get_sdmx_structure to find positions). E.g. position=6 for the 6th dot-separated slot.
productId*integer

Sponsors

Readme

Details

Repository
github.com/aryan-jhaveri/mcp-statcan
Website
mcp-statcan.com
Category
Data & Analytics
Package
statcan-mcp-server
Transport
STDIO, HTTP
Registry
MCP registry, active
Prompts
5
Tools verified
Nov 6, 2026

Related Data & Analytics MCP servers

View all
1scavio-ai avatarScavioscavio-ai/scavio-mcpStructured web data from 73 platforms: Google, ChatGPT, Gemini, YouTube, Amazon, Reddit, TikTok8stars
2mysleekdesigns avatarCrawlforge Mcp Servermysleekdesigns/crawlforge-mcpWeb scraping, crawling, deep research & autonomous extraction — 31 MCP tools, clean Markdown/JSON6stars
3leap-laboratories avatarDiscoleap-laboratories/discovery-engineFind novel, statistically validated patterns in tabular data — hypothesis-free.6stars
4senoff avatarXlsx For Aisenoff/xlsx-for-ai50 spreadsheet tools for .xlsx: recalc formulas, repair broken refs, read/write, diff, audit.6stars
5cyanheads avatarUsaspending Mcp Servercyanheads/usaspending-mcp-serverAccess US federal award, recipient, agency, and spending analytics data from USAspending.gov.5stars
6neonia-io avatarNeonia: The Cloud Backend for AI Agentsneonia-io/agent-mcp-examplesMultiple MCP tools, persistent graph memory, token-saving data pointers, and more.0stars