Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

Explore

  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Tags index
  • Submit a server
  • Pricing

Learn

  • Guides hub
  • What is MCP?
  • Install guide
  • Troubleshooting
  • Security
  • Blog
  • Blog RSS

Tools

  • All tools
  • Config generator
  • Config validator
  • MCP playground
  • OpenAPI β†’ MCP
  • Badge generator

For agents

  • API docs
  • Trust & traffic
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
  • Remote MCP β†— (opens in a new tab)

Company

  • About
  • Contact
  • X (@AllMCPs) β†— (opens in a new tab)
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on Buildlist
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ’» Developer Tools
  3. Statistics Canada MCP Server
S
Health: Not checked yetWe have not completed a health check for this listing yet.Last checked 8/10/2026, 11:46:55 PM

Statistics Canada MCP Server

Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time β€” check back soon.
View Repository

Access Statistics Canada data via the Web Data Services API

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Install Config Generator

Choose your client
claude_desktop_config.json
{
  "mcpServers": {
    "statistics-canada-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "statistics-canada-mcp-server"
      ]
    }
  }
}

πŸ’‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

Install Directory Badge Claim listing AlternativesπŸ’» More in Developer Tools

Documentation Overview

Statistics Canada MCP Server

Statistics Canada MCP Server

Python 3.10+ License: MIT MCP GitHub SafeSkill 93/100

MCP server and CLI for Statistics Canada's Web Data Service (WDS) and SDMX REST API. Gives any MCP client β€” Claude, Cursor, VS Code Copilot, Gemini β€” structured access to Canadian statistical data. Includes a standalone statcan CLI for direct downloads without an LLM.

Hosted on Render β€” no install required for most users. See Quick Start.

⚠️ LLMs may fabricate data. Always verify important figures against official Statistics Canada sources.


Table of Contents

  • Quick Start
  • Examples
  • Setup by Client
  • How Claude.ai Uses This Server
  • MCP Prompts
  • statcan CLI
  • Features & Tools
  • Project Structure
  • Known Issues

Quick Start

Pick the option that fits you. You don't need to install anything for Option 1.

Option 1 β€” Use the hosted server (recommended)

Connect directly to the public server on Render. No uv, no terminal, no local setup.

Claude Desktop / Claude.ai

  1. Open Settings β†’ Connectors β†’ Add Custom Connector
  2. Name: mcp-statcan
  3. URL: https://mcp-statcan.onrender.com/mcp
  4. Save and restart

Claude Code

Terminal
claude mcp add statcan --transport http https://mcp-statcan.onrender.com/mcp --scope global

The hosted server provides all WDS + SDMX tools. Database tools (SQLite) require local setup (Option 3) β€” they are intentionally excluded from the shared server.


Option 2 β€” Self-host HTTP (WDS + SDMX, no DB)

Run a local server with the same tools as the hosted version.

Step 1 β€” Install uv:

bash
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Step 2 β€” Start the server:

bash
uvx statcan-mcp-server --transport http
# Listening at http://localhost:8000

Step 3 β€” Connect your client to http://localhost:8000/mcp.


Option 3 β€” Full local setup (WDS + SDMX + SQLite)

Everything from Option 2, plus database tools for storing and querying data with SQL. Runs via stdio.

Step 1 β€” Install uv (same as above).

Step 2 β€” Configure your client with the stdio snippets in Setup by Client below.

uvx downloads and runs the server automatically on first use.


Option 4 β€” statcan CLI (no LLM needed)

Download StatCan data directly from the terminal. See statcan CLI.

bash
uvx statcan-mcp-server        # installs the package
statcan search "labour force"
statcan download 14-10-0287-01 --last 12 --output lfs.csv

Examples

Chat examples

