Skip to main content
Glama
UK Parliament MCP Server

UK Parliament MCP Server

by kupad95

영국 의회 MCP 서버

npm version License: MIT GitHub

https://github.com/user-attachments/assets/eec2a7bc-1ddf-4b25-8553-8d5b33a57ff6

실시간 영국 의회 데이터를 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다. API 키 없이 MCP 호환 어시스턴트에서 직접 법안, 투표, 의원 프로필, 재정적 이해관계 및 청원을 조회하세요.


기능

  • 인증 불필요 – 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

사용 가능한 도구

도구

목적

rank_entities

표결 전반에 걸쳐 당론 이탈 횟수별 의원 순위 매기기

get_events

최근 표결, 당론 이탈 또는 법안 확인

analyze_patterns

박빙 투표, 정부 패배, 정당별 당론 이탈률 분석

find_entities

의원, 법안, 청원 또는 신고된 이해관계 찾기

query_entities

투표 기록과 재정적 이해관계 상호 참조


질문 예시

질문

도구

이번 의회에서 가장 많이 당론을 이탈한 노동당 의원은 누구인가요?

rank_entities

이번 주 하원에서 어떤 투표가 있었나요?

get_events

지난달에 당론을 이탈한 보수당 의원은 누구인가요?

get_events

현재 복지 개혁과 관련된 법안은 무엇인가요?

find_entities

올해의 박빙 투표(10표 차 이하)를 보여주세요

analyze_patterns

상원에서 부결된 정부 법안은 무엇인가요?

analyze_patterns

방위 산업체와 재정적 이해관계가 있는 의원은 누구인가요?

find_entities

부동산 관련 이해관계를 가지고 있으면서 임대차 개혁 법안에 반대 투표한 노동당 의원은 누구인가요?

query_entities

현재 가장 많은 서명을 받은 공개 청원은 무엇인가요?

find_entities


데이터 소스

API

포함 범위

bills-api.parliament.uk

법안, 단계, 발의자

commonsvotes-api.parliament.uk

하원 표결 기록

lordsvotes-api.parliament.uk

상원 표결 기록

members-api.parliament.uk

의원 및 상원의원 프로필

interests-api.parliament.uk

의원 재정적 이해관계 등록부

petition.parliament.uk

청원 및 서명 수


개발

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

기여 방법

  1. 포크(Fork) → 브랜치 생성 → 커밋

  2. git push 후 PR 생성

  3. src/ 내의 코딩 스타일 준수


라이선스

MIT – LICENSE 참조.


면책 조항 이 프로젝트는 비공식 프로젝트이며 영국 의회의 보증을 받지 않습니다. 데이터 사용은 Open Parliament Licence를 따릅니다.

Available Tools

5 tools
analyze_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

    A4.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    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.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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.

    Related MCP Connectors

    Related MCP Servers