香港政府选举及立法会MCP服务器
](https://github.com/hkopenai/hk-election-mcp-server) 
这是一个MCP服务器,通过FastMCP接口提供对政府安全事件数据的访问。
特性
- 选民登记资料:检索指定年份香港地方选区的登记选民人数。
数据源
- 选举事务处(voterregistration.gov.hk)提供的登记选民数据
例子
- 香港地方选区2009至2024年度登记选民人数
设置
- 克隆此存储库
- 安装Python依赖项:
pip install -r requirements.txt- 运行服务器:
python server.py运行选项
- 默认stdio模式:
python server.py - SSE模式(端口8000):
python server.py --sse
临床整合
要使用stdio将此MCP服务器连接到Cline,请执行以下操作:
- 将此配置添加到您的Cline MCP设置中(Cline_MCP_settings.json):
{
"hk-election": {
"disabled": false,
"timeout": 3,
"type": "stdio",
"command": "uvx",
"args": [
"hkopenai.hk-election-mcp-server"
]
}
}测试
测试可在 tests/ 目录。运行方式:
pytest