Elections Canada MCP Server
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.
Elections Canada MCP Server
This is a Model Context Protocol (MCP) server that provides access to Canadian federal election data. It currently supports results from the 2021 and 2025 elections. Future updates will include past elections, census demographics, and ThreeFortyThree real-time projections.
Brought to you by ThreeFortyThree, this server powers ThreeFortyThree Chat and is available for use with MCP clients such as Claude Desktop.
π Setup
Installation (via PyPI)
uv pip install elections-canada-mcp-serverUsage with Claude Desktop
Make sure the server is installed:
uv pip install elections-canada-mcp-serverOpen your
claude_desktop_config.jsonand add the following block:
uv
{
"mcpServers": {
"elections_canada_data_and_predictions": {
"command": "{PATH_TO_UVX}", // Replace with output of: which uvx
"args": ["elections-canada-mcp"]
}
}
}Restart Claude Desktop.
Now you can ask Claude questions such as:
"What were the 2021 election results in Toronto Centre?"
"Which ridings were closest for the NDP?"
"Show me the highest-margin wins for the Conservatives in 2021."
Local Development
To test the server using MCP Inspector:
Clone this repository:
git clone https://github.com/ThreeFortyThree-Canada/elections-canada-mcp-server.git cd elections-canada-mcp-serverInstall MCP CLI:
uv pip install mcpTest the server:
mcp dev elections_canada_mcp/server.py
This opens a web UI to test the server locally.
Related MCP server: FedMCP - Federal Parliamentary Information
π§° Tools
Tool | Description | Input | Returns |
| Search ridings by name (accent-insensitive) |
| List of matching ridings |
| Get vote share in a riding (optionally by party) |
| Votes and percentage |
| Get the winning party in a riding |
| Winning party |
| Province-wide summary of votes/seats |
| Party results |
| Canada-wide election summary | β | National party results |
| Find most competitive ridings |
| Closest margins |
| Best/worst ridings for a party |
| 4-category performance summary |
π Resources
Resource | URI |
All ridings |
|
Single riding |
|
Province |
|
π Province Codes
AB, BC, MB, NB, NL, NS, NT, NU, ON, PE, QC, SK, YT
π Party Codes
LPC, CPC, NDP, BQ, GPC, PPC
π License
This project is licensed under the MIT License.
Β© ThreeFortyThree Canada β threefortythree.ca
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
Access FEC campaign finance data. Query data about candidates, money trails, and election filings.
Query UK Parliament, elections, crime stats, ONS census data, and national archives
Track Canadian federal bills, MPs, House votes, and Hansard speeches.
The only source of AI-optimized U.S. endorsement and election data. Needs a BallotData API key.
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 gradedqualityNot gradedmaintenanceProvides access to Canadian federal parliamentary data (debates, bills, MPs, votes, Hansard transcripts) and legal information (case law and legislation through CanLII) for research and analysis.3MIT
- AlicenseNot gradedqualityCmaintenanceProvides access to Canadian parliamentary data including debates, bills, votes, politicians, and committees via the OpenParliament.ca civic-tech mirror.65 npmMIT
- AlicenseAqualityAmaintenanceGives AI agents structured, typed access to Canadian open data through a single server covering Statistics Canada tables, Census and public use microdata, the Bank of Canada, CMHC, federal agencies and federal, provincial, territorial and municipal open-data portals, in English and French. It offers roughly 200 tools for querying, planning multi-source queries, and generating reproduction code in R, Python, Stata or Julia.3217 PyPI7MIT