Statistics Canada MCP Server logo

Statistics Canada MCP Server

Connects MCP clients to Statistics Canada data for discovery, SDMX queries, time-series retrieval, and SQLite analysis.

Install Statistics Canada MCP Server

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "statistics-canada-mcp-server": {
      "command": "uvx",
      "args": [
        "statcan-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio statistics-canada-mcp-server -- uvx statcan-mcp-server

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

uvx statcan-mcp-server

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

Statistics Canada MCP Server connects MCP clients to Statistics Canada's Web Data Services and SDMX REST APIs. It helps agents find tables, inspect dimensions, resolve series metadata, retrieve observations, and track recent releases. Local mode adds SQLite-backed storage and read-only SQL queries, including workflows for multi-series and full-cube analysis. Use the hosted HTTP endpoint for API access without installation, or run the package locally when persistent database tools are needed.

Use cases

  • Find Statistics Canada tables by topic
  • Compare provincial or industry series
  • Store SDMX observations for SQL analysis
  • Track newly released data points
  • Download tables from the command line

Key features

  • WDS and SDMX REST API access
  • Cube and dimension discovery
  • Vector and series metadata lookup
  • SQLite-backed multi-series storage
  • Read-only SQL analysis
  • Standalone StatCan CLI

Tools14

What Statistics Canada MCP Server lets your agent do. Expand a tool for its parameters.

Verified live~4.0k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

26/31 checks healthy over the last 117d

What it can do

From the 14 tools this server returned when we ran it; 14 declare their own safety hints.

Can delete or modify data · 5Makes network requests · 10Read-only tools · 9
Network at startup2 connections
Files written at startup15

Observed 2026-11-13 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · statcan-mcp-server (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars8Stargazers on the source repository.
Last commit28d agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.
Tools exposed14Callable tools this server registers over MCP.
Directory activity12 viewsConfig copies, upvotes, and views on AllMCPs.

How Statistics Canada MCP Server works

What Statistics Canada MCP Server does

Statistics Canada MCP Server exposes Statistics Canada's Web Data Services (WDS) and SDMX REST API through MCP. Agents can search table titles, inspect a cube's dimensions and member codes, retrieve observations, identify series metadata, and check changes released on a date. Results can include source details such as the SDMX URL, product ID, key, vector ID, period, unit, scalar, and status information.

The server also provides a standalone statcan command-line interface for searching tables, inspecting metadata, downloading data, and viewing a machine-readable command reference without using an LLM.

How it works

A typical data-discovery flow starts with search_cubes_by_title, followed by get_sdmx_structure to learn the dimension order and valid codes. get_series_info can then resolve vector IDs and series details for selected coordinates. Agents can retrieve observations directly with get_sdmx_data, including server-side SQL calculations for larger result sets, or use get_changes to inspect recent updates.

For analysis across multiple provinces, age groups, industries, or other series, fetch_vectors_to_database fetches several vector IDs in one API request and exposes the results through a SQLite view. fetch_sdmx_to_database performs the same storage-oriented workflow for an SDMX product and key. Both tools write to shared canonical series and observation tables, report new, revised, and unchanged rows, and return compact samples for verification.

Setup and configuration

The hosted endpoint is available at https://mcp-statcan.com/mcp and can be configured as a custom HTTP connector. Claude Desktop, Claude Code, Cursor, and VS Code examples are provided for this endpoint. The hosted deployment includes WDS and SDMX tools; SQLite database tools require local execution.

For a local HTTP deployment, install or run the package with uvx statcan-mcp-server --transport http, then connect a client to http://localhost:8000/mcp. A full local stdio deployment runs uvx statcan-mcp-server and supports the database features. The database location can be set with the --db-path argument. Python 3.10 or newer is supported.

The CLI can be run with uvx statcan-mcp-server, followed by commands such as statcan search, statcan metadata, or statcan download.

Tools and capabilities

  • Search Statistics Canada cubes by title keywords.
  • Inspect SDMX dimensions, member codes, and key order.
  • Retrieve observations by product ID and key or by vector ID.
  • Compute SQL expressions across returned series on the server.
  • Resolve series titles, frequencies, units, scalar factors, and decimal settings.
  • Check tables or series for newly released data.
  • Store vector-based or SDMX-based observations in SQLite-backed views.
  • Store complete cube metadata in normalized dimension and member tables.
  • Create, append to, list, inspect, and drop SQLite tables and views.
  • Run read-only SELECT and PRAGMA queries with query_database.

Limitations and notes

The hosted service intentionally excludes SQLite database tools, so persistent storage and SQL analysis require the local setup. get_sdmx_structure lists only an initial subset of members; use store_cube_metadata when browsing all members or looking up vector IDs. fetch_sdmx_to_database is intended for storage and avoids the 500-row context limit described for direct SDMX retrieval.

Database state is persistent. create_table_from_data replaces an existing table, while insert_data_into_table appends to one that already exists. Dropping a view created by a fetch operation removes the view but leaves its observations in the shared store. Queries should remain read-only, and important figures should be checked against official Statistics Canada sources because language models can produce inaccurate interpretations or values.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Statistics Canada MCP Server

Statistics Canada MCP Server is an MCP server that connects AI clients to Statistics Canada's Web Data Services and SDMX REST APIs. Its main tools search tables, inspect cube structures, retrieve observations, resolve series metadata, check data changes, and optionally store StatCan data in SQLite for SQL analysis.

Run it with `uvx statcan-mcp-server` for local stdio mode or add `--transport http` for a local HTTP server. The hosted endpoint at `https://mcp-statcan.com/mcp` requires no local installation. A full local setup supports SQLite database tools, while the hosted service provides WDS and SDMX access.

Yes, Cursor is supported through the hosted HTTP endpoint or a local stdio configuration. Add the hosted URL to `.cursor/mcp.json`, or configure Cursor to run `uvx statcan-mcp-server` locally. Local HTTP connections can use the documented `mcp-proxy` wrapper.

Use `fetch_vectors_to_database` with a list of vector IDs, a table name, and optional reference-period dates. It fetches the series in one API call and creates a view over the shared SQLite observation store. For SDMX product-and-key retrieval, use `fetch_sdmx_to_database` instead.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

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>