Loading connector details…
Loading connector details…
Choose a unique username to continue using AgentHotspot
by Aryan-Jhaveri • Uncategorized
An MCP server providing structured access to Canadian statistical data via Statistics Canada's Web Data Service and SDMX REST API.
Structured access to Canadian statistical data from Statistics Canada.
Perform multi-series analysis and SQL queries on Canadian statistical datasets.
Integrate Canadian statistical data into applications via MCP clients like Claude, ChatGPT, Gemini, Cursor, and VS Code Copilot.
This MCP server enables any MCP client to access and analyze Canadian statistical data from Statistics Canada through their Web Data Service (WDS) and SDMX REST API. It supports two modes: HTTP mode for data access without local storage, and stdio mode with full SQLite database support for advanced multi-series analysis and SQL queries. The server offers various tools for data discovery, fetching, change detection, and local database management, facilitating efficient and structured data retrieval and analysis.
Retrieves definitions for various code sets used by the API (e.g., frequency, units of measure). Corresponds to: GET /getCodeSets Returns: Dict[str, Any]: Dictionary containing code set definitions (scalar, frequency, etc.). Raises: httpx.HTTPStatusError: If the API returns an error status code. ValueError: If the API response format is unexpected. Exception: For other network or unexpected errors. IMPORTANT: In your final response to the user, you MUST cite the source of your data. For code sets, this means specifying which code set table or definition is being used.
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_by_title if you know what you're looking for. IMPORTANT: In your final response to the user, you MUST cite the source of your data. For cubes, this means including the ProductId (pid) and the Title.
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 page through. Prefer search_cubes_by_title if you know what you're looking for. IMPORTANT: In your final response to the user, you MUST cite the source of your data. For cubes, this means including the ProductId (pid) and the Title.
Searches for data cubes/tables where the English or French title contains the provided search term (case-insensitive). Returns a list of matching cubes in the 'lite' format (excluding dimensions/footnotes). Multiple keywords use AND logic (e.g., "tobacco smoking age" finds cubes containing ALL three words). Results are capped at max_results (default 25). IMPORTANT: In your final response to the user, you MUST cite the source of your data. For cubes, this means including the ProductId (pid) and the Title. Raises: httpx.HTTPStatusError: If the underlying API call fails. Exception: For other network or unexpected errors during the fetch.
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 translations, archive codes, footnotes) and shows only 3 sample members per dimension with _next_steps guidance. Safe for all context window sizes. Set summary=False only if you need the full raw member list or all API fields. To browse dimension codes for get_sdmx_data key construction, use get_sdmx_structure. To resolve a coordinate to a vectorId, use get_series_info. Returns: Dict[str, Any]: The metadata object for the specified cube on success. Raises: httpx.HTTPStatusError: If the API returns an error status code. ValueError: If the API response format is unexpected or status is not SUCCESS. Exception: For other network or unexpected errors. IMPORTANT: In your final response to the user, you MUST cite the source of your data. For cubes, this means including the ProductId (pid) and the Title.
End-to-end workflow for finding and analyzing Statistics Canada data. Claude Code (bash): statcan CLI + awk pipelines. Claude.ai web: MCP tools for discovery, Python script fetches data to a local file — never floods context.
Guide for building a precise SDMX key for get_sdmx_data or statcan download --key. Explains wildcard vs explicit member IDs, OR syntax, and dimension positions.
Download a Statistics Canada table to CSV and analyze it. Claude Code (bash): statcan CLI + awk. Claude.ai web: Python script fetches to a local file — data never enters context.
Download one or more StatCan vector IDs to CSV and compare series with awk. Requires Claude Code (bash sandbox) with the statcan CLI installed.
Sample and inspect a Statistics Canada table before committing to a full download. Claude Code (bash): statcan CLI. Claude.ai web: Python script samples to a local file — see column layout without flooding context.