Statistics Canada MCP Server

Access Statistics Canada data via the Web Data Services API

Remote serverstreamable-httpPython

What is the Statistics Canada MCP server?

If you already use Statistics Canada, the statistics canada mcp server is the piece that lets your assistant work with it directly. Access Statistics Canada data via the Web Data Services API.

What the server does

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

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • get_sdmx_structure — Dimension codelists + key syntax for a table. Call before get_sdmx_data
  • get_sdmx_data — Filtered observations by productId + key. Returns a CSV download URL on the hosted server — data stays out of context
  • get_sdmx_vector_data — Observations for a single vectorId via SDMX
  • get_sdmx_key_for_dimension — All 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)
  • fetch_vectors_to_database — Fetch vectors by reference period range and store to SQLite
  • store_cube_metadata — Fetch full cube metadata into SQLite — browse all members and vectorIds with SQL
  • query_database — Read-only SQL against the local SQLite database

Credentials and setup notes

Configuration is passed through the environment: BASE_URL, SDMX_BASE_URL, RENDER_BASE_URL. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Installation

Because this one is hosted, setup is mostly authentication — you point your client at the endpoint and approve access. Nothing runs on your machine, so there is no runtime to keep patched.

Where it fits

Among the database access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Statistics Canada's toolset — get_sdmx_structure, get_sdmx_data, get_sdmx_vector_data and 4 more — is a fair guide to whether it matches your workflow. It is maintained by Aryan-Jhaveri; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Worth knowing first

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
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).
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.

How to install the Statistics Canada MCP server

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

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
BASE_URLEndpoint or connection string the server talks to.Yes
SDMX_BASE_URLEndpoint or connection string the server talks to.Yes
RENDER_BASE_URLEndpoint or connection string the server talks to.Yes

Example prompts to try

  • Use Statistics Canada to get sdmx structure.
  • Use Statistics Canada to get sdmx data.
  • Use Statistics Canada to get sdmx vector data.

Frequently asked questions

It connects Statistics Canada to MCP-compatible AI assistants such as Claude and Cursor, exposing 7 tools (get_sdmx_structure, get_sdmx_data, get_sdmx_vector_data, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Statistics Canada directly.