DatasetQueryDemoSource
Canada's Greenhouse Gas Emissions"Create a simple visualization for greenhouse emissions for Canada as a whole over the last 4 years"ChatTable 38-10-0097-01
Canada's International Trade in Services"Create a quick analysis for international trade in services for the last 6 months with a visualization"ChatTable 12-10-0144-01
Ontario Building Construction Price Index"Generate a visualization for Ontario's Building Price index from Q4 2023 to Q4 2024"ChatTable 18-10-0289-01
Canadian Unemployment Dashboard"Create a Canadian Unemployment Dashboard using statcan mcp"ChatTable 14-10-0287-01

Dashboard examples

TitleLinkSource
Canada's Critical Minerals EconomyDashboardTable 36-10-0708-01
Price of Everything: CPI Dashboard 2015–2026DashboardTable 18-10-0004-01
Canada's Biomedical & Biotech IndustriesDashboardTable 27-10-0297-01

Setup by Client

Hosted server (Option 1)

Claude Desktop β€” Settings β†’ Connectors β†’ Add Custom Connector

  • Name: mcp-statcan
  • URL: https://mcp-statcan.onrender.com/mcp

Claude Code

Terminal
claude mcp add statcan --transport http https://mcp-statcan.onrender.com/mcp --scope global

Cursor β€” .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

config.json
{
  "mcpServers": {
    "statcan": {
      "url": "https://mcp-statcan.onrender.com/mcp"
    }
  }
}

VS Code (GitHub Copilot) β€” .vscode/mcp.json:

config.json
{
  "servers": {
    "statcan": {
      "type": "http",
      "url": "https://mcp-statcan.onrender.com/mcp"
    }
  }
}

Self-hosted HTTP (Option 2)

Start uvx statcan-mcp-server --transport http first, then configure your client.

Most clients need mcp-proxy to bridge stdio ↔ HTTP. Claude Code connects natively.

Claude Desktop β€” Settings β†’ Developer β†’ Edit Config:

config.json
{
  "mcpServers": {
    "statcan": {
      "command": "uvx",
      "args": ["mcp-proxy", "--transport", "streamablehttp", "http://localhost:8000/mcp"]
    }
  }
}

Claude Code

Terminal
claude mcp add statcan --transport http http://localhost:8000/mcp --scope global

Cursor / VS Code / Gemini β€” same mcp-proxy wrapper, pointing to http://localhost:8000/mcp.


Full local / stdio (Option 3)

Claude Desktop β€” Settings β†’ Developer β†’ Edit Config:

config.json
{
  "mcpServers": {
    "statcan": {
      "command": "uvx",
      "args": ["statcan-mcp-server", "--db-path", "/Users/<you>/.statcan-mcp/statcan_data.db"]
    }
  }
}

Pass --db-path with an absolute path. Claude Desktop overrides the subprocess HOME env var, which can break default path resolution.

Claude Code

Terminal
claude mcp add statcan --scope global -- uvx statcan-mcp-server

Cursor / VS Code / Gemini β€” use uvx statcan-mcp-server as the stdio command.


How Claude.ai Uses This Server

Claude.ai (web) has no bash sandbox β€” it can't run shell commands. Instead, it uses MCP tools for discovery and its Python script tool to fetch data without bloating the context window.

The pattern:

Code
1. MCP tools (small payloads β€” metadata only):
   search_cubes_by_title("labour force")  β†’ productId
   get_sdmx_structure(productId=...)      β†’ dimension layout + codes
   get_sdmx_key_for_dimension(...)        β†’ OR key for large dimensions

2. Python script (data never enters context):
   url = "https://mcp-statcan.onrender.com/files/sdmx/<pid>/<key>?lastNObservations=12"
   β†’ validate URL domain β†’ write to ./statcan_<pid>.csv β†’ print summary only

3. Follow-up script (analysis from local file):
   rows = list(csv.DictReader(open("./statcan_<pid>.csv")))
   β†’ filter / sort / aggregate β†’ print only the result

get_sdmx_data on the hosted server always returns a download_csv URL instead of inline data β€” data stays out of the context window regardless of response size.

