mcp-statcan
A MCP server to use StatCAN data
claude mcp add --transport stdio aryan-jhaveri-mcp-statcan uvx statcan-mcp-server --transport http
How to use
This MCP server provides access to Statistics Canada's Web Data Service (WDS) and SDMX REST API through the MCP framework. It supports two principal operating modes: HTTP (self-hosted, no local storage) and stdio (full, with SQLite storage). In HTTP mode, the server exposes an HTTP API that clients can connect to (default endpoint is http://localhost:8000/mcp) and uses WDS/SDMX tooling under the hood. In stdio mode, the server runs with SQLite enabled, offering a richer local analysis environment with SQL query capabilities. Tools available include WDS and SDMX access via roughly fifteen tooling endpoints, plus optional SQLite-backed data storage in stdio mode. To connect clients, you may use the built-in HTTP bridge or leverage mcp-proxy to bridge stdio and HTTP for clients that expect a specific transport layer.
To get started, run the server in HTTP mode for broad compatibility: uvx statcan-mcp-server --transport http. Then configure your MCP-capable client to point at http://localhost:8000/mcp. For clients that rely on the stdio experience (including SQL queries and local SQLite storage), run the full stdio mode: uvx statcan-mcp-server (and connect via the appropriate stdio configuration provided in the examples).
Common clients (as demonstrated in the project) include Claude Desktop, Claude Code, Cursor, and VS Code Copilot. Clauses show how to wire these clients to the server using the mcp proxy bridge in HTTP mode, or directly via stdio transport when available. The documentation also outlines how to add the statcan MCP server to client configurations, typically under mcpServers with the command uvx and the server-specific arguments.
How to install
Prerequisites:
- Python 3.10+ installed on your system
- Internet access to install dependencies
- Optional: uv toolchain if you plan to use the provided uvx-based server binaries
Installation steps:
-
Install the required runtime (Python 3.10+):
- macOS/Linux: ensure python3 --version shows 3.10+ and python3/pip3 commands are available
- Windows: ensure Python 3.10+ is installed and added to PATH
-
Install uvx (per the quick-start instructions in the project):
- 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"
-
Verify uvx is available:
- Run: uvx --version
-
Run the MCP server (HTTP mode):
- uvx statcan-mcp-server --transport http
- The server will typically expose its MCP endpoint at http://localhost:8000/mcp
-
Optional: configure clients to connect via mcp-proxy when bridging stdio <-> HTTP for compatibility:
- Example Python/CLI client or Claude Desktop configurations may reference mcp-proxy with a transport bridge to the HTTP endpoint.
Notes:
- If you need the full local analysis capabilities, use the stdio mode (no separate server process): uvx statcan-mcp-server This enables SQLite-backed storage and the full set of tools.
- The exact port (default 8000) can be changed via client-side configuration if needed.
Additional notes
Tips and known considerations:
- HTTP mode requires bridging for many clients; consider using mcp-proxy to connect stdio-equipped clients to the HTTP endpoint.
- The provided quick-start examples show client-specific connection snippets for Claude Desktop, Claude Code, Cursor, and VS Code Copilot. Use these as templates to configure your environment.
- In stdio mode, SQLite storage is enabled, which is useful for multi-series analysis and local SQL queries.
- Always verify the health endpoint at http://localhost:8000/health when the server is running to ensure the MCP surface is ready.
- If you run into port conflicts, you can adjust the port or use a reverse proxy to expose the MCP surface under a different path.
- Ensure you are using Python 3.10+ and the latest uvx tooling to avoid compatibility issues with MCP server arguments.
- When using clients, ensure the correct transport is configured (http vs streamablehttp) depending on whether you’re bridging via mcp-proxy or direct HTTP access.
Related MCP Servers
web-eval-agent
An MCP server that autonomously evaluates web applications.
mcp-neo4j
Neo4j Labs Model Context Protocol servers
Gitingest
mcp server for gitingest
zotero
Model Context Protocol (MCP) server for the Zotero API, in Python
fhir
FHIR MCP Server – helping you expose any FHIR Server or API as a MCP Server.
unitree-go2
The Unitree Go2 MCP Server is a server built on the MCP that enables users to control the Unitree Go2 robot using natural language commands interpreted by a LLM.