Statistics Canada API and MCP server for AI agents
Let Claude, ChatGPT or your own agent read Statistics Canada. No Statistics Canada API key needed.
Add to your agent
Paste this into Claude Code, Cursor, Codex or any agent. It adds the server itself.
Read https://bowmark.ai/sites/statcan_gc_ca.md and add Bowmark's Statistics Canada MCP server to my agent.Run this in a terminal, then sign in when the browser opens. Claude Code keeps its own sign-in (a claude.ai sign-in does not carry over), so add only this one server. Adding the Bowmark plugin as well lists every tool twice.
claude mcp add --transport http bowmark-statcan-gc-ca https://api.bowmark.ai/mcp/site/statcan_gc_caPress the button, or add this to ~/.cursor/mcp.json.
{
"mcpServers": {
"bowmark-statcan-gc-ca": {
"url": "https://api.bowmark.ai/mcp/site/statcan_gc_ca"
}
}
}Press the button, or run this in a terminal.
code --add-mcp '{"name":"bowmark-statcan-gc-ca","type":"http","url":"https://api.bowmark.ai/mcp/site/statcan_gc_ca"}'Run this in a terminal.
codex mcp add bowmark-statcan-gc-ca --url https://api.bowmark.ai/mcp/site/statcan_gc_caIn Claude, open Plugins → Add → Add custom connector, paste this URL, and pick Sign in now.
https://api.bowmark.ai/mcp/site/statcan_gc_caIn ChatGPT, open Plugins, press +, choose Add custom MCP server and paste this URL.
https://api.bowmark.ai/mcp/site/statcan_gc_caAny MCP client that takes a remote (streamable HTTP) server: give it this URL.
https://api.bowmark.ai/mcp/site/statcan_gc_caFunctions
Open a function to see its parameters and run it with your own API key.
getLatestValuesThe latest N values of one series in a table, chosen by member ids per dimension.POST /v1/sites/statcan_gc_ca/getLatestValues
Parameters
curl -X POST https://api.bowmark.ai/v1/sites/statcan_gc_ca/getLatestValues \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"productId":18100004,"members":[2,2]}}'import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.statcan_gc_ca.getLatestValues({ productId: 18100004, members: [2, 2] });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.statcan_gc_ca.getLatestValues({"productId": 18100004, "members": [2, 2]}))Responsereturns StatcanLatestResultinterface StatcanPoint { period: string; value: number | null; decimals: number; releaseTime: string; } interface StatcanLatestResult { productId: number; coordinate: string; vectorId: number; points: StatcanPoint[]; }getTableA table's dimensions and their member ids (e.g. geography, product), to pick a series.POST /v1/sites/statcan_gc_ca/getTable
Parameters
curl -X POST https://api.bowmark.ai/v1/sites/statcan_gc_ca/getTable \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"productId":18100004,"memberQuery":"Canada"}}'import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.statcan_gc_ca.getTable({ productId: 18100004, memberQuery: "Canada" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.statcan_gc_ca.getTable({"productId": 18100004, "memberQuery": "Canada"}))Responsereturns StatcanTableDetailinterface StatcanTable { productId: number; title: string; startDate: string; endDate: string; releaseTime: string; archived: boolean; } interface StatcanMember { memberId: number; name: string; parentMemberId: number | null; } interface StatcanDimension { position: number; // 1-based place in the coordinate name: string; totalMembers: number; members: StatcanMember[]; } interface StatcanTableDetail { table: StatcanTable; seriesCount: number; dimensions: StatcanDimension[]; }searchTablesFind Statistics Canada data tables by title words (population, CPI, labour force, trade).POST /v1/sites/statcan_gc_ca/searchTables
Parameters
curl -X POST https://api.bowmark.ai/v1/sites/statcan_gc_ca/searchTables \ -H "Authorization: Bearer $BOWMARK_API_KEY" \ -H "Content-Type: application/json" \ -d '{"args":{"query":"consumer price index monthly"}}'import { bowmark } from "@bowmark/web"; const result = await bowmark.providers.statcan_gc_ca.searchTables({ query: "consumer price index monthly" });import asyncio from bowmark_web import bowmark result = asyncio.run(bowmark.providers.statcan_gc_ca.searchTables({"query": "consumer price index monthly"}))Responsereturns StatcanSearchResultinterface StatcanTable { productId: number; title: string; startDate: string; endDate: string; releaseTime: string; archived: boolean; } interface StatcanSearchResult { query: string; total: number; // matches before limit tables: StatcanTable[]; }