Claude Code (bash sandbox) uses the statcan CLI instead:

bash
statcan search "labour force"
statcan download 14-10-0287-01 --last 12 --output ./lfs.csv
awk -F',' 'NR>1 && $1=="Canada"' ./lfs.csv | sort -t',' -rn -k5 | head -10

MCP Prompts

The server ships five prompts accessible as slash commands in supported clients. Each has dual instructions β€” Claude Code (bash) and Claude.ai web (Python script).

PromptWhat it teaches
/statcan-data-lookupEnd-to-end: search β†’ structure β†’ build key β†’ fetch to local file β†’ analyze
/sdmx-key-builderSDMX key syntax: wildcards, OR keys, time parameters, download URL format
/statcan-downloadDownload a specific table: CLI commands + Python script alternative
/statcan-exploreSample before committing: 3-period fetch, column layout, size estimate
/statcan-vector-pipelineMulti-series download and cross-series comparison

Usage in Claude Code:

Code
/statcan-data-lookup topic="consumer price index" analysis_goal="trend last 5 years"
/statcan-download product_id=18100004 last_n=24

statcan CLI

A standalone CLI for downloading StatCan data without an LLM. Outputs pipe-friendly CSV/JSON to stdout; progress and errors go to stderr.

Install:

Terminal
pip install statcan-mcp-server   # or: uvx statcan-mcp-server (no install)

Commands:

Code
statcan search <term>            Search tables by keyword
statcan metadata <product-id>    Show table structure (dimensions + members)
statcan download <product-id>    Download observations via SDMX
statcan vector <vector-id>...    Download one or more vector series
statcan codeset                  Show StatCan code definitions (UOM, frequency, etc.)

Common usage:

bash
# Find a table
statcan search "consumer price index"
statcan search "labour force" --max-results 10 --format json

# Inspect structure before downloading
statcan metadata 18-10-0004-01
statcan metadata 18100004 --full        # show all dimension members

# Download data
statcan download 18-10-0004-01 --last 12 --output cpi.csv
statcan download 18-10-0004-01 --key "1.1.1" --start 2020-01 --end 2024-12
statcan download 18-10-0004-01 --last 5 --dry-run   # preview SDMX URL

# Download by vector ID
statcan vector v41690973 --last 24 --output series.csv
statcan vector v41690973 v41690974 --last 12 --output multi.csv

# Decode numeric codes
statcan codeset --type uom
statcan codeset --type frequency --format json

Output formats: csv (default for download/vector), table (default for search/metadata/codeset), json

Pipe patterns:

server.ts
# Top 10 by value
statcan download 14-10-0287-01 --last 1 --format csv \
  | awk -F',' 'NR>1' | sort -t',' -k5 -rn | head -10

# Extract unique geographies
statcan download 14-10-0287-01 --last 1 --format csv \
  | awk -F',' 'NR>1 {print $1}' | sort -u

# Chain search β†’ download
PID=$(statcan search "CPI" --format json | python3 -c "import sys,json; print(json.load(sys.stdin)[0]['Product ID'])")
statcan download $PID --last 12 --output cpi.csv

For the complete CLI reference see cli.md.


Features & Tools

SDMX Tools β€” server-side filtered data fetch

Only the slice you request is returned. No downloading full tables.

ToolDescription
get_sdmx_structureDimension codelists + key syntax for a table. Call before get_sdmx_data.
get_sdmx_dataFiltered observations by productId + key. Returns a CSV download URL on the hosted server β€” data stays out of context.
get_sdmx_vector_dataObservations for a single vectorId via SDMX.
get_sdmx_key_for_dimensionAll leaf member IDs for a large dimension as a ready-to-paste OR key. Use when a dimension has >30 codes (e.g. NOC, CMAs).

Key syntax (passed to get_sdmx_data):

  • "1.2.1" β€” Geography=1, Gender=2, Age=1
  • ".2.1" β€” all geographies (wildcard), Gender=2, Age=1
  • "1+2.2.1" β€” Geography 1 or 2, Gender=2, Age=1

