Elections Canada MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Elections Canada MCP ServerFind the 5 closest ridings in the 2025 election."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
🧰 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
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ThreeFortyThree-Canada/elections-canada-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server