UK Parliament MCP Server
英国議会 MCP サーバー
https://github.com/user-attachments/assets/eec2a7bc-1ddf-4b25-8553-8d5b33a57ff6
英国議会のライブデータのためのModel Context Protocol (MCP) サーバーです。 MCP対応のアシスタントから直接、法案、投票、議員プロフィール、経済的利益、請願をクエリできます。APIキーは不要です。
機能
認証不要 – Open Parliament Licenceに基づくオープンデータ
造反追跡 – 党の指示(ウィップ)に反して投票した議員を検出
データセット横断クエリ – 投票記録と経済的利益を照合
パターン検出 – 接戦、政府の敗北、党の造反率
法案・請願検索 – キーワード、段階、ステータスによる検索
Related MCP server: mcp-eu-parliament
インストール
# One‑off run
npx uk-parliament-mcp
# Global install
npm install -g uk-parliament-mcp使用方法
Claude Desktop — claude_desktop_config.json に追加します:
{
"mcpServers": {
"uk-parliament": {
"command": "npx",
"args": ["-y", "uk-parliament-mcp"]
}
}
}Claude Code:
claude mcp add uk-parliament -- npx -y uk-parliament-mcp利用可能なツール
ツール | 目的 |
| 議案ごとの造反数で議員をランク付け |
| 最近の議案、造反、または法案 |
| 接戦、政府の敗北、党の造反率 |
| 議員、法案、請願、または申告された利益を検索 |
| 投票記録と経済的利益を照合 |
質問例
質問 | ツール |
今議会で最も造反した労働党議員は誰ですか? |
|
今週下院でどのような投票がありましたか? |
|
先月造反した保守党議員は誰ですか? |
|
現在の福祉改革に関する法案は? |
|
今年の接戦(10票差以内)の投票を見せて |
|
上院で否決された政府法案はどれですか? |
|
防衛関連企業の利益を申告している議員 |
|
賃貸人改革法案(Renters Reform Bill)に反対票を投じ、不動産関連の利益を持つ労働党議員 |
|
現在最も署名を集めている公開請願は何ですか? |
|
データソース
API | 対象範囲 |
| 法案、段階、スポンサー |
| 下院の議案記録 |
| 上院の議案記録 |
| 議員および貴族のプロフィール |
| 議員の経済的利益登録簿 |
| 請願および署名数 |
開発
git clone https://github.com/YOUR_USERNAME/uk-parliament-mcp-server.git
cd uk-parliament-mcp-server
npm install
npm run build # compile TypeScript
npm start # production
npm run dev # watch & reload貢献
Fork → ブランチ作成 → コミット
git pushしてプルリクエストを作成src/ 内のコーディングスタイルに従ってください
ライセンス
MIT – LICENSE を参照してください。
免責事項 このプロジェクトは非公式であり、英国議会によって承認されたものではありません。データの使用は Open Parliament Licence に準拠します。
Available Tools
5 toolsanalyze_patternsA
Detect patterns across many parliamentary votes: 'close_votes' finds divisions with a small margin (near-misses or knife-edge votes), 'government_defeats' finds votes the government lost, 'party_rebellion_rate' shows which parties rebel most by percentage of votes cast. Use for trend analysis across many divisions.
Inputs: pattern_type (required), house, days, threshold, +2 more.
find_entitiesA
Find MPs, bills, petitions, or declared financial interests. entity_type='mp': search members by name/party/constituency/house/status. entity_type='bill': search legislation by title keyword/stage/house. entity_type='petition': find petitions by keyword. entity_type='interest': fetch an MP's declared financial interests. Pass name='John McDonnell' OR mp_id=178 (member ID from a prior MP lookup). Optionally add keyword to filter by topic (e.g. keyword='property'). To find ALL MPs with a given interest topic, omit name/mp_id and pass only keyword='defence'.
Inputs: entity_type (required), name, mp_id, party, +7 more.
get_eventsA
Get recent parliamentary events: votes/divisions, party rebellions, bill stage changes, or a specific MP's voting record. event_type='division': recent votes with pass/fail results. event_type='rebellion': divisions with party rebels, optionally filtered by party. event_type='bill': bills filtered by stage or keyword. event_type='member_votes': full voting history for a specific MP — pass name='Nigel Farage' (or mp_id if already known). Shows each division, how the MP voted (Aye/No), and the result.
Inputs: event_type (required), house, party, name, +5 more.
query_entitiesA
Cross-dataset query: find MPs matching multiple conditions spanning vote records AND financial interests. Examples: 'Labour MPs who voted No on division 1234', 'MPs who rebelled in division 5678 AND have defence interests', 'MPs with fossil fuel interests who voted Aye'. Specify division_id with voted='aye'/'no' or rebellion_only=true for vote filter. Specify has_interest keyword for interest filter. Results are the intersection of all conditions.
Inputs: division_id, voted, rebellion_only, house, +3 more.
rank_entitiesA
Rank MPs by rebellion count — how many times they voted against their party whip. Use this for any question about 'most rebellious MPs', 'rebel count', 'which Labour/Conservative MPs rebelled most', or rebellion frequency rankings. Scans all divisions in the date range internally and returns a sorted leaderboard in a single call. Filter by party='Labour' for Labour-specific results.
Inputs: entity_type (required), metric (required), party, house, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct operation: aggregate pattern analysis, entity search, recent events, cross-dataset queries, and rebellion rankings. The purposes are clearly separated with no ambiguity.
All tool names follow a consistent verb_entity pattern (analyze_patterns, find_entities, get_events, query_entities, rank_entities) using snake_case, making the set highly predictable.
With 5 tools covering MPs, bills, petitions, interests, votes, and rebellions, the scope is well-balanced. Each tool serves a clear purpose without redundancy or overload.
The toolset covers core query capabilities for UK Parliament data, but lacks a direct tool for retrieving detailed information about a specific division by ID. Minor gap, but overall surface is solid for typical use cases.
Maintenance
Related MCP Connectors
Search MPs and Lords, fetch profiles, synopses, and Westminster constituencies
UK Parliament MCP — Members, Bills, Hansard APIs
Parliamentary monitoring: sittings transcribed live, amendments, bills and public records, sourced.
Query UK Parliament, elections, crime stats, ONS census data, and national archives
Related MCP Servers
- 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 European Parliament open data, enabling queries about MEPs, plenary documents, and session calendar.68 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides live, source-linked transparency data on German MPs, including roll-call voting, side jobs, committee memberships, and election programs, via the Abgeordnetenwatch API. No API key required.AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables querying UK Parliament data including MPs, Lords, bills, Hansard debates, and divisions.74 npmMIT