mcp-elections-canada
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
@pipeworx/elections-canada
Official poll-by-poll results for Canadian federal electoral districts in the 45th general election (28 April 2025): votes by candidate and party for every polling division, with district totals and the elected candidate.
Part of Pipeworx — an MCP gateway connecting AI agents to 2075+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.
Tools
elections_canada_districts({ query, province? })-- find a riding and its 5-digit district number by name fragment, optionally within a province or territory.elections_canada_poll_results({ district, poll?, limit?, offset? })-- per-polling-division valid votes by candidate (with party), rejected ballots and electors, plus district totals. Paged.
Related MCP server: Elections Canada MCP Server
Auth
Keyless.
Data sources
Elections Canada, Official Voting Results (raw data), 45th general election -- the agency's published poll-by-poll results, one file per electoral district. Human-facing page: the Elections Canada results section of its website.
Gotchas
Each call reads the district list and, for poll results, one district's results from the publisher live; nothing is stored, so a call needs the publisher to be reachable.
Results are the official voting results as published by Elections Canada, dated 12 November 2025 on the publisher page. Other elections (2021 and earlier) and provincial or municipal elections are not covered.
Polling division numbers are strings, not integers: "45A" and "48-3" occur. Advance and special polls appear as their own divisions.
A poll can be flagged void, "no poll held", or combined with another poll's number; those flags are returned as-is and their votes may be zero by design.
District names use dashes ("Ottawa-Vanier-Gloucester") and accents ("Beauport-Limoilou", "Quebec"); matching ignores accents and dashes. An ambiguous name returns
found: falsewith candidates; pass the 5-digit number.The results file is UTF-8 with a byte-order mark and quoted fields containing commas; the parser strips the mark and handles quoting.
Quick Start
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
{
"mcpServers": {
"elections-canada": {
"url": "https://gateway.pipeworx.io/elections-canada/mcp"
}
}
}What this endpoint actually serves
tools/list at https://gateway.pipeworx.io/elections-canada/mcp returns the tools in the table
above plus five Pipeworx tools: ask_pipeworx, discover_tools, ask_pipeworx_grounded, company_register_search and company_facts.
ask_pipeworx answers a question this pack does not cover by routing across the
whole catalog, without adding a second MCP server.
Add an option to the same URL:
https://gateway.pipeworx.io/elections-canada/mcp?meta=1lists this pack's tools plus up to 48 shared Pipeworx tools (48 when this README was generated; a connection without an account lists fewer, and its owntools/listis the exact answer on any given day).https://gateway.pipeworx.io/elections-canada/mcp?meta=0lists this pack's tools alone.
Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:
{
"mcpServers": {
"pipeworx": {
"url": "https://gateway.pipeworx.io/mcp"
}
}
}Both URLs reach the same gateway and the same 2075+ data sources. The
only difference is which pack's tools are listed directly; ask_pipeworx
reaches all of them from either one (it is not listed on a ?meta=0 connection).
No MCP client? Call it over HTTP
curl -X POST https://gateway.pipeworx.io/v1/tools/elections_canada_districts \
-H 'Content-Type: application/json' \
-d '{"query":"Ottawa"}'No account needed for the first calls. Inspect any tool: GET https://gateway.pipeworx.io/v1/tools/elections_canada_districts. Find one: POST https://gateway.pipeworx.io/v1/tools/search_packs with {"query":"..."}.
Run it from npm
@pipeworx/mcp-elections-canada is a local stdio bridge to the Pipeworx gateway: your MCP client
starts it with npx, and it forwards every call to the same
https://gateway.pipeworx.io/elections-canada/mcp endpoint shown above. It needs network access;
there is no offline mode.
{
"mcpServers": {
"elections-canada": {
"command": "npx",
"args": ["-y", "@pipeworx/mcp-elections-canada"]
}
}
}Without a key it calls anonymously, capped at 50 calls a day. A free account
raises that to 200 a day: get a key at https://pipeworx.io/signup and add
"env": { "PIPEWORX_API_KEY": "<your key>" } to the server entry.
The key is sent as a Bearer token, the same way a hosted connection sends it,
so calls are metered and billed exactly as they are there.
It lists only this pack's tools by default. Set PIPEWORX_META_TOOLS=1 to
also list ask_pipeworx and the other gateway-wide tools.
Behind an HTTPS proxy: Node's built-in fetch does not read HTTPS_PROXY by
default. Newer Node releases honour it when NODE_USE_ENV_PROXY=1 is set; check
your Node version's documentation.
Using with ask_pipeworx
Instead of calling tools directly, you can ask questions in plain English — this works on the pack endpoint above as well as on the full gateway:
ask_pipeworx({ question: "your question about Elections Canada data" })The gateway picks the right tool and fills the arguments automatically.
More
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
US & Canada election maps: precincts, ZIP codes, 2026 districts, ridings. GeoJSON + point lookup.
Read-only German federal election results for municipalities, with harmonized geography.
Search UK parliamentary constituencies by name, get boundaries and ONS codes
US/Canada boundaries: cities, ZIPs, counties, districts, precincts. Lookups, crosswalks, GeoJSON.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables querying Brazilian electoral data through TSE's official API. Supports candidate searches, election information, and campaign finance records for municipalities and states.72MIT
- AlicenseNot gradedqualityDmaintenanceProvides access to Canadian federal election data, enabling queries about ridings, parties, vote shares, and close races for the 2021 and 2025 elections.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables users to resolve geographies and candidates, build and compare election scenarios and simulations, apply swings and turnout assumptions, and read tallies, flipped seats, maps, charts, and precinct-level roll-ups through a local bridge to the ElectionsMCP hosted service.55 npmMIT
- AlicenseAqualityBmaintenanceProvides read-only access to official Bundestag election results for 2017, 2021, and 2025, covering national and party results, constituency outcomes, and turnout.6PolyForm Noncommercial 1.0.0