
议会API的MCP实现,包括Hansard和Members API。
概览
一个MCP服务器,大致映射到https://developer.parliament.uk/,的一个子集,同时提供额外的语义搜索功能。 该项目提供:- : 基于FastMCP的服务器 - : 一个小型Python软件包,用于查询并加载议会数据从https://developer.parliament.uk/到Qdrant- : 向量数据库,用于对Hansard和议会质询数据进行语义搜索。- : 通过mcp-remote proxy连接到Claude Desktop MCP服务器展示了13种辅助议会研究的工具: 1. - 获取选区或特定议员的选举结果 2.- 通过多种标准搜索下议院或上议院议员(包括地点/邮编搜索)3.- 获取全面的成员信息,包括个人简介、联系方式、兴趣、投票记录和委员会成员 4. - 获取某一议院在特定日期的政党状况 5.- 获取所有政府或反对党职位及其现任持有者的详尽名单 6.
概述(AI 翻译)
一个MCP服务器,大致映射到https://developer.parliament.uk/,的一个子集,同时提供额外的语义搜索功能。
建筑
该项目提供:
- MCP 服务器:基于 FastMCP 的服务器
- Python 包:一个用于查询和加载议会数据的小型 Python 包,用于从 https://developer.parliament.uk/ 向 Qdrant 发送议会数据
- Qdrant:用于Hansard和议会质询数据语义搜索的向量数据库。
- Claude集成:通过
mcp-remote代理连接到Claude桌面
特色
MCP工具可用
MCP服务器展示了13种辅助议会研究的工具:
成员与选举
get_election_results- 获取选区或特定成员的选举结果search_members- 通过多种条件(包括地点/邮编搜索)搜索下议院或上议院成员get_detailed_member_information- 获取全面的会员信息,包括个人简介、联系方式、兴趣、投票记录和委员会成员
议会结构
get_state_of_the_parties- 获取特定日期房屋当事人的情况
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Parliament MCP Server
An MCP server that roughly maps onto a subset of https://developer.parliament.uk/, as well as offering additional semantic search capabilities.
Architecture
This project provides:
- MCP Server: FastMCP-based server
- Python package: A small python package for querying and loading parliamentary data from https://developer.parliament.uk/ into Qdrant
- Qdrant: Vector database for semantic search over Hansard and Parliamentary Questions data.
- Claude Integration: Connect to Claude Desktop via
mcp-remoteproxy
Features
MCP Tools Available
The MCP Server exposes 13 tools to assist in parliamentary research:
Members & Elections
get_election_results- Get election results for constituencies or specific memberssearch_members- Search for members of the Commons or Lords by various criteria (includes location/postcode search)get_detailed_member_information- Get comprehensive member information including biography, contact, interests, voting record, and committee membership
Parliamentary Structure
get_state_of_the_parties- Get state of the parties for a house on a specific datelist_ministerial_roles- Get exhaustive list of all government or opposition posts and their current holdersget_departments- Get reference data for government departments
Committees
list_all_committees- List all parliamentary committees by status and houseget_committee_details- Get comprehensive committee information including members, publications, evidence, and upcoming eventsget_committee_document- Retrieve committee documents including oral evidence, written evidence, and publications
Parliamentary Business
search_parliamentary_questions- Search Parliamentary Written Questions (PQs) by topic, date, party, or membersearch_debate_titles- Search through debate titles to find relevant debatesfind_relevant_contributors- Find members who have contributed most on specific topicssearch_contributions- Search Hansard parliamentary records for actual spoken contributions during debates
Quick Start (local qdrant)
You will need
- Docker and Docker Compose
- Node.js (for mcp-remote)
- Claude Desktop (or another MCP client)
- Azure OpenAI account with API access
Create a .env file by copying the .env.example in the project root and replace the necessary variables.
After configuring your .env file, run the following command for a one shot setup of the MCP server and the Qdrant database with some example data from June 2025.
make dev_setup_from_scratch
Once this is run, you can connect to the MCP server using this config
# Add this to your Claude Desktop config, or another MCP client:
# On macOS Claude Desktop config is located at `~/Library/Application\ Support/Claude/claude_desktop_config.json`
{
"mcpServers": {
"parliament-mcp": {
安装
npx mcp-remote http://localhost:8080/mcp/ --allow-http --debug配置
# Add this to your Claude Desktop config, or another MCP client:
# On macOS Claude Desktop config is located at `~/Library/Application\ Support/Claude/claude_desktop_config.json`
{
"mcpServers": {
"parliament-mcp": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8080/mcp/", "--allow-http", "--debug"]
}
}
}