hk-election-mcp-server
Click on "Deploy 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., "@hk-election-mcp-server how many registered electors in Hong Kong between 2009 and 2024?"
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.
Hong Kong Government Election and Legislature MCP Server
This is an MCP server that provides access to government security incident data through a FastMCP interface.
Features
Registered Electors Data: Retrieve the number of registered electors in Hong Kong's geographical constituencies for a specified range of years.
Related MCP server: Hong Kong community and social welfare MCP Server
Data Source
Registered electors data from Registration and Electoral Office (voterregistration.gov.hk)
Examples
List number of registered electors in geographical constituencies in Hong Kong between 2009 and 2024
Setup
Clone this repository
Install Python dependencies:
pip install -r requirements.txtRun the server:
python server.py
Running Options
Default stdio mode:
python server.pySSE mode (port 8000):
python server.py --sse
Cline Integration
To connect this MCP server to Cline using stdio:
Add this configuration to your Cline MCP settings (cline_mcp_settings.json):
{
"hk-election": {
"disabled": false,
"timeout": 3,
"type": "stdio",
"command": "uvx",
"args": [
"hkopenai.hk-election-mcp-server"
]
}
}Testing
Tests are available in the tests/ directory. Run with:
pytestAvailable Tools
1 toolget_gc_registered_electorsGet Gc Registered ElectorsC
Get the number of registered electors in Hong Kong's geographical constituencies by year range
Inputs: end_year (required), start_year (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of overlap or misselection; its purpose (registered elector counts by year range) is unambiguous.
The single tool follows a clear snake_case verb_noun pattern (get_gc_registered_electors), so there is no inconsistency to penalize, though consistency is trivially satisfied.
A single tool is extremely thin for a server framed as an election data source; while the specific metric is narrow, one read-only lookup does not justify a standalone server.
The surface covers only one metric (registered electors by year range) and lacks obvious election-domain operations such as constituency breakdowns, turnout, candidates, or results, creating dead ends for most queries.
Maintenance
Related MCP Connectors
Hong Kong Census and Statistics Department (C&SD) open-data MCP.
Read-only index to Japanese election data, official sources, relations and scoped search history.
Query UK Parliament, elections, crime stats, ONS census data, and national archives
Hong Kong Companies Registry (香港公司註冊處) open data via data.gov.hk (keyless): search companies by…
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables access to Hong Kong government's official open data portal (DATA.GOV.HK) through natural language queries. Supports searching datasets, browsing categories, and retrieving detailed information about Hong Kong's public data resources.816 PyPI8MIT
- AlicenseAqualityCmaintenanceEnables querying of Hong Kong government data on elderly community care services, such as waiting times and applicant counts.153 PyPI1MIT
- AlicenseBqualityCmaintenanceProvides access to Hong Kong climate and weather data from the Hong Kong Observatory, including current conditions, forecasts, warnings, tides, and more.19100 PyPI7MIT
- AlicenseNot gradedqualityBmaintenanceEnables querying Hong Kong Census and Statistics Department open data via natural language or direct tool calls through the Pipeworx gateway.299 npmMIT