NEW v0.7.9 — automated CI/CD: version bumps on push, landing announcement workflow
NEW v0.7.8 — tool-level request logging and /.well-known/mcp.json discovery
NEW v0.7.5 — SDMX get_sdmx_rows for inline data without context flood
• Listed on the MCP server registry
Connection Instructions
Add this server to your MCP client using the Streamable HTTP transport. No API key is required — Statistics Canada data is publicly available.
https://mcp-statcan.onrender.com/mcp
Health Check
https://mcp-statcan.onrender.com/health
Claude Desktop (claude_desktop_config.json)
"mcpServers": {
"statcan": {
"type": "http",
"url": "https://mcp-statcan.onrender.com/mcp"
}
}
}
Claude Code (.mcp.json)
"mcpServers": {
"statcan": {
"type": "http",
"url": "https://mcp-statcan.onrender.com/mcp"
}
}
}
Registered Tools (17)
All tools below are exposed over the /mcp endpoint. The hosted HTTP server runs in stateless mode — composite and SQLite database tools are intentionally omitted here. To use those, run the server locally over stdio (pip install statcan-mcp-server).
| Tool Name | Category | Description |
|---|---|---|
| search_cubes_by_title | Discovery | Full-text keyword search across all StatCan tables, capped at 25 results |
| get_all_cubes_list | Discovery | Paginated inventory of all tables (100/page) |
| get_all_cubes_list_lite | Discovery | Lightweight paginated list, 1-hour TTL cache |
| get_cube_metadata | Metadata | Full table structure: dimensions, members, frequencies; summary mode caps members at 10 |
| get_code_sets | Metadata | WDS attribute decoder tables (scalar type, UOM, frequency, status codes) |
| get_series_info | Series | Resolve dimension coordinates to vectorId, frequency, UOM |
| get_series_info_from_vector | Series | Look up series metadata by vectorId |
| get_bulk_vector_data_by_range | Vector | Fetch multiple vectors filtered by release-date range |
| get_changed_series_data_from_vector | Change Detection | Detect data changes for a vector since a given date |
| get_changed_series_data_from_cube_pid_coord | Change Detection | Detect changes for a specific series by coordinate |
| get_changed_cube_list | Change Detection | List all tables with data changes since a given date |
| get_changed_series_list | Change Detection | List all series with changes since a given date |
| get_sdmx_structure | SDMX | Data Structure Definition as JSON: dimension positions and codelists with hierarchy |
| get_sdmx_data | SDMX | Server-side filtered observations by productId + SDMX key string |
| get_sdmx_rows | SDMX | Inline tabular rows (up to 500) returned directly in the tool response |
| get_sdmx_vector_data | SDMX | Single vectorId observations via SDMX |
| get_sdmx_key_for_dimension | SDMX | Returns the full OR-key for a large dimension (avoids wildcard sampling errors) |
Technical Specifications
| Transport | Streamable HTTP (stateless) — MCP 2025-03-26 spec |
| Upstream APIs | Statistics Canada WDS REST + SDMX 2.1 REST |
| Authentication | None required (public data) |
| SSL Verification | Disabled (VERIFY_SSL=False) — StatCan certificate quirk |
| Max SDMX Rows | 500 per get_sdmx_data call |
| Cache | 1-hour TTL on get_all_cubes_list_lite |
| Python | 3.11+ — asyncio, httpx, Starlette, Uvicorn |
| Install | pip install mcp-statcan |
| Source | github.com/Aryan-Jhaveri/mcp-statcan |
Known Constraints & Notes
- lastNObservations + startPeriod/endPeriod — cannot be combined; StatCan returns HTTP 406.
- SDMX wildcard on large dimensions — . on dimensions with >30 codes returns sparse, unpredictable samples. Use get_sdmx_key_for_dimension for the full OR key instead.
- vectorIds from metadata — get_cube_metadata returns member names but not vectorIds. Use get_series_info to resolve coordinates to vectorIds.
- Geography OR key — known StatCan encoding bug for Geography dimension labels in OR-key syntax; use wildcard for Geography.
Data Attribution
All data returned by this server originates from Statistics Canada. Users are responsible for complying with Statistics Canada’s Open Licence when using or redistributing data obtained through this server. This MCP server is an independent project and is not affiliated with or endorsed by Statistics Canada or the Government of Canada.