Note: Wildcard (.) on dimensions with >30 codes returns a sparse, unpredictable sample. Use get_sdmx_key_for_dimension to get the correct OR key.

WDS Discovery & Metadata

ToolDescription
search_cubes_by_titleFull-text search across all StatCan tables. AND logic, capped at 25 results.
get_all_cubes_list / _litePaginated table inventory (offset/limit, default 100/page).
get_cube_metadataDimension info, member lists, date ranges. summary=True caps members at 10 per dimension.
get_code_setsDecode StatCan numeric codes (frequency, UOM, scalar factor, status).

WDS Series Resolution & Change Detection

ToolDescription
get_series_infoResolve {productId, coordinate} pairs to vectorId + metadata.
get_series_info_from_vectorResolve a vectorId to productId, coordinate, titles, frequency.
get_changed_cube_listTables updated on a specific date.
get_changed_series_listSeries updated on a specific date.
get_changed_series_data_from_cube_pid_coordData points that changed for a coordinate.
get_changed_series_data_from_vectorData points that changed for a vectorId.
get_bulk_vector_data_by_rangeMultiple vectors filtered by release date range.

Composite & Database Tools (local/stdio mode only)

These tools are not available on the hosted Render server β€” SQLite is per-process and not shared across users.

ToolDescription
fetch_vectors_to_databaseFetch vectors by reference period range and store to SQLite.
store_cube_metadataFetch full cube metadata into SQLite β€” browse all members and vectorIds with SQL.
query_databaseRead-only SQL against the local SQLite database.
create_table_from_data / insert_dataCreate or append to a table.
list_tables / get_table_schema / drop_tableDatabase utilities.

Typical workflow

Claude.ai web (hosted server):

Code
1. search_cubes_by_title("unemployment rate")
   β†’ productId e.g. 14100287

2. get_sdmx_structure(productId=14100287)
   β†’ dimension positions + sample codes

3. get_sdmx_key_for_dimension(productId=14100287, dimension_position=3)
   β†’ or_key for large dimensions

4. get_sdmx_data(productId=14100287, key=".2.1", lastNObservations=24)
   β†’ returns download_csv URL

5. Python script: validate URL domain β†’ write to ./statcan_14100287.csv β†’ analyze β†’ print summary

Claude Code (bash sandbox):

bash
statcan search "unemployment rate"
statcan metadata 14100287
statcan download 14-10-0287-01 --last 24 --output ./lfs.csv
awk -F',' 'NR>1 && $1=="Canada"' ./lfs.csv | sort -t',' -rn -k5 | head -10

Project Structure

Code
src/
β”œβ”€β”€ api/
β”‚   β”œβ”€β”€ cube/
β”‚   β”‚   β”œβ”€β”€ discovery.py         # search_cubes_by_title, get_all_cubes_list
β”‚   β”‚   β”œβ”€β”€ metadata.py          # get_cube_metadata
β”‚   β”‚   └── series.py            # get_series_info, change detection
β”‚   β”œβ”€β”€ vector/
β”‚   β”‚   └── vector_tools.py      # vector series, bulk range fetch
β”‚   β”œβ”€β”€ sdmx/
β”‚   β”‚   └── sdmx_tools.py        # get_sdmx_structure, get_sdmx_data, get_sdmx_key_for_dimension
β”‚   β”œβ”€β”€ composite_tools.py       # fetch_vectors_to_database, store_cube_metadata (stdio only)
β”‚   └── metadata_tools.py        # get_code_sets
β”œβ”€β”€ cli/
β”‚   β”œβ”€β”€ main.py                  # statcan CLI entry point (Typer app)
β”‚   β”œβ”€β”€ output.py                # write_output, format helpers
β”‚   └── commands/
β”‚       β”œβ”€β”€ search.py            # statcan search
β”‚       β”œβ”€β”€ metadata.py          # statcan metadata
β”‚       β”œβ”€β”€ download.py          # statcan download
β”‚       β”œβ”€β”€ vector.py            # statcan vector
β”‚       └── codeset.py           # statcan codeset
β”œβ”€β”€ db/                          # SQLite connection, schema, queries (stdio only)
β”œβ”€β”€ models/                      # Pydantic input models
β”œβ”€β”€ util/
β”‚   β”œβ”€β”€ registry.py              # ToolRegistry β€” @decorator β†’ MCP Tool schema
β”‚   β”œβ”€β”€ truncation.py            # Response truncation + pagination guidance
β”‚   β”œβ”€β”€ sdmx_json.py             # SDMX-JSON β†’ tabular rows
β”‚   └── cache.py                 # 1-hour TTL cache for cube list
β”œβ”€β”€ config.py                    # BASE_URL, SDMX_BASE_URL, RENDER_BASE_URL, TRANSPORT, PORT
└── server.py                    # create_server(), MCP Prompts, HTTP routes (/files/sdmx/), CLI

Known Issues

IssueStatusWorkaround
"Unable to open database file" on Claude DesktopActivePass --db-path /Users/<you>/.statcan-mcp/statcan_data.db in your config
SSL verification disabledActiveVERIFY_SSL = False in all API calls β€” StatCan cert issues made this necessary
lastNObservations + startPeriod/endPeriod β†’ 406ActiveUse one or the other, not both
OR syntax for Geography dimension unreliableActiveUse wildcard (.) for Geography; OR works fine for other dimensions
Wildcard returns sparse data for large dimensionsMitigatedUse get_sdmx_key_for_dimension to get the full OR key (e.g. NOC, CMAs)
Context overflow may cause data fabricationMitigatedHosted server returns download_csv URL β€” data processed via script, not context

Made with ❀️❀️❀️ for Statistics Canada
GitHub β€’ Report Bug β€’ Statistics Canada

Related MCP Servers

View all in Developer Tools View all alternatives
  • Blockscout Mcp Server logoBlockscout Mcp Server

    Provide AI agents and automation tools with contextual access to blockchain data including balance…

    πŸ’» Developer Tools0 views
    Compare vs Blockscout Mcp Server β†’
  • G
    Gramps Web MCP

    MCP server for structured access to Gramps Web genealogy data

    πŸ’» Developer Tools0 views
    Compare vs Gramps Web MCP β†’
  • G
    Graphql

    Turn any GraphQL API into MCP tools. Zero config, zero code.

    πŸ’» Developer Tools0 views
    Compare vs Graphql β†’
  • Mcp Server logoMcp Server

    MCP Server for ThoughtSpot - provides OAuth authentication and tools for querying data

    πŸ’» Developer Tools0 views
    Compare vs Mcp Server β†’

Frequently Asked Questions about Statistics Canada MCP Server

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "statistics-canada-mcp-server": { "command": "npx", "args": ["-y", "Statistics Canada MCP Server"] } }

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewStatistics Canada MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/statistics-canada-mcp-server?style=directory)](https://allmcps.com/mcp/statistics-canada-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/statistics-canada-mcp-server"><img src="https://allmcps.com/api/badge/statistics-canada-mcp-server?style=directory" alt="Statistics Canada MCP Server on AllMCPs" /></a>

Technical Specs & Signals

CategoryπŸ’»Developer Tools
More technical detailsExpand β–Ύ
TransportSTDIO
RuntimeNode.js
0/5 checks healthy over the last 6h
Views0
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
25Quality signal: Emerging Β· 25/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership8/20
Documentation & tools10/30
Adoption & activity1/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Free dofollow backlink: after claiming, verify your product site and place a dofollow AllMCPs badge β€” we recheck it stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ’» Developer Tools β†’Best MCP servers for Developers β†’Alternatives to Statistics Canada MCP Server β†’Install in Claude DesktopInstall in CursorInstall in VS Code