Skip to main content
Glama
UK Parliament MCP Server

UK Parliament MCP Server

by kupad95

UK-Parlaments-MCP-Server

npm version License: MIT GitHub

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

Ein Model Context Protocol (MCP) Server für aktuelle Daten des britischen Parlaments. Fragen Sie Gesetzesentwürfe, Abstimmungen, Abgeordnetenprofile, finanzielle Interessen und Petitionen direkt von Ihrem MCP-kompatiblen Assistenten ab, ohne dass ein API-Schlüssel erforderlich ist.


Funktionen

  • Keine Authentifizierung – offene Daten unter der Open Parliament Licence

  • Verfolgung von Abweichlern – Erkennung von Abgeordneten, die gegen die Parteilinie stimmen

  • Datensatzübergreifende Abfragen – Abgleich von Abstimmungsunterlagen mit finanziellen Interessen

  • Mustererkennung – knappe Abstimmungen, Regierungsniederlagen, Raten von Parteiaustritten

  • Suche nach Gesetzesentwürfen & Petitionen – nach Stichwort, Stadium oder Status


Related MCP server: mcp-eu-parliament

Installation

# One‑off run
npx uk-parliament-mcp

# Global install
npm install -g uk-parliament-mcp

Verwendung

Claude Desktop – fügen Sie dies zu claude_desktop_config.json hinzu:

{
  "mcpServers": {
    "uk-parliament": {
      "command": "npx",
      "args": ["-y", "uk-parliament-mcp"]
    }
  }
}

Claude Code:

claude mcp add uk-parliament -- npx -y uk-parliament-mcp

Verfügbare Tools

Tool

Zweck

rank_entities

Ranking von Abgeordneten nach Anzahl der Abweichungen bei Abstimmungen

get_events

Aktuelle Abstimmungen, Abweichungen oder Gesetzesentwürfe

analyze_patterns

Knappe Abstimmungen, Regierungsniederlagen, Raten von Parteiaustritten

find_entities

Suche nach Abgeordneten, Gesetzesentwürfen, Petitionen oder deklarierten Interessen

query_entities

Abgleich von Abstimmungsunterlagen mit finanziellen Interessen


Was Sie fragen können

Frage

Tool

Welche Labour-Abgeordneten haben in diesem Parlament am häufigsten abweichend gestimmt?

rank_entities

Welche Abstimmungen fanden diese Woche im Unterhaus statt?

get_events

Welche konservativen Abgeordneten haben letzten Monat abweichend gestimmt?

get_events

Gesetzesentwürfe zur Sozialreform?

find_entities

Zeige mir knappe Abstimmungen (10 Stimmen Vorsprung oder weniger) in diesem Jahr

analyze_patterns

Welche Regierungsentwürfe wurden im Oberhaus abgelehnt?

analyze_patterns

Abgeordnete mit deklarierten Interessen in Verteidigungsunternehmen

find_entities

Labour-Abgeordnete, die gegen ein Mietrechtsreformgesetz gestimmt haben und Immobilieninteressen haben

query_entities

Was sind die derzeit meistunterzeichneten offenen Petitionen?

find_entities


Datenquellen

API

Was sie abdeckt

bills-api.parliament.uk

Gesetzesentwürfe, Stadien, Sponsoren

commonsvotes-api.parliament.uk

Abstimmungsunterlagen des Unterhauses

lordsvotes-api.parliament.uk

Abstimmungsunterlagen des Oberhauses

members-api.parliament.uk

Profile von Abgeordneten und Lords

interests-api.parliament.uk

Register der finanziellen Interessen der Mitglieder

petition.parliament.uk

Petitionen und Unterschriftenzahlen


Entwicklung

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

Mitwirken

  1. Fork → Branch → Commit

  2. git push und einen PR öffnen

  3. Befolgen Sie den Programmierstil in src/


Lizenz

MIT – siehe LICENSE.


Haftungsausschluss Dieses Projekt ist inoffiziell und wird nicht vom britischen Parlament unterstützt. Die Datennutzung unterliegt der 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