Uk Parliament Bills

io.github.nick-ma由 GitHub 帳號 nick-ma 發布v1.0.2更新於 Oct 25, 2026

MCP server for UK Parliament Bills API

概覽

AI 產生的概覽

讓助理透過公開的議案 API 檢索與閱讀英國議會議案資料,包括議案、階段、修正案、出版物、會期與 RSS 訂閱來源。

可以做什麼
依會期、議院、議員、狀態等條件搜尋與取得議案、議案類型與階段參考,並依 ID 取得單一議案及其目前階段與新聞文章。列出議案的各個階段與階段詳情,搜尋或取得某階段的修正案與 ping-pong 事項。列出議案與階段的出版物、出版物類型,並取得或下載出版物文件。依議院與日期範圍搜尋會期。以原始文字回傳全部、公共、私人或指定議案的 RSS 訂閱來源。
適用情境
適合立法研究、公民科技或監測類工作流程,當助理需要摘要議案進展、追蹤修正案與階段,或從英國議會議案 API 取得出版物與 RSS 訂閱來源時使用。
執行需求
透過 stdio 在本機執行,通常以 npx 啟動已發佈的 npm 套件,因此需要 Node.js。它會透過網路呼叫公開的英國議會議案 API;README 中展示了可選的 UPSTREAM_BASE_URL 與 REQUEST_TIMEOUT_MS 設定。未宣告需要身分驗證。
安裝前請注意
對公開 API 的唯讀查詢,但回應直接來自上游服務,準確性取決於該服務。README 也記錄了 HTTP 代理模式,可轉送任意上游路徑並設定連接埠;請僅在本機執行,並注意它會開放網路監聽。下載出版物文件會從上游服務拉取檔案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Uk Parliament Bills,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[MCP Compatible] [AI Agent Ready]

UK Parliament Bills MCP Server

Summary

This MCP server provides structured access to UK Parliament Bills data using the Model Context Protocol. It enables AI agents to query bills, stages, publications, amendments, and RSS feeds through reliable tools and an API-backed data source. Developers can integrate the MCP server into local workflows or automation pipelines using stdio transport, while preserving upstream API responses. The server exposes tools for search, lookup, and publication retrieval, optimized for AI agents and MCP-compatible clients.

Features

  • Search and retrieve Bills, stages, publications, and sittings from the UK Parliament Bills API.
  • Access amendments and ping-pong items with structured parameters and enum validation.
  • Provide RSS feeds for all, public, or private bills as raw text payloads.
  • Preserve upstream JSON payloads in a consistent response envelope for downstream tools and AI agents.

Available Tools

search_bill_stage_amendments

Returns a list of amendments for a Bill stage.

Parameters:

  • billId (number, path) – Bill ID.
  • billStageId (number, path) – Bill stage ID.
  • SearchTerm (string, query) – Optional text search.
  • AmendmentNumber (string, query) – Optional amendment number.
  • Decision (string, query) – Optional decision enum.
  • MemberId (number, query) – Optional member ID.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

get_bill_stage_amendment

Returns a specific amendment for a Bill stage.

Parameters:

  • billId (number, path) – Bill ID.
  • billStageId (number, path) – Bill stage ID.
  • amendmentId (number, path) – Amendment ID.

list_bill_news_articles

Returns news articles for a Bill.

Parameters:

  • billId (number, path) – Bill ID.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

list_bill_types

Returns a list of Bill types.

Parameters:

  • Category (string, query) – Optional category enum.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

search_bills

Returns a list of Bills matching filters.

Parameters:

  • SearchTerm (string, query) – Optional text search.
  • Session (number, query) – Optional session number.
  • CurrentHouse (string, query) – Optional house enum.
  • OriginatingHouse (string, query) – Optional house enum.
  • MemberId (number, query) – Optional member ID.
  • DepartmentId (number, query) – Optional department ID.
  • BillStage (array:number, query) – Optional bill stage IDs.
  • BillStagesExcluded (array:number, query) – Optional excluded stage IDs.
  • IsDefeated (boolean, query) – Optional defeated filter.
  • IsWithdrawn (boolean, query) – Optional withdrawn filter.
  • BillType (array:number, query) – Optional bill type IDs.
  • SortOrder (string, query) – Optional sort order enum.
  • BillIds (array:number, query) – Optional bill IDs.
  • IsInAmendableStage (boolean, query) – Optional amendable stage filter.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

get_bill

Returns a Bill.

Parameters:

  • billId (number, path) – Bill ID.

get_bill_stage_details

Returns a Bill stage.

Parameters:

  • billId (number, path) – Bill ID.
  • billStageId (number, path) – Bill stage ID.

list_bill_stages

Returns all Bill stages for a Bill.

Parameters:

  • billId (number, path) – Bill ID.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

get_publication_document

Returns information on a publication document.

Parameters:

  • publicationId (number, path) – Publication ID.
  • documentId (number, path) – Document ID.

download_publication_document

Returns a publication document payload.

Parameters:

  • publicationId (number, path) – Publication ID.
  • documentId (number, path) – Document ID.

search_bill_stage_ping_pong_items

Returns a list of motions or amendments for a Bill stage.

Parameters:

  • billId (number, path) – Bill ID.
  • billStageId (number, path) – Bill stage ID.
  • SearchTerm (string, query) – Optional text search.
  • AmendmentNumber (string, query) – Optional amendment number.
  • Decision (string, query) – Optional decision enum.
  • MemberId (number, query) – Optional member ID.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

get_bill_stage_ping_pong_item

Returns an amendment or motion detail.

Parameters:

  • billId (number, path) – Bill ID.
  • billStageId (number, path) – Bill stage ID.
  • pingPongItemId (number, path) – Ping pong item ID.

list_publication_types

Returns a list of publication types.

Parameters:

  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

list_bill_publications

Returns Bill publications.

Parameters:

  • billId (number, path) – Bill ID.

list_bill_stage_publications

Returns publications for a Bill stage.

Parameters:

  • billId (number, path) – Bill ID.
  • stageId (number, path) – Stage ID.

get_rss_all_bills

Returns an RSS feed for all Bills.

get_rss_public_bills

Returns an RSS feed for public Bills.

get_rss_private_bills

Returns an RSS feed for private Bills.

get_rss_bill_by_id

Returns an RSS feed for a specific Bill.

Parameters:

  • id (number, path) – Bill ID.

search_sittings

Returns a list of sittings.

Parameters:

  • House (string, query) – Optional house enum.
  • DateFrom (string, query) – Optional start date.
  • DateTo (string, query) – Optional end date.
  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

list_stage_references

Returns a list of Bill stages.

Parameters:

  • Skip (number, query) – Optional offset.
  • Take (number, query) – Optional limit.

Example Output

json
{  "status": 200,  "data": {    "items": [      {        "billId": 1,        "title": "Energy Security Bill",        "currentStage": "Commons Committee",        "currentHouse": "Commons",        "lastUpdated": "2026-03-11T10:00:00Z"      }    ],    "totalResults": 1  },  "upstream_path": "/api/v1/Bills",  "retrieved_at": "2026-03-11T10:00:00.000Z"}

Quick Start

Run the MCP server using npx:

bash
npx -y -p @darkhorseone/mcp-server-uk-parliament-bills mcp-server-uk-parliament-bills

MCP Configuration

Example mcpServers configuration for stdio transport:

json
{  "mcpServers": {    "uk-parliament-bills": {      "command": "npx",      "args": ["-y", "-p", "@darkhorseone/mcp-server-uk-parliament-bills", "mcp-server-uk-parliament-bills"],      "env": {        "UPSTREAM_BASE_URL": "https://bills-api.parliament.uk",        "REQUEST_TIMEOUT_MS": "10000"      }    }  }}

Example Usage

  • List the latest UK Parliament Bills.
  • Fetch a specific Bill by ID and return the current stage.
  • Retrieve publications for a Bill and download a document.
  • Get the RSS feed for public Bills for downstream tools.

Use Cases

  • AI agents summarizing legislative progress and bill status.
  • Developer tools that monitor bill updates via the API and RSS.
  • Civic technology platforms tracking amendments and parliamentary stages.
  • Automation workflows that enrich datasets with UK Parliament Bills metadata.

Data Source

UK Parliament Bills API https://bills-api.parliament.uk

Installation

Run directly using npx:

bash
npx -y -p @darkhorseone/mcp-server-uk-parliament-bills mcp-server-uk-parliament-bills

Or install via pnpm from the repository root:

bash
pnpm install

Run (HTTP proxy server)

Build first, then start:

bash
pnpm --filter @darkhorseone/mcp-server-uk-parliament-bills run buildpnpm --filter @darkhorseone/mcp-server-uk-parliament-bills run start:http

Set a custom HTTP port with the UKP_HTTP_PORT environment variable (default: 3000):

bash
UKP_HTTP_PORT=8787 pnpm --filter @darkhorseone/mcp-server-uk-parliament-bills run start:http

Published package command:

bash
npx -y -p @darkhorseone/mcp-server-uk-parliament-bills -- mcp-server-uk-parliament-bills-http

If your shell cannot resolve the bin ("command not found"), run the HTTP entrypoint directly:

bash
npx -y -p @darkhorseone/mcp-server-uk-parliament-bills -- node ./dist/http.js

Health check:

bash
curl http://127.0.0.1:3000/healthz

Proxy pattern:

text
GET /proxy/<upstream-path>?<query>

Example:

bash
curl "http://127.0.0.1:3000/proxy/api/v1/Bills?SearchTerm=energy&SortOrder=TitleAscending"

License

MIT License

MCP Metadata

Protocol: Model Context Protocol Transport: stdio Tools: search_bill_stage_amendments, get_bill_stage_amendment, list_bill_news_articles, list_bill_types, search_bills, get_bill, get_bill_stage_details, list_bill_stages, get_publication_document, download_publication_document, search_bill_stage_ping_pong_items, get_bill_stage_ping_pong_item, list_publication_types, list_bill_publications, list_bill_stage_publications, get_rss_all_bills, get_rss_public_bills, get_rss_private_bills, get_rss_bill_by_id, search_sittings, list_stage_references

來源:servers/uk-parliament-bills/README.md,提交 38e74c9